yono/py-extractword — pull request #1 by hirokiky (2012-10-31 12:42:19+00:00)
Title: refs #1 Sentence.analysis_textでのUnicodeErrorを解決

Sentence.analysis_textでUnicodeErrorが発生する問題に当たりました::

Traceback (most recent call last):
File "markovtest.py", line 13, in
m.analyze_sentence(text)
File "/home/hirokiky/.virtualenvs/markov/local/lib/python2.7/site-packages/markovchains/markovchains.py", line 37, in analyze_sentence
words = self._get_words(sentence + u'。')
File "/home/hirokiky/.virtualenvs/markov/local/lib/python2.7/site-packages/markovchains/markovchains.py", line 83, in _get_words
sentence.analysis_text(text)
File "/home/hirokiky/.virtualenvs/markov/local/lib/python2.7/site-packages/extractword.py", line 50, in analysis_text
words.append(Word(unicode(res.surface), unicode(res.feature)))

これの解法をプルリクエストしています。

環境
-------

Python=2.7.1+
Mecab==0.97
mecab-python==0.97
UbuntuServer==12.04