結局MeCabとの連携が上手くいかず、Pythonでは動かなかったけど、ターミナルでcabochaは動いたので、メモとして置いておく。
brew install git curl xz
brew install crf++CRF++をダウンロードしてくる(https://taku910.github.io/crfpp/)
cd CRF++-*.*
./configure
sudo make
sudo make install
cd python
sudo python setup.py installMeCabの本体をダウンロードしてくる(https://taku910.github.io/mecab/)
cd mecab-*.*
./configure --enable-utf8-only
sudo make
sudo make install
cd python
sudo python setup.py installMeCabの辞書をダウンロードしてくる(https://taku910.github.io/mecab/)
cd mecab-ipadic-*.*.*-********
./configure --with-charset=utf8
sudo make
sudo make installsetup.pyの以下の部分を
def cmd2(str):
return string.split (cmd1(str))以下のように変更する。
def cmd2(str):
return cmd1(str).split()そして、以下を実行する。
$ cd mecab-python-*.*
$ sudo python setup.py installcabochaをダウンロードしてくる(https://taku910.github.io/cabocha/)
cd cabocha-*.*
./configure --with-charset=utf8 --enable-utf8-only
sudo make
sudo make install
cd python
sudo python setup.py install