SCWS中文分词的安装

作者:牛头 日期:2017-08-01 热度:67
SCWS中文分词的安装
wget http://www.xunsearch.com/scws/down/scws-1.2.2.tar.bz2
tar xvjf scws-1.2.2.tar.bz2
cd scws-1.2.2
./configure --prefix=/usr/local/scws
make
make install


cd /usr/local/scws/etc
wget http://www.xunsearch.com/scws/down/scws-dict-chs-gbk.tar.bz2
wget http://www.xunsearch.com/scws/down/scws-dict-chs-utf8.tar.bz2
tar xvjf scws-dict-chs-gbk.tar.bz2
tar xvjf scws-dict-chs-utf8.tar.bz2




cd /root/scws-1.2.2/phpext
/usr/local/php/bin/phpize
./configure --with-scws=/usr/local/scws --with-php-config=/usr/local/php/bin/php-config
make
make install


添加php扩展
extension = scws.so
scws.default.charset = utf8
scws.default.fpath = /usr/local/scws/etc