tar zxvf mmseg-3.1.tar.gz
cd mmseg-3.1
./configure --prefix=/usr/local/mmseg
make
make install
cd ../
yum install -y python python-devel
tar zxvf csft-3.1.tar.gz
cd csft-3.1
./configure --prefix=/usr/local/coreseek --with-python --with-mysql --with-mmseg-includes=/usr/local/mmseg/include/mmseg --with-mmseg-libs=/usr/local/mmseg/lib/ --with-mysql-include=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql
make
make install
安装完后在/usr/local/coreseek 有三个目录,bin,etc和var。
创建dict目录
mkdir /usr/local/coreseek/dict/
产生字典
cd /root/soft/mmseg-3.1/data
/usr/local/mmseg/bin/mmseg -u unigram.txt
产生了unigram.txt.uni,移到相应目录。
cp unigram.txt.uni /usr/local/coreseek/dict/uni.lib
创建 /usr/local/coreseek/dict/mmseg.ini 内容:
[mmseg]
merge_number_and_ascii=1;
number_and_ascii_joint=-;
compress_space=0;
seperate_number_ascii=1;
#merge_number_and_ascii: 字母和数字连续出现是非切分
#number_and_ascii_joint:连接数字和字母可用的符号,如'-' '.' 等
#compress_space:暂时无效
#seperate_number_ascii:是否拆分数字,如 1988 -> 1/x 9/x 8/x 8/x
安装完成。
配置文件*.conf参考csft.conf