Created
April 6, 2010 17:16
-
-
Save aero/357831 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# 사용법 | |
# chmod a+x kspell.pl | |
# ./kspell.pl "안뇽하세요? 방갑습니다." | |
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