...cws.default.charset => utf8 => utf8 scws.default.fpath => /usr/local/scws/etc => /usr/local/scws/etc [/code] 2. 测试 PHP代码 [code] [hightman@d1 hightman]$ cat 1.php
...line='1247908926'] Notice: Undefined variable: mask in C:\wamp\www\pscws4\etc\xdb.class.php on line 138 Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 1642825009 bytes) in C:\wamp\www\pscws4\etc\xdb.class.php on line 638 这两个问题我试过多次,还是...
...ct.utf8.xdb,dict.xdb和dict_cht.utf8.xdb,我可以把这几个都装到etc文件夹里么?还有那几个ini文件也是一样的问题。 我已经在php.ini中这样配置了: extension = php_scws.dll scws.default.charset = gbk scws.default.fpath = "E:/APMServ5.2.0/scws/etc" 就不需...
...ct字典和rule规则文件就可以了 $cws->set_dict('/usr/local/scws/etc/dict_chs_utf8.xdb'); $cws->set_rule('/usr/local/scws/etc/rules.utf8.ini');
...er Value scws.default.charset utf8 utf8 scws.default.fpath /usr/local/scws/etc /usr/local/scws/etc[/code]
HI,hightman $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 $...
... = scws_new(); $cws->set_charset('gbk'); $cws->set_rule('/usr/local/scws/etc/rules.ini'); $cws->set_dict('/usr/local/scws/etc/dict.xdb'); $cws->send_text('我爱看电影,不知道电影院里有什么?'); 分词的结果竟是:“我 爱 看 电 影 , 不 知 道 电 影 院 里 有 ...
$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能否直接把词加入核心词库了啊?比如直接加...
... PSCWS4('utf-8'); $pscws->set_ignore('yes'); $pscws->set_dict('E:/scws/etc/dict.utf8.xdb'); $pscws->set_rule('E:/scws/etc/rules_cht.utf8.ini'); // 分词调用 send_text() 将待分词的字符串传入, 紧接着循环调用 get_result() 方法取回一系列分好的词 // 直到 get_resu...
...cws-0.0.1-pre/src# valgrind --tool=memcheck --leak-check=yes ./scwsc -r ../etc/rules.ini -d ../etc/dict.xdb -i "有用过NTFS的朋友抱怨" ==30624== Memcheck, a memory error detector. ==30624== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==30624== Using LibVEX rev 1658, a l...