import MeCab
tagger = MeCab.Tagger('')
tagger.parse('') #C'est important! !! !! !!
text = u'Jouons avec MeCab!'
node = tagger.parseToNode(text)
while node:
print(node.surface + '\t' + node.feature)
node = node.next
référence: https://shogo82148.github.io/blog/2015/12/20/mecab-in-python3-final/
Recommended Posts