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

ERROR:natto.mecab:Text should be of type str #89

Closed eromoe closed 8 years ago

eromoe commented 8 years ago

I think natto should accept u'xxxx' input. It's very common in py 2.x.

buruzaemon commented 8 years ago

I apologize for the long wait, but I was thoroughly considering the advantages and disadvantages of support Unicode input for Python 2.7 in natto-py.

Given that natto-py is meant to be a bridge to the MeCab API and MeCab expects both input and output be a string of bytes with an accompanying encoding, I have come to the conclusion that it is better to separate the responsibility of bridging Python to MeCab from the issue of Python 2.n's handling of strings.

I actually considered adding in support for u'xxxx' for Python 2.7 when I first started, but I still think that the issue of Python 2.n's string-handling and Unicode-handling is better separated from natto-py's API to MeCab.

Therefore, I will not be adding this support into natto-py.

buruzaemon commented 8 years ago

Closing out this issue with WON'T FIX.