...e($sh, './rules.ini');//文件内容为空 $cutword = $_POST['cutword']; scws_send_text($sh, $cutword); $rs = scws_get_tops($sh, 5); 另:我使用工具把默认的.xdb转化成.txt后在使用scws_get_tops()方法(字母+数据要大于8个才返回)。 我的邮箱lee1984@qq.com 新...
... = "我是一个中国人,我会C++语言,我也有很多T恤衣服"; scws_send_text($sh, $text); $top = scws_get_tops($sh, 5); print_r($top); 我用的是 php_scws.dll (1.1.5) [For PHP-5.2.x (44KB)]
..._rule($sh, 'rules.ini'); $text = "我发现个文字‘再试一个’"; scws_send_text($sh, $text); $top = scws_get_tops($sh, 5); print_r($top); [/php] dict.txt的内容为: # WORD TF IDF ATTR 再试一个 1.0 1.0 @ 可结果中并匹配到"再试一个",这是为什么? 另...
... ac dc转换器 智能城市未来好的发展abb压力变送器看看"; scws_send_text($sh, $text); $top = scws_get_tops($sh, 5); print_r($top); dict.txt 词不多时候没事 3000-4000没事 但是里面词 在多些 apache 出现 假死的状态 请问啥问题 dict.txt是不能包含 ...
.../local/scws/etc/rules.ini"); for(i = 0; i < 1000000; i++){ scws_send_text(s, text, strlen(text)); while (res = cur = scws_get_result(s)) { while (cur != NULL) { printf("Word: %.*s/%s (IDF = %4.2f)\n", ...
...set_rule($so, 'rules.ini'); scws_set_dict($so, 'a.txt', SCWS_XDICT_TXT); scws_send_text($so, $txt); $result = scws_get_tops($so, strlen($txt)); print_r($result); [/php] 第一次运行的结果:([color=#FF0000][b]正常[/b][/color]) Array ( [0] => Array ( [...
...e($sh, './rules.ini');//文件内容为空 $cutword = $_POST['cutword']; scws_send_text($sh, $cutword); $rs = scws_get_tops($sh, 5); 另:我使用工具把默认的.xdb转化成.txt后在使用scws_get_tops()方法(字母+数据要大于8个才返回)。 我的邮箱lee1984@qq.com 新手!...
...CWS_XDICT_XDB); scws_set_rule(s, "/usr/local/scws/etc/rules.ini"); scws_send_text(s, text, strlen(text)); while (res = cur = scws_get_result(s)) { while (cur != NULL) { printf("Word: %.*s/%s (IDF = %4.2f)\n", cur->len, text+cur->off, cur->attr, cur->idf); ...
...harset(s, "utf8"); scws_set_dict(s, "/etc/dict.utf8.xdb", SCWS_XDICT_XDB); scws_send_text(s, text, strlen(text)); cur = top = scws_get_tops(s, 10, NULL); while (cur != NULL) { printf("WORD: %s, weight:%.2f, times:%d, attr:%.2s\n", cur->word, cur->weight, cur->times, cur->attr); cur = cur->next; ...
...rset(s, "utf8"); scws_set_dict(s, "/etc/dict.utf8.xdb", SCWS_XDICT_XDB); scws_send_text(s, text, strlen(text)); cur = top = scws_get_tops(s, 10, NULL); while (cur != NULL) { printf("WORD: %s, weight:%.2f, times:%d, attr:%.2s\n", cur->word, cur->weight, cur->times, cur->attr); cur = cur->n...