Created
November 5, 2011 08:19
-
-
Save orangeclover/1341266 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
// 形態素解析 | |
// https://github.com/sile/gomoku/downloads | |
// GROOVY_HOME/libにgomoku-0.0.4.jar をコピー | |
import net.reduls.gomoku.* | |
for(morpheme in Tagger.parse("我が輩は猫である。名前はまだない。")){ | |
println(morpheme.surface + ":" + morpheme.feature) | |
} | |
/* | |
我が:連体詞,*,*,*,*,* | |
輩:名詞,一般,*,*,*,* | |
は:助詞,係助詞,*,*,*,* | |
猫:名詞,一般,*,*,*,* | |
で:助動詞,*,*,*,特殊・ダ,連用形 | |
ある:助動詞,*,*,*,五段・ラ行アル,基本形 | |
。:記号,句点,*,*,*,* | |
名前:名詞,一般,*,*,*,* | |
は:助詞,係助詞,*,*,*,* | |
まだ:副詞,助詞類接続,*,*,*,* | |
ない:形容詞,自立,*,*,形容詞・アウオ段,基本形 | |
。:記号,句点,*,*,*,* | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment