| ページ一覧 | ブログ | twitter |  書式 | 書式(表) |

MyMemoWiki

差分

ナビゲーションに移動 検索に移動
編集の要約なし
==Python MeCab(日本語形態素解析)==
[[Python][自然言語処理]]
{{amazon|4873114705}}
# make install
<&lt;blockquote>&gt;./configure で、Your compiler is not powerful enough to compile MeCab エラーとなったら、gcc-c++をインストール<&lt;/blockquote>&gt;
# yum install gcc-c++
====辞書のインストール====
=====以下のエラーがでる場合=====
# python2.7
>>> &gt;&gt;&gt; import MeCab
Traceback (most recent call last):
File "<&lt;stdin>&gt;", line 1, in <&lt;module>&gt; File "MeCab.py", line 26, in <&lt;module>&gt;
_MeCab = swig_import_helper()
File "MeCab.py", line 18, in swig_import_helper
===実行してみる===
# python2.7
>>> &gt;&gt;&gt; import MeCab >>> &gt;&gt;&gt; mecab = MeCab.Tagger('-Ochasen') >>> &gt;&gt;&gt; print mecab.parse('泣き叫ぶ鬼の串刺し。何かに憑かれた餓鬼の群れ')
泣き叫ぶ ナキサケブ 泣き叫ぶ 動詞-自立 五段・バ行 基本形
鬼 オニ 鬼 名詞-一般

案内メニュー