buruzaemon / natto-py

natto-py combines the Python programming language with MeCab, the part-of-speech and morphological analyzer for the Japanese language.
BSD 2-Clause "Simplified" License
92 stars 13 forks source link

How to tokenize sentence with several user dict? #90

Closed eromoe closed 8 years ago

eromoe commented 8 years ago

I want use the default dict with some my additional dict. google find out a cmd as below:

mecab -u dic1.dic,dic2.dic

But how to make it by natto?

eromoe commented 8 years ago

Oh, I figure it out

userdict = [xxx,xxx]
mc = MeCab("-u "+','.join(userdict)+" -F%m")
buruzaemon commented 8 years ago

Yes, you are correct. This is the same as the mecab command-line options.

Brooke@iPhone

2016/03/08 11:44$B!"(Beromoe notifications@github.com $B$N%a%C%;!<%8(B:

Oh, I figure it out

userdict = [xxx,xxx] mc = MeCab("-u "+','.join(userdict)+" -F%m") $B!=(B Reply to this email directly or view it on GitHub.