disco-dop

van Cranenburghが開発・公開しているdata-oriented parser。

https://github.com/andreasvc/disco-dop

インストール手順:

必要環境:

Python 2.7以上/3

Cython .21以上

Numpy 1.5以上

Debian/Ubuntu系の場合:

sudo apt-get install build-essential python-dev python-numpy python-pip git
git clone –depth 1 git://github.com/andreasvc/disco-dop.git
cd disco-dop
pip install –user -r requirements.txt
make install && make inplace

その他のUnix系システムの場合:

mkdir -p ~/.local
echo export PATH=$HOME/.local/bin:$PATH >> ~/.bashrc
echo export LD_LIBRARY_PATH=$HOME/.local/lib:/usr/lib64:/usr/lib >>~/.bashrc
echo export PYTHONIOENCODING=”utf-8″ >>~/.bashrc

(bashを使っていない場合は使用しているシェルに置き換える)

この後、再起動して設定を適用する。以下のような手順でPython 2.7をインストールする。

wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
tar -xzf Python-2.7.6.tgz
cd Python-2.7.6
./configure –prefix=$HOME/.local –enable-shared
make && make install && cd ..

pythonコマンドでpython 2.7.6が正常にインストールされていることを確認する。

pipをインストールする。

wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py –user

discodopをインストールする。

wget https://github.com/andreasvc/disco-dop/archive/master.zip
unzip disco-dop-master.zip
cd disco-dop-master
pip install –user -r requirements.txt
make install && make inplace

discodopコマンドで正常にインストールされていることを確認する。