Last active
August 29, 2015 14:04
-
-
Save buhii/088647fdf4b95f3304cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# requirement: mecab | |
crfpp="CRF++-0.58" | |
crfpp_googlecode="https://crfpp.googlecode.com/files/" | |
cabocha="cabocha-0.68" | |
cabocha_googlecode="https://cabocha.googlecode.com/files/" | |
if ! type curl > /dev/null; then | |
downloader='wget ' | |
else | |
downloader='curl -O ' | |
fi | |
# CRF++ | |
if [ ! -f "${crfpp}.tar.gz" ]; then | |
eval "${downloader}${crfpp_googlecode}${crfpp}.tar.gz" | |
# Expand, compile and install | |
tar -zxvf "${crfpp}.tar.gz" | |
cd ${crfpp} | |
./configure | |
make | |
sudo make install | |
sudo ldconfig | |
cd ".." | |
fi | |
# CaboCha | |
if [ ! -f "${cabocha}.tar.bz2" ]; then | |
eval "${downloader}${cabocha_googlecode}${cabocha}.tar.bz2" | |
# Expand, compile and install | |
tar -jxf "${cabocha}.tar.bz2" | |
cd ${cabocha} | |
./configure --enable-utf8-only --with-charset=utf8 | |
make | |
sudo make install | |
sudo ldconfig | |
cd "python" | |
python setup.py install | |
cd ".." | |
cd ".." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment