... 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 */ +void scws_use_rule(scws_t s, int yes) +{ + if (yes == SCWS_YEA) + s->mode |= SCWS_USE_RULE; + + if (...
...s-1.2.1.changed > scws-1.2.1.patch 3. API Libscws - C API文档 `void scws_use_rule(scws_t s, int yes)` 设定分词结果是否忽略所有的中英文组合,强行使用字典中的词语 > **参数 yes** 1 表示不忽略,0 表示忽略,缺省情况为不忽略。 Simple...