sphinx系列之中文分词LibMMSeg安装(三)

本文介绍如何安装LibMMSeg,一款专为Sphinx全文搜索引擎设计的中文分词软件包。该软件采用MMSEG算法实现中文分词,并在GPL协议下发布。文章详细记录了从下载安装包到配置环境变量的全过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

        sphinx不支持中文分词,国内也有人写了好多个分词组件,本文就讲安装LibMMSeg,它是Coreseek.com为 Sphinx 全文搜索引擎设计的中文分词软件包,其在GPL协议下发行的中文分词法,采用Chih-Hao Tsai的MMSEG算法。

        先从http://www.coreseek.cn/news/7/99/    上下载到LibMMSeg的安装包,如下:

cd  / usr / local / src /
wget http:
// www.coreseek.cn / uploads / csft / 3.2 / coreseek - 3.2 . 13 .tar.gz  - c

       然后解压缩:

tar  - zxv  - f coreseek - 3.2 . 13 .tar.gz

       进入到mmseg所在文件夹,然后编译:

cd coreseek - 3.2 . 13 / mmseg - 3.2 . 13 /
.
/ configure  -- prefix =/ usr / local / mmseg

       编译过程中报了一个config.status: error: cannot find input file: src/Makefile.in这个的错误,然后运行下列指令再次编译就能通过了:

aclocal
libtoolize 
-- force
automake 
-- add - missing
autoconf
autoheader
make clean

       然后再进行编译和安装:

. / configure  -- prefix =/ usr / local / mmseg
make 
&&  make install

       把mmseg的命令加到环境变量中,然后运行mmseg,就能输入安装成功的信息了:

ln  - / usr / local / mmseg / bin / mmseg  / bin / mmseg
mmseg

Coreseek COS(tm) MM Segment 
1.0
Copyright By Coreseek.com All Right Reserved.
Usage: mmseg 
< option >   < file >
- < unidict >            Unigram Dictionary
- r           Combine with  - u, used a plain text build Unigram Dictionary, default Off
- < Synonyms >            Synonyms Dictionary
- < thesaurus >           Thesaurus Dictionary
- h             print  this help  and  exit


 

 

 

 

 

 

转载于:https://www.cnblogs.com/chenzehe/archive/2010/11/14/1870181.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值