Coreseek®  
 | 首页 | 注册 | 回复 | 搜索 | 统计资料 |                 网站首页产品服务开放源码安装使用常见问题中文手册社区交流联系我们 
中文分词 论坛首页 / 中文分词 /

你好,麻烦你一下 有个问题处理了大半天还没弄好

 
yurui
会员
#1 | 发表时间: 2010 01 06 15:51
回复 
我是在虚拟机上使用的  red hat enterprise 4 系统
按照教程,先装了mmseg   运行/usr/local/mmseg/bin/mmseg 出现了信息,没问题
Coreseek COS(tm) MM Segment 1.0
Copyright By Coreseek.com All Right Reserved.
Usage: /usr/local/mmseg/bin/mmseg
-u            Unigram Dictionary
-r           Combine with -u, used a plain text build Unigram Dictionary, default Off
-b            Synonyms Dictionary
-h            print this help and exit



接着安装mysql-5.0.22  也安装上去了
./configure --prefix=/opt/mysql --with-charset=utf8 --with-sphinx-storage-engine
utf8编码和安装sphinx引擎   都成功了。

再安装csft3.1
./configure --prefix=/usr/local/csft
--with-mmseg=/usr/local/mmseg/bin/mmseg
--with-mmseg-includes=/usr/local/mmseg/include/mmseg/
--with-mmseg-libs=/usr/local/mmseg/lib/
# make
# make install

安装过程中也没什么问题,索引,查询英文都很好。
使用中文分词辞典查询中文的时候问题就来了

/usr/local/mmseg/bin/mmseg -u unigram.txt
mv unigram.txt.uni uni.lib
cp uni.lib /usr/local/csft

配置文件csft.conf
charset_type           = zh_cn.utf-8
charset_dictpath       = /usr/local/csft

却怎么也搜索不到

英文的:
[root@localhost csft]# bin/search doc
Coreseek Full Text Server 3.1
Copyright (c) 2006-2008 coreseek.com
using config file '/usr/local/csft/etc/csft.conf'...
WARNING: key 'min_word_len' is not multi-value; value in /usr/local/csft/etc/csft.conf line 352 will be ignored.
iniparser: cannot open /usr/local/csft/mmseg.ini
index 'test1': query 'doc ': returned 1 matches of 1 total in 0.011 sec

displaying matches:
1. document=2, weight=1
        id=2
        content=test doc


中文的:
[root@localhost csft]# bin/search 中文
Coreseek Full Text Server 3.1
Copyright (c) 2006-2008 coreseek.com
using config file '/usr/local/csft/etc/csft.conf'...
WARNING: key 'min_word_len' is not multi-value; value in /usr/local/csft/etc/csft.conf line 352 will be ignored.
iniparser: cannot open /usr/local/csft/mmseg.ini
index 'test1': query '中文 ': returned 0 matches of 0 total in 0.023 sec

words:
1. '中文': 0 documents, 0 hits

index 'test1stemmed': query '中文 ': returned 0 matches of 0 total in 0.000 sec

words:
1. '中文': 0 documents, 0 hits



表中数据
mysql> select * from china;
+----+--------------+
| id | content      |
+----+--------------+
|  1 | test group   |
|  2 | test doc     |
|  3 | 中文       |
|  4 | 中文检索 |




我怀疑是mmseg没起作用  请帮我看看好吗?  谢谢
yurui
会员
#2 | 发表时间: 2010 01 06 15:53
回复 
在安装mysql的时候需要安装安装中文补丁吗?
因为我是用csft安装,没说要打中文补丁
yurui
会员
#3 | 发表时间: 2010 01 06 15:54
回复 
还有一点  那个unigram.txt是utf8编码  符合要求
yurui
会员
#4 | 发表时间: 2010 01 06 16:58
回复 
顺便再问一下  目前发现网上有2种配置
一:
mmseg-3.1和csft3.1

二:
mmseg-0.7.3
sphinx-0.9.8-rc2
fix-crash-in-excerpts.patch
sphinx-0.9.8rc.2.zhcn-support.patch

请问这两种那个要好些呢?
我觉得第一种比较好  安装的东西比较少,毕竟打补丁很麻烦的。而且版本比较新

可惜现在使用第一种方法中文分词的问题没有解决。。。  郁闷啊。。。。
yurui
会员
#5 | 发表时间: 2010 01 06 21:21
回复 
天啊   我又重新来安装了一次  还是不成。。。。
请教站长。。。
yurui
会员
#6 | 发表时间: 2010 01 07 07:50
回复 
[root@localhost csft]# bin/search test
Coreseek Full Text Server 3.1
Copyright (c) 2006-2008 coreseek.com
using config file '/usr/local/csft/etc/csft.conf'...
iniparser: cannot open /usr/local/csft/mmseg.ini
index 'test1': query 'test ': returned 4 matches of 4 total in 0.009 sec

displaying matches:
1. document=1, weight=2, group_id=1, date_added=Wed Jan  6 21:08:24 2010
        id=1
        group_id=1
        group_id2=5
        date_added=2010-01-06 21:08:24
        title=test one
        content=this is my test document number one. also checking search within phrases.
2. document=2, weight=2, group_id=1, date_added=Wed Jan  6 21:08:24 2010
        id=2
        group_id=1
        group_id2=6
        date_added=2010-01-06 21:08:24
        title=test two
        content=this is my test document number two
3. document=4, weight=1, group_id=2, date_added=Wed Jan  6 21:08:24 2010
        id=4
        group_id=2
        group_id2=8
        date_added=2010-01-06 21:08:24
        title=doc number four
        content=this is to test groups
4. document=5, weight=1, group_id=3, date_added=Wed Jan  6 21:35:18 2010
        id=5
        group_id=3
        group_id2=9
        date_added=2010-01-06 21:35:18
        title=test,火锅
        content=火锅 中文检索不可思议

搜索test,有条记录是'titile=test,火锅'  content='火锅 中文检索不可思议'
中文显示的是乱码 奇怪

这些中文都是utf-8编码的文件复制过来的。
HonestQiao
会员
#7 | 发表时间: 2010 01 07 16:08
回复 
多半是字符集的问题。
数据库的数据的字符集
coreseek连接数据库的字符集
以及console的
请保持一致。
yurui
会员
#8 | 发表时间: 2010 01 08 08:19
回复 
谢谢 已经解决了  数据库里面的.和传输有关的
@@character_set_connection
@@character_set_results
@@character_set_client
都设成utf8
carlyle
会员
#9 | 发表时间: 2010 02 26 17:46
回复 
yurui:
谢谢 已经解决了 数据库里面的.和传输有关的
@@character_set_connection
@@character_set_results
@@character_set_client
都设成utf8

这个是哪里设置的?my.cnf
HonestQiao
会员
#10 | 发表时间: 2010 02 28 22:14
回复 
csft的配置文件里面,读取数据以前的指令
 
回复
Bold Style  Italic Style  Image 链接  URL 链接 
发帖注意:
  • 网址中请去掉http://开头,例如:您需要输入www.coreseek.cn,而不是http://www.coreseek.cn
  • 咨询问题,请贴出详细的操作系统版本、Coreseek版本(Linux环境请给出编译参数)
  • 请仔细查看中文手册和本站安装指南,确认操作正确
  • 请仔细查看常见问题解答,也许你的问题已经有解决方法

» 帐号  » 密码 
发帖前请登陆, 或者 注册 .