...果我用 $so->set_dict('C:/Program Files/scws/etc/dict.xdb'); $so->set_rule('C:/Program Files/scws/etc/rules.utf8.ini'); 就会有警告: Warning: SimpleCWS::set_dict() [function.SimpleCWS-set-dict]: open_basedir restriction in effect. File(C:\Program Files\scws\etc\dict.xdb) is not within th...
make[2]: *** No rule to make target `rules_cht.utf8.ini', needed by `all-am'. Stop. make: *** [all] Error 2 报错,但是能用 [[i] 本帖最后由 Mistruster 于 2008-3-5 17:44 编辑 [/i]]
; ; auto regular ; $Id: rules.ini,v 1.3 2007/06/07 08:37:07 hightman Exp $ ; ; special word, 特殊词汇 ; [special] C++ .NET C# R&B S.H.E P&B ; ; nostats ; [nostats] about all also an and any are as at be but by both can for from have here if in is it no ...
... $so->add_dict(ini_get("scws.default.fpath") . '/dict.utf8.xdb'); $so->set_rule(ini_get('scws.default.fpath') . '/rules.utf8.ini'); 这样就加载词库失败... 路径和权限我确定没有错误.
...g,n,nr,ns,nt,nz,vn'; $limit = 5; // 这里没有调用 set_dict 和 set_rule 系统会自动试调用 ini 中指定路径下的词典和规则文件 $scws->send_text("这里没有调用 set_dict 和 set_rule 系统会自动试调用 ini"); $list = $scws->get_tops(3); settype($list,...
$cws = scws_open("gbk"); scws_set_dict($cws, "./etc/dict.xdb"); scws_add_dict($cws, "./etc/s.txt",SCWS_XDICT_TXT); scws_set_rule($cws, "./etc/rules.ini");
...cws = new PSCWS4('utf8'); $cws->set_dict('etc/dict.utf8.xdb'); $cws->set_rule('etc/rules.utf8.ini'); $ret = array(); $ret = $cws->get_tops(10,'r,v,p'); echo "No.\tWord\t\t\tAttr\tTimes\tRank\n------------------------------------------------------\n"; $i = 1; foreach ($ret as $tmp) { printf...
scws_set_dict($so, '/dict.utf8.xdb'); scws_set_rule($so, '/rules.utf8.ini'); 问题在这里!!
...; /* }}} */ [/code] 编译后 在php代码中指定 dict字典和rule规则文件就可以了 $cws->set_dict('/usr/local/scws/etc/dict_chs_utf8.xdb'); $cws->set_rule('/usr/local/scws/etc/rules.utf8.ini');
...set_charset(string charset) bool set_dict(string dict_path) bool set_rule(string rule_path) bool set_ignore(bool yes) bool set_multi(bool yes) bool send_text(string text) mixed get_result(void) mixed get_tops(void) string version(void) }; [b][size=2][color=#154ba0]例...