...p extension 遇到些问题求解答: 问题1: scws.so是在 /usr/local/lib/php/extensions/no-debug-non-zts-20060613/scws.so 我的php.ini中 extension_dir = "./"。 是不是应该改成extension_dir空白: extension_dir ="" 还是 extension_dir = "/usr/local/lib/php/extensions/no-d...
...? $cws = scws_new(); $cws->set_charset('gbk'); $cws->set_rule('/usr/local/scws/etc/rules.ini'); $cws->set_dict('/usr/local/scws/etc/dict.xdb'); $cws->send_text('我爱看电影,不知道电影院里有什么?'); 分词的结果竟是:“我 爱 看 电 影 , 不 知 道 电 影 ...
... } scws_set_charset(s, "gbk"); scws_set_dict(s, "/usr/local/scws/etc/dict.xdb", SCWS_XDICT_XDB); scws_set_rule(s, "/usr/local/scws/etc/rules.ini"); for(i = 0; i < 1000000; i++){ scws_send_text(s, text, strlen(text)); while (res = cur = scws_get_...
... exit(-1); } scws_set_charset(s, "gbk"); scws_set_dict(s, "/usr/local/scws/etc/dict.xdb", SCWS_XDICT_XDB); scws_set_rule(s, "/usr/local/scws/etc/rules.ini"); scws_send_text(s, text, strlen(text)); while (res = cur = scws_get_result(s)) { while (cur != NULL) { ...
...使用示例代码: #include #include #define SCWS_PREFIX "/usr/local/scws" main() { scws_t s; scws_res_t res, cur; char *text = "Hello, 我名字叫李那曲是一个中国人, 我有时买Q币来玩, 我还听说过C#语言"; if (!(s = scws_new())) { printf("ERROR...
...,我根据 安装说明 编译出这个 scws.so 文件,本位于 /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/ 目录下,我把 scws.so 复制到 /modules 目录下。 php.ini中,extension_dir = "/usr/lib/php/modules",mysql.so 等这些都放在这里,我把它改成 "...
... test extension: 提示我没有载入...不过我的scws.so放在了/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/scws.so php.ini放在了/user/local/php5/lib/php.ini 不知道怎么回事...怎么才能载入呢?
...gcc 时 我改了include路径,因为我看到scws.h实际是在‘/usr/local/scws/include/scws' 里面,而不是文档写的‘/usr/local/scws/include/scws’。见图clikok.jpg)
自定义词库加载不上,是什么原因呢? $cws = scws_new(); $cws->set_charset('utf8'); $cws->set_dict('/usr/local/scws/etc/dict.utf8.xdb'); $cws->set_dict(BASE_PATH.'admin/data/dict/wo.txt',SCWS_XDICT_TXT);
...(s, "gbk"); scws_set_multi(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)) { ...