...*** * @file xdb.h (read only) * @author Hightman Mar * @editor set number ; syntax on ; set autoindent ; set tabstop=4 (vim) ! * $Id: xdb.h,v 1.1.1.1 2007/06/05 04:19:45 hightman Exp $ */ #ifndef _SCWS_XDB_20070525_H_ --- 2,8 ---- * @file xdb.h (read only) * @author...
... php.ini 是这样的配置 [scws] extension=scws.so scws.default.charset=utf8 scws.default.fpath=/usr/local/scws/etc 而php 是这样 //分词 $so = scws_new(); $so->set_charset('utf8'); // 这里没有调用 set_dict 和 set_rule 系统会自动试调用 ini 中指定路径下的...
我下了这个源码,看示例如下一句,scws_set_dict(s, "dict.xdb", SCWS_XDICT_XDB);可以run起来,但这种scws_set_dict(s, "dict.xdb", SCWS_XDICT_MEM);就不知在那里死了,run后没反应了? XDB模式是把词库.xdb缓存在mem中的吗? MEM格式是怎么样的策略? ...
...发斯蒂芬罗铭罗大大罗' $cws = scws_new(); $cws->set_charset('utf8'); $cws->add_dict(XDB_PATH);//系统默认词库文件地址(xdb格式)[/quote] //$cws->add_dict(XDICT_PATH, SCWS_XDICT_TXT);//我的自定义词库地址 (txt格式) $cws-...
... scws scws SCWS BugReport => http://www.ftphp.com/scws scws.default.charset => utf8 => utf8 scws.default.fpath => /usr/local/scws/etc => /usr/local/scws/etc [/php] 这是我代码: //分词 $so = scws_new(); $so->set_charset('utf8'); $rd = $so->set_dict('/usr/local/scws/etc/dict.utf8....
...) && WTERMSIG(s) == SIGSEGV}], WNOHANG|WSTOPPED, NULL) = 24901 fcntl(3, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0 write(3, "2012-05-22 19:42:29 ~master[4232"..., 86) = 86 fcntl(3, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0 wait4(-1, 0x7fff1367385c, WNOHAN...
...T, sin_port=htons(43270), sin_addr=inet_addr("110.76.46.90")}, [16]) = 197 setsockopt(197, SOL_TCP, TCP_NODELAY, [1], 4) = 0 fcntl64(197, F_SETFL, O_RDONLY|O_NONBLOCK) = 0 epoll_ctl(1, EPOLL_CTL_ADD, 197, {EPOLLIN, {u32=197, u64=197}}) = 0 time(NULL) = 1329922508 fcntl64...
...时候也会返回)。求过滤方案。 $sh = scws_open(); scws_set_charset($sh, 'utf8'); scws_set_dict($sh, './dict.txt', SCWS_XDICT_TXT); scws_set_rule($sh, './rules.ini');//文件内容为空 $cutword = $_POST['cutword']; scws_send_text($sh, $cutword); $rs = scws_get_tops($sh, 5); ...
... XS('demo');时出错如下: [XSErrorException] lib/XS.php(2210): stream_set_blocking(): supplied argument is not a valid stream resource(2) #0 /usr/local/xunsearch/sdk/php/lib/XS.php(2210): xs_error_handler(2, 'stream_set_bloc...', '/usr/local/xuns...', 2210, Array) #1 /usr/local/xunsearch/sdk/ph...
...s.c 2013-07-03 10:38:49.409846632 +0800 @@ -60,6 +60,9 @@ s->mblen = charset_table_get(NULL); s->off = s->len = 0; s->wend = -1; + + /* set default, shuying.lee adds it */ + scws_use_rule(s, 1); return s; } @@ -141,6 +144,16 @@ s->mode &= ~SCWS_IGN_SYMBOL; } +/* shuying.lee adds it...