...定 xdb 词典,以便 txt 词典后生效。 $so->add_dict('dict.xdb', SCWS_XDICT_XDB); $so->add_dict('dict.txt', SCWS_XDICT_TXT); [color=red]$so->set_multi(3);[/color] .. 这样将会得到”云计算“”云计“”计算“
$so->set_dict('D:\php\scws\etc\dict.utf8.xdb'); $so->set_rule('D:\php\scws\etc\rules.utf8.ini'); $so->add_dict('D:\php\www\htdocs\dict_extra.txt', SCWS_XDICT_TXT); hm你好。 上边的代码的确可以自定义词库,现在的scws能否直接把词加入核心词库了啊?比如直接加...
...tu安装时:./setup.sh 错误提示:[code]Configuring xapian-core-scws ... ----- checking for library containing zlibVersion... -lz checking for uuid/uuid.h... no checking for uuid.h... no configure: error: Neither uuid/uuid.h nor uuid.h found - required for brass, chert and flint (you...
scws_set_dict($so, '/dict.utf8.xdb'); scws_set_rule($so, '/rules.utf8.ini'); 问题在这里!!
代码如下 $so = scws_new(); $so->set_charset('utf-8'); // 这里没有调用 set_dict 和 set_rule 系统会自动试调用 ini 中指定路径下的词典和规则文件 $so->send_text("我是一个中国人");; while ($tmp = $so->get_result()) { foreach($tmp as $k=>$v){ echo $v['word'...
ln -s /usr/local/scws/lib/libscws.so.2.0 /usr/local/scws/lib/libscws.so 编译很顺利,就遇到这一个问题:D
...tu安装时:./setup.sh 错误提示:[code]Configuring xapian-core-scws ... ----- checking for library containing zlibVersion... -lz checking for uuid/uuid.h... no checking for uuid.h... no configure: error: Neither uuid/uuid.h nor uuid.h found - required for brass, chert and flint (you...
我用的是apache2.2.4 php5.2.3 windows系统 我加载成功了,为什么用 $so = scws_new(); $so->set_charset('gbk'); 这个不行呢? 报错 Call to undefined function scws_new() [[i] 本帖最后由 bigdown 于 2007-6-27 16:03 编辑 [/i]]
...le to load dynamic library '/Applications/AMPPS/php-5.3/lib/extensions/ext/scws.so' - dlopen(/Applications/AMPPS/php-5.3/lib/extensions/ext/scws.so, 9): no suitable image found. Did find:\n\t/Applications/AMPPS/php-5.3/lib/extensions/ext/scws.so: mach-o, but wrong architecture in Unknown on line 0 ...
ln -s /usr/local/scws/lib/libscws.so.2.0 /usr/local/scws/lib/libscws.so