Skip to content

Instantly share code, notes, and snippets.

@aero aero/

Created Apr 6, 2010
What would you like to do?
#!/usr/bin/env perl
# 사용법
# chmod a+x
# ./ "안뇽하세요? 방갑습니다."
use strict;
use warnings;
use WebService::KoreanSpeller;
use Encode qw/encode decode/;
my $text = decode('utf8', $ARGV[0]);
my $checker = WebService::KoreanSpeller->new( text => $text );
my @results = $checker->spellcheck;
binmode STDOUT, ':encoding(UTF-8)';
print "(",$_->{position},")",$_->{incorrect}," -> ",$_->{correct},"\n",
$_->{comment},"\n-------------------------------\n" for @results;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.