Created
March 7, 2016 16:59
-
-
Save bananaumai/e68728bc59ebdbaf30a0 to your computer and use it in GitHub Desktop.
mecab sample
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
import MeCab | |
t = MeCab.Tagger('-Ochasen') | |
n = t.parseToNode('MeCabを使って何かやってみる。') | |
while n: | |
print("surface:\t{0}".format(n.surface)) | |
print("feature:\t{0}".format(n.feature)) | |
print("cost:\t{0}".format(n.feature)) | |
n = n.next |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment