...不准确。 其实在scws文档中有这么一句话: [i][b]注:xdict_t 和 rule_t 分别是词典和规则集的指针,可判断其是否为 NULL 来判断加载的成功与失败。[/b][/i] 调用函数 scws_add_dict() ,scws_set_rule()来加载词库和规则集, 这两个函数...
...libscws,每一个线程都需要进行分词? typedef struct { xdict_t d; rule_t r; unsigned char *mblen; unsigned int mode; unsigned char *txt; int zis; int len; int off; int wend; scws_res_t res0; scws_res_t res1; word_t **wmap; struct scws_zchar *zmap; } scws_st...
...T use two or more times in one line, Non-ThreadSafe */ word_t xdict_query(xdict_t xd, const char *key, int len); xdict_query() 不是线程安全的? 看代码xdict_query()是线程安全的,并没有使用全局变量和静态数据,只是返回值可能是指向一块动态内存,...
...cws_st 结构,不保证这类拷贝结果会有用。 typedef struct { xdict_t d; rule_t r; unsigned char *mblen; unsigned int mode; unsigned char *txt; int len; int off; scws_res_t res0; scws_res_t res1; word_t **wmap; struct scws_zchar *zmap; } scws_st, *scws_t; struct scws...