[quote='backluck' pid='3650' dateline='1280380226'] [quote]int scws_has_word(scws_t s, char *xattr) { int off, cnt, xmode = SCWS_NA; scws_res_t res, cur; char *word; word_attr *at = NULL; if (!s || !s->txt) return 0; __PARSE_XATTR__; // save th...
好象IP地址也分了.比如:192.168.0.1,结果是: No. WordString Attr Weight(times) ------------------------------------------------- 01. 192.168 en 4.86(1) 02. 0.1 en 2.75(1) http://www.163.com No. WordString A...
[php] header("Content-type: text/html; charset=utf-8"); var_dump(SCWS('中文分词解析,我的个神啊')); //中文分词解析 function SCWS($title) { set_time_limit(0); $data = array("data"=>$title,"respond"=>"json","ignore"=>'yes', "multi"=>3); $data = http_build_query($data); $r...
... timeout (TIMEOUT:5) 2012-05-23 09:57:04 worker3[21903] [sock:130] end the scws (RC:131, CONN:0xad577d0) 2012-05-23 09:57:09 worker1[20683] caught SIGINT, shutdown gracefully 2012-05-23 09:57:09 worker1[20683] get NULL pointer from pipe, shutdown gracefully 2012-05-23 09:57:09 worker1[20683] event s...
...是采用 C/C++ 开发多线程服务端,索引设计基于 Xapian 和 scws 中文分词。单库最多支持 40 亿条数据,在 500 万网页大约 1.5TB 的数据中检索时间不超过 1 秒(非缓存)。 [b]简单易用:[/b]前端是使用脚本语言编写的开发工具 (SDK),目...
...可以自己打一下补丁然后重新编译即可。 [code] Index: libscws/scws.c RCS file: /home/cvsroot/scws/libscws/scws.c,v retrieving revision 1.18 retrieving revision 1.19 diff -c -r1.18 -r1.19 *** libscws/scws.c 22 Oct 201...
[quote]int scws_has_word(scws_t s, char *xattr) { int off, cnt, xmode = SCWS_NA; scws_res_t res, cur; char *word; word_attr *at = NULL; if (!s || !s->txt) return 0; __PARSE_XATTR__; // save the offset. (cnt -> return_value) off = s->off; ...
我也需要这样的问题,我的是FreeBSD8.0 test.c都通不过,提示找不到scws.h 不知改如何解决啊。
...(这是1.1.0起新加的功能,所以1.0.x的版本无此bug) #define SCWS_WORD_MALLOCED 0x100 只要将 0x100 改变 0x80 即可,因为 struct scws_word 中定义的 flag 为 unsigned char 即 8bit, 容不下 0x100 导致,所有的 ->flag |= SCWS_WORD_MALLOCED 失效,以至于在 scws.c ...