Tritonn を利用するためには事前に Senna のライブラリ(libsenna)がインストールされている必要があります。
また Senna を利用するためには MeCab のライブラリと辞書が事前にインストールされている必要があります。
ここでは Senna の分かち書きインデックスを作成するために必要な MeCab のインストールを行います。
Mecab のダウンロードとインストール
Mecab のソースファイルを Mecab 公式サイト からダウンロードしてコンパイル、インストールを行います。
# wget -P /usr/local/src http://jaist.dl.sourceforge.net/sourceforge/mecab/mecab-0.97.tar.gz![](/images/enter.gif)
# mkdir /usr/local/mecab-0.97![](/images/enter.gif)
# cd /usr/local/src![](/images/enter.gif)
# tar xzf mecab-0.97.tar.gz![](/images/enter.gif)
# cd mecab-0.97![](/images/enter.gif)
# ./configure --prefix=/usr/local/mecab-0.97 --with-charset=utf8![](/images/enter.gif)
# make![](/images/enter.gif)
# make install![](/images/enter.gif)
![](/images/enter.gif)
# mkdir /usr/local/mecab-0.97
![](/images/enter.gif)
# cd /usr/local/src
![](/images/enter.gif)
# tar xzf mecab-0.97.tar.gz
![](/images/enter.gif)
# cd mecab-0.97
![](/images/enter.gif)
# ./configure --prefix=/usr/local/mecab-0.97 --with-charset=utf8
![](/images/enter.gif)
# make
![](/images/enter.gif)
# make install
![](/images/enter.gif)
— configure オプションの解説
- インストール先のディレクトリを設定します。
- –prefix=/usr/local/mecab-0.97
- 文字コードに UTF-8 を指定します。
- –with-charset=utf8
MeCab のディレクトリを /usr/local/mecab としてアクセスできるようにシンボリックリンクを作成します。
# ln -sfn /usr/local/mecab-0.97 /usr/local/mecab![](/images/enter.gif)
![](/images/enter.gif)
MeCab 辞書のインストール
続いて MeCab 辞書をダウンロードしてコンパイル、インストールを行います。
# wget -P /usr/local/src http://jaist.dl.sourceforge.net/sourceforge/mecab/mecab-ipadic-2.7.0-20070801.tar.gz![](/images/enter.gif)
# cd /usr/local/src![](/images/enter.gif)
# tar xzf mecab-ipadic-2.7.0-20070801.tar.gz![](/images/enter.gif)
# cd mecab-ipadic-2.7.0-20070801![](/images/enter.gif)
# ./configure --prefix=/usr/local/mecab --with-charset=utf8 --with-mecab-config=/usr/local/mecab/bin/mecab-config![](/images/enter.gif)
# make![](/images/enter.gif)
# make install![](/images/enter.gif)
![](/images/enter.gif)
# cd /usr/local/src
![](/images/enter.gif)
# tar xzf mecab-ipadic-2.7.0-20070801.tar.gz
![](/images/enter.gif)
# cd mecab-ipadic-2.7.0-20070801
![](/images/enter.gif)
# ./configure --prefix=/usr/local/mecab --with-charset=utf8 --with-mecab-config=/usr/local/mecab/bin/mecab-config
![](/images/enter.gif)
# make
![](/images/enter.gif)
# make install
![](/images/enter.gif)
— configure オプションの解説
- インストール先のディレクトリを設定します。
- –prefix=/usr/local/mecab
- 文字コードに UTF-8 を指定します。
- –with-charset=utf8
- MeCab がインストールされている場所を指定します。
- –with-mecab-config=/usr/local/mecab/bin/mecab-config