Created
September 26, 2011 22:00
-
-
Save sartak/1243534 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
$ perl -MText::MeCab -E 'my $mecab = Text::MeCab->new; for (my $node = $mecab->parse("ハリーは暖炉に急行し、暖炉飛行粉の壷をつかみ、火格子にひと摘み投げ入れた"); $node; $node = $node->next) { my @fields = split ",", $node->feature; say sprintf "%s: %s", $node->surface, $fields[6] }' | |
ハリー: ハリー | |
は: は | |
暖炉: 暖炉 | |
に: に | |
急行: 急行 | |
し: する | |
、: 、 | |
暖炉: 暖炉 | |
飛行: 飛行 | |
粉: 粉 | |
の: の | |
壷: 壷 | |
を: を | |
つかみ: つかむ | |
、: 、 | |
火: 火 | |
格子: 格子 | |
に: に | |
ひと: ひと | |
摘み: 摘み | |
投げ入れ: 投げ入れる | |
た: た | |
: * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment