Skip to content

Instantly share code, notes, and snippets.

@bananaumai
Created March 7, 2016 16:59
Show Gist options
  • Save bananaumai/e68728bc59ebdbaf30a0 to your computer and use it in GitHub Desktop.
Save bananaumai/e68728bc59ebdbaf30a0 to your computer and use it in GitHub Desktop.
mecab sample
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