...ypj\scws\libscws\xtree.c(304): warning C4028: 形参 2 与声明不同 1> xdict.c 1>f:\mypj\scws\libscws\xdict.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 1>f:\mypj\scws\libscws\xdict.c(100): warnin...
...dict.utf8.xdb'); if($this -> so->add_dict('mydict_utf8.txt', SCWS_XDICT_TXT)) { echo 'ok'; } else { echo 'no'; } $this -> so->set_rule('rules.utf8.ini'); } function word_list($text) { $time_start = $this -> get_microtime(); $this -> so->send_text...
...ath") . '/dict.utf8.xdb'); $so->add_dict("/usr/myapp/dict_extra.txt",SCWS_XDICT_TXT); $so->set_rule(ini_get('scws.default.fpath') . '/rules.utf8.ini'); // $so->set_duality(0); $so->set_ignore(0); $so->set_multi(0); 就是不行. 我也怀疑是词库加不上的问题.这个问题太奇...
...i(s, 1); scws_set_dict(s, "/usr/local/etc/dict_chs_gbk.xdb", SCWS_XDICT_MEM); scws_set_rule(s, "/usr/local/etc/rules.ini"); scws_send_text(s, text, strlen(text)); while (res = cur = scws_get_result(s)) { while (cur) { ...
...trncmp(a,"nz",2) == 0) { \ word_t w; \ w = xdict_query(s->d, s->txt + o, l); \ if(w == NULL) \ strncpy(res->attr, a, 2); \ else { \ strncpy(res->attr,w->attr,2); \ if (w->flag & SCWS_WORD_MALLOCED) \ free(w); \ } \ } else { \ ...
... scws_set_dict(s,argv[1],SCWS_XDICT_XDB); scws_set_rule(s,argv[2]); text = argv[3]; ...
...harset(s, "utf-8"); scws_set_dict(s, "/usr/local/etc/dict.utf8.xdb", SCWS_XDICT_XDB); scws_set_rule(s, "/usr/local/etc/rules.utf8.ini"); scws_set_multi(s , 1); scws_send_text(s, text, strlen(text)); while (res = cur = scws_get_result(s)) { while (cur != NULL) { printf("Word: %.*s/%s ...
...(s, "utf8"); scws_set_dict(s, "/usr/local/scws/etc/dict.utf8.xdb", SCWS_XDICT_XDB); scws_set_rule(s, "/usr/local/scws/etc/rules.utf8.ini"); scws_send_text(s, text, strlen(text)); while (res = cur = scws_get_result(s)) { while (cur != NULL) { printf("WORD: %.*s/%s (I...
...ws/scws.h 2013-07-03 10:38:52.368809435 +0800 @@ -17,6 +17,7 @@ #include "xdict.h" #define SCWS_IGN_SYMBOL 0x01 +#define SCWS_USE_RULE 0x02 // shuying.lee adds it //#define SCWS_SEG_MULTI 0x02 //#define SCWS_XDB_USAGE 0x04 #define SCWS_DEBUG 0x08 @@ -97,6 +98,7 @@ /* set ignore symbo...