Giter Site home page Giter Site logo

hightman / scws Goto Github PK

View Code? Open in Web Editor NEW
1.6K 1.6K 348.0 7.07 MB

开源免费的简易中文分词系统,PHP分词的上乘之选!

Home Page: http://www.xunsearch.com/scws/

License: Other

Shell 0.21% C 30.45% PHP 67.61% Perl 0.41% Makefile 0.38% M4 0.90% Hack 0.04%

scws's People

Contributors

bearlin avatar dseguy avatar hightman avatar jaiminpan avatar lishunan246 avatar weakish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scws's Issues

Mingw编译安装SCWS报错

我需要在postgresql中集成中文全文检索功能,按照网站建议利用Mingw编译安装SCWS,
./configure时没有问题;
make install结果报错:
in file included from scws.c:13:0:
config_win32.h:19:19: error:expected identifier or '<' before 'float'
#define logf(x) ((float) log((double)(x)))
...
是在找不到错误在哪,请指点下,万分感谢了

Problem string

I have uncovered a problem with certain strings in scws. The simplest example I can find is "oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo", which causes an error on http://www.xunsearch.com/scws/demo/v48.php.

But if I remove a single character from the problem string, then it succeeds.

php 5.4中安装不了

php -m 的出错提示
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/scws.so' - /usr/lib64/php/modules/scws.so: undefined symbol: php_checkuid in Unknown on line 0

操作系统是CentOS7.
这个项目的源码是好几年前的了,是不是该更新了?作者还维护吗?

请教一下,我想知道作者这词库是手工打的吗?

“采用的是自己采集的词频词典,并辅以一定的专有名称,人名,地名, 数字年代等规则识别来达到基本分词”请教这几十万的词库你是如何操作的?怎么个采集法?难道是手工打上去的?

centos 7 编译出错了

[root@localhost phpext]# ./configure --with-scws=/usr/local --with-php-config=/usr/local/php7/bin/php-config
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local/php7
checking for PHP includes... -I/usr/local/php7/include/php -I/usr/local/php7/include/php/main -I/usr/local/php7/include/php/TSRM -I/usr/local/php7/include/php/Zend -I/usr/local/php7/include/php/ext -I/usr/local/php7/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012
checking for PHP installed headers prefix... /usr/local/php7/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.16 (ok)
checking for gawk... gawk
checking for scws support... yes, shared
checking for scws.h... no
configure: error: Please download and install scws from http://www.xunsearch.com/scws

编译php 7.0
请问这是什么原因呢?

No word segmentation

I've downloaded and compiled scws (Ubuntu 14.04).

If I run it at the commandline, I get no segmentation:

$ scws -c utf8 '她令人紧张不 安。'
她  令  人  紧  张  不  安 。

instead of what I would expect (and which I get on the webdemo):

她  令人  紧张  不  安 。

Do I need to do anything else to configure scws?

添加新词

hightman您好
我的代码如下:
set_charset('utf8'); $so->set_dict('C:\scws\etc\dict.utf8.xdb'); $so->set_rule('C:\scws\etc\rules.ini'); $so->add_dict('C:\scws\etc\dict_extra.txt',SCWS_XDICT_TXT); $so->send_text("兆民云计算科技有限公司成立于2009年,是一家专注于云计算研究和开发的高新技术企业,也是**领先的电信互联网基础设施服务提供商之一,为上海云海产业联盟首批成员,总部位于上海,并在天津、北京、云南等地拥有子公司。兆民云计算汇聚了国内外顶尖的研发人员,并与知名科研机构、学者缔结战略合作,具有雄厚的科研实力。秉承'造福于民'的理念,兆民云计算致力于为广大用户提供优质、高效、专业、稳定的云服务,推出了桌面云、云电脑、云存储、云主机等一系列产品。并依托兆民云计算IaaS平台,结合各细分行业的需求,量身定制了'教育云'、'高校云实验室',''矿山安全云'、'食品安全云'、'零售云'、'中小企业信息化云'等完整的行业解决方案,先后获得国家中小企业信息化公共服务平台、双软企业认定等一系列荣誉和资质。"); while ($tmp = $so->get_result()) { print_r($tmp); } $so->close(); ?>
我在dict_extra.txt添加了“云计算”这个词,但是分词的时候仍旧会被分为“云 计算”,请问是什么问题,谢谢

vc6.0编译时找不到

VC6.0编译时找不到php.h头文件,手动添加后需要config.win32.h,但php 5.4以上版本没有

对于上海这个词分词误差很大

上海信歌网络科技有限公司
上海科梵因信息技术有限公司
上海维影网络技术有限公司
上海灵意信息工程有限公司
上海富优特商务公司
上海国椎网络科技有限公司
上海富兆网络科技有限公司
上海华网网络科技有限公司
上海宇晌商贸有限公司
上海联筑建筑设计顾问有限公司
上海景泓传媒有限公司
上海科聚缘网络科技公司
上海洋滔企业形象策划有限公司
上海亚企电子商务有限公司
上海天未信息科技有限公司
上海浦科网络科技有限公司
上海鼎禧信息技术有限公司
上海鼎图文制作服务社
上海众途网络信息技术有限公司杭州分公司
上海联搜网络信息技术有限公司
上海航欣信息科技有限公司
上海天韵建筑装饰工程公司
上海梅东信息技术有限公司
上海浪鳌计算机有限公司
上海鼎点广告有限公司
上海宇炫网络有限公司
**上海亚财科技贸易有限公司
上海伯丰广告有限公司
上海天纳信息科技有限公司
上海子色广告有限公司
上海金平台教育咨询有限公司
裕德科技有限公司 上海代表处
上海欣科网络有限公司
上海丽德软件开发有限公司
上海星杰建筑装饰有限公司
上海水经筑建筑设计有限公司
上海众视美术设计公司
上海信洋电子科技有限公司
上海华虹计通智能卡系统有限公司
上海天擎信息科技有限公司
上海雅世易得装饰设计公司
上海霸龙有限公司
上海诺品装饰设计有限公司
上海科聚缘网络有限公司
上海天耀贸易有限公司
上海鼎康文化艺术发展有限公司
上海信基广告公司
上海鑫高古建筑装潢有限公司
上海众托科技有限公司
上海泽旗网络科技有限公司
上海富优特商务咨询有限公司厦门分公司
上海诺世网络科技有限公司
上海迪松信息技术有限公司
上海天毅服务有限公司
上海科得客思信息技术有限公司
上海特蓝信息科技有限公司
上海青慧教育软件科技有限公司
上海贝生动画设计有限公司
上海潮趣网络科技有限公司
上海众移互联网络公司
上海瑞野营销策划有限公司市场部
上海鼎涛公关策划有限公司 项目部
上海鼎涛公关策划有限公司 项目部
上海红威网络公司
上海维肖建筑装饰设计有限公司
上海雅和建筑材料有限公司
上海国榷网络科技有限公司
上海天伟纺织质量技术服务有限公司
上海欣越服饰有限公司销售部
上海丽巧服饰有限公司
上海丽绨贸易有限公司
上海月沁商贸有限公司
上海清熙服装设计有限公司
上海鑫世达企业登记代理事务所公司
上海强生国际进出口有限公司
上海雅茗服装有限公司
上海鸿逞科技有限公司销售部
上海国创纸业有限公司
上海霞清制衣工作室
上海浦东明明服饰公司
上海隆洋服饰有限公司
上海峰英服饰有限公司虹口批发部
上海红鹭服饰有限公司
上海水蓝格服饰有限公司
上海逸尚信息咨询有限公司嘉兴分部
上海科鼎反光材料有限公司 服装部
上海科鼎反光材料有限公司 服装部
上海逸尚信息资讯有限公司
上海逸尚信息咨询有限公司
上海富典服饰有限公司
上海亚旭服饰有限公司武汉分公司
上海雅宏投资咨询有限公司
上海联浩图文制作有限公司
上海光宏广告工程有限公司
上海道珂翻译服务有限公司
上海亚茄文化传播有限公司
上海服装集团进出口有限公司
上海丽固门窗有限公司
上海光动传媒有限公司
上海德鑫广告有限公司
上海雅卓广告有限公司业务部
上海泽如广告有限公司
上海城发会展有限公司
上海迪耀标识有限公司
上海力神广告有限公司
上海富钧文化传播有限公司
上海鑫润石油化工有限公司
上海特睿文化艺术策划有限公司
上海天从印刷有限责任公司
上海迪轩陈列展示设计制作有限公司市场部
上海狮鹫广告有限公司
上海欣万广告有限公司
法国梵迪葆雅化妆品上海总部
上海正举策划责任有限公司
上海城迹网络科技有限公司
上海亭立广告有限公司
上海狮驰文化文化传播有限公司
上海亚舟标志标牌有限公司
上海国杰广告有限公司
上海景想传媒广告有限公司成都分公司
上海信贺企业管理咨询有限公司
上海德搜信息技术有限公司技术部
上海天之爱广告有限公司
上海鑫凌广告制作有限公司
上海天舒广告有限公司经营部
上海星航文化传媒有限公司
上海星翼音乐工作室
上海天代文化传播有限公司
上海科烁文化传播有限公司
上海佳龙广告有限公司
上海光典文化传播有限公司
上海天念广告有限公司
上海德搜信息技术有限公司销售一部
上海佳月音文化传播有限公司
上海邦特尔艺铭文化影视广告传媒有限公司
上海信页广告有限公司
上海佳蓓展览有限公司
上海景上数码科技有限公司
上海石拓展览展示服务有限公司
上海城唐数码科技有限公司
上海精视文化传播有限公司
上海狮驰文化传播有限公司
上海洋思科技网友有限公司
上海鑫诚广告有限公司
上海国杰数码喷画制作有限公司
安徽大墅镇人民政府驻上海办事处
马来西亚MMT私人有限公司上海代表处
马来西亚MMT私人有限公司上海代表处
上海天映多媒体有限公司
上海正天文化传播有限公司
上海葵友广告有限公司
上海华异数码科技有限公司
上海联帅展览展示服务有限公司
上海秀森战略品牌策划中心
上海心彩图文广告公司
上海暾驰文化传播有限公司
上海天晓会展服务有限公司
魅力上海行湮工作室
上海天承广告有限公司
上海鼎佳广告有限公司
上海森夏资讯泰兴分公司
上海力昌信息科技有限公司
上海鸿舟广告有限公司
上海天依力信息技术服务有限公司
上海国顺广告制作有限公司
上海天从有效策划有限公司
上海宇树文化传播有限公司
上海港凯广告公司
上海林之雅广告有限公司
上海东方民间艺术有限公司
上海天柔婚庆礼仪服务公司
上海雅辉展览服务有限公司
上海众骋文化传播公司
上海川吉展览安装有限公司
上海浦东国际展览公司招商部
上海风临会展篷房有限公司
上海盟轩会展酒店预订公司
上海寰美会务服务有限公司
上海欣辰文化传播有限公司
上海天艺视听设备有限公司
上海潮仁装饰工程有限公司
上海雅辉展览服务有限公司
上海逸弛会务会展服务社

以上只是过滤的一部分错误语料,类似的情况还有很多,绝大部分地名都可以识别,就是上海的问题比较大

FreeBSD10下编译出错

/bin/sh /usr/src/scws-1.2.2/phpext/libtool --mode=link cc -DPHP_ATOM_INC -I/usr/src/scws-1.2.2/phpext/include -I/usr/src/scws-1.2.2/phpext/main -I/usr/src/scws-1.2.2/phpext -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include/scws -DHAVE_CONFIG_H -g -O2 -o ./scws.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/src/scws-1.2.2/phpext/modules php_scws.lo -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lscws
cc -shared .libs/php_scws.o -L/usr/local/lib /usr/local/lib/libscws.a -Wl,-rpath -Wl,/usr/local/lib -Wl,-soname -Wl,scws.so -o ./.libs/scws.so
/usr/bin/ld: /usr/local/lib/libscws.a(scws.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libscws.a: could not read symbols: Bad value
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make: stopped in /usr/src/scws-1.2.2/phpext

环境FreeBSD 10.1 PHP5.6

自定义词条的中英数混合分词问题

自定义了一个词库,下面是词条内容

WORD TF IDF ATTR

京基ab 1.00 1.00 @^@
京基1 1.00 1.00 @^@
京基a 1.00 1.00 @^@
京基1ab 1.00 1.00 @^@
京基1a 1.00 1.00 @^@
京基100 1.00 1.00 @^@

测试代码:

set_charset('utf8'); //编码 $so->set_dict('/home/ira/www/farm.ira.orantrip.com/tmp/article/all.xdb'); $so->set_ignore(false); $so->set_ignore(true); //忽略标点符号 $so->send_text($text); print_r($so->get_words('@')); ?>

回传内容:
Array
(
[0] => Array
(
[word] => 京基1
[times] => 1
[weight] => 1
[attr] => @
)

[1] => Array
    (
        [word] => 京基a
        [times] => 1
        [weight] => 1
        [attr] => @
    )

[2] => Array
    (
        [word] => 京基1a
        [times] => 1
        [weight] => 1
        [attr] => @
    )

[3] => Array
    (
        [word] => 京基ab
        [times] => 1
        [weight] => 1
        [attr] => @
    )

)

需要被分词出来的京基100没有被分出来,英文数字总和大于2的词条也没有被分出,是否有什么设置可以处理这个问题?谢谢。

导入分词的php工具为啥报错呢

将xdb导出成txt是可以的,但是再导回去就会包notice错误数据下标未定义啥的,

qq 20160711191559

看了下代码make_xdb_file.php
这个$word并不会是一个数组吧
qq 20160711191541

Enlgish word segmentation doesn't work.

I try to segment the word "happy birthday to you"

SCWS always return me only 1 array.

array(1) { [0]=> array(5) { ["word"]=> string(5) "happy" ["off"]=> int(0) ["len"]=> int(5) ["idf"]=> float(4.02359485626) ["attr"]=> string(2) "en" } }

How to fix this issue?

Thanks.

Ps. Chinese word segmentation works good.
Version: 1.2.2

解压XDB之后权限问题导致分词错误

我是centos6.4的系统,使用root权限下载utf8 gbk两个xdb文件之后,将官方的demo拷贝回来测试发现分词和官方不一致
“我是一个**人,我会C++语言,我也有很多T恤衣”
除了“一个”被分词了,其他全部是单字,后来发现XDB的权限很奇怪
-rw------- 1 501 games 13245765 1月 8 2013 dict.xdb
chown root:root dict.xdb
chmod 644 dict.xdb

UTF同上
修改之后测试就和官方一致了
记录在这里,希望能帮助到其他人^_^

windows下出现的扩展编译问题_solved

Updated

根据@Timandes的提示,解决了编译的问题,具体做法如下:

1.搭建环境,我本机为VS2012+编译好的PHP5.5.35+php-sdk-binary-tools+deps-5.5-vc11-x64+zlib,需求是php5.5在windows x64系统下,线程安全模式的扩展;
2打开win32下的scws.sln,接受升级建议;
3配置管理器中,新建活动解决平台方案为X64,自win32复制设置,活动解决方案配置,新建PHP55,从Release_PHP54复制设置;
4修改scws项目属性->C\C++->常规的附加包含目录为编译好的php,main,zend和TSRM,链接器常规中选择附加库的目录为你本机的,输出文件目录及名称也可自定;
5.将libscws文件夹中的xdict.h编码改为ANSI(UTF-8也可),否则会出现一些未定义问题;
6.注释掉config_w32.h中关于logf的定义;此处为重复定义,此时libscws应可以编译;
7.scws项目属性->C\C++->预处理器,删除_USE_32BIT_TIME_T;此处如删除ZTS项,编译出来的应该是NTS版本;此时scws应可以编译;
8.编译libscws和scws项目,出现的warning并不影响最终结果。

感谢@hightman@Timandes,对于我这个几乎是零C基础的人,这是个不错的结果了。

您好!
以WIN10 x64+vs2012搭建的环境,为php5.5.35编译php_scws.dll扩展,nmake出现如下错误:
正在创建库 x64\Release_TS\php_scws.lib 和对象 x64\Release_TS\php_scws.exp
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_new,该符号在函数 _php_crate_scws 中被引用
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_free,该符号在函数 php_scs_dtor 中被引用
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_add_dict,该符号在函数 _zal_copy_ctor 中被引用
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_set_dict,该符号在函数 _zal_copy_ctor 中被引用
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_set_charset,该符号在函数_zval_copy_ctor 中被引用
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_set_rule,该符号在函数 _zal_copy_ctor 中被引用
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_set_ignore,该符号在函数 zval_copy_ctor 中被引用
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_set_multi,该符号在函数 _val_copy_ctor 中被引用
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_set_duality,该符号在函数_zval_copy_ctor 中被引用
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_send_text,该符号在函数 _val_copy_ctor 中被引用
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_get_result,该符号在函数 zval_copy_ctor 中被引用
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_free_result,该符号在函数_zval_copy_ctor 中被引用
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_get_tops,该符号在函数 _zal_copy_ctor 中被引用
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_free_tops,该符号在函数 _val_copy_ctor 中被引用
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_get_words,该符号在函数 _val_copy_ctor 中被引用
php_scws.obj : error LNK2019: 无法解析的外部符号 scws_has_word,该符号在函数 _zal_copy_ctor 中被引用
x64\Release_TS\php_scws.dll : fatal error LNK1120: 16 个无法解析的外部命令
NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio 110\VC\BIN\amd64\cl.exe"”: 返回代码“0x2”
Stop.

不知问题出在何处,如能指教,不胜感激!

windows下VC11编译php5.6.19的scws1.2.3出错。

操作系统: windows 10
VS: Visual studio 2012
PHP: php 5.6.19
SCWS: 1.2.3

按照文档里写的配置了编译环境,但是出错。提示如下:

1>------ 已启动生成: 项目: libscws, 配置: Debug Win32 ------
1> xtree.c
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xtree.c : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xtree.c(304): warning C4090: “函数”: 不同的“const”限定符
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xtree.c(304): warning C4028: 形参 1 与声明不同
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xtree.c(304): warning C4028: 形参 2 与声明不同
1> xdict.c
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdict.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
1>d:\php-sdk\phpdev\vc11\x86\php-5.6.19-src\win32\unistd.h(3): error C2054: 在“PHPAPI”之后应输入“(”
1>d:\php-sdk\phpdev\vc11\x86\php-5.6.19-src\win32\unistd.h(3): error C2085: “usleep”: 不在形参表中
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\types.h(61): error C2085: “_ino_t”: 不在形参表中
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\types.h(65): error C2085: “ino_t”: 不在形参表中
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\types.h(74): error C2085: “_dev_t”: 不在形参表中
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\types.h(78): error C2085: “dev_t”: 不在形参表中
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\types.h(87): error C2085: “_off_t”: 不在形参表中
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\types.h(91): error C2085: “off_t”: 不在形参表中
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(27): warning C4079: 意外的标记“字符串”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(27): warning C4081: 应输入“newline”;找到“)”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(85): error C2016: C 要求一个结构或联合至少有一个成员
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(85): error C2061: 语法错误: 标识符“_dev_t”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(86): error C2061: 语法错误: 标识符“st_ino”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(86): error C2059: 语法错误:“;”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(91): error C2061: 语法错误: 标识符“st_rdev”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(91): error C2059: 语法错误:“;”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(92): error C2061: 语法错误: 标识符“st_size”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(92): error C2059: 语法错误:“;”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(96): error C2059: 语法错误:“}”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(101): error C2016: C 要求一个结构或联合至少有一个成员
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(101): error C2061: 语法错误: 标识符“_dev_t”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(102): error C2061: 语法错误: 标识符“st_ino”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(102): error C2059: 语法错误:“;”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(107): error C2061: 语法错误: 标识符“st_rdev”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(107): error C2059: 语法错误:“;”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(108): error C2061: 语法错误: 标识符“st_size”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(108): error C2059: 语法错误:“;”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(109): error C2371: “st_atime”: 重定义;不同的基类型
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(93) : 参见“st_atime”的声明
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(110): error C2371: “st_mtime”: 重定义;不同的基类型
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(94) : 参见“st_mtime”的声明
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(111): error C2371: “st_ctime”: 重定义;不同的基类型
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(95) : 参见“st_ctime”的声明
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(112): error C2059: 语法错误:“}”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(117): error C2016: C 要求一个结构或联合至少有一个成员
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(117): error C2061: 语法错误: 标识符“_dev_t”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(118): error C2061: 语法错误: 标识符“st_ino”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(118): error C2059: 语法错误:“;”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(123): error C2061: 语法错误: 标识符“st_rdev”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(123): error C2059: 语法错误:“;”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(128): error C2059: 语法错误:“}”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(131): error C2016: C 要求一个结构或联合至少有一个成员
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(131): error C2061: 语法错误: 标识符“_dev_t”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(132): error C2061: 语法错误: 标识符“st_ino”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(132): error C2059: 语法错误:“;”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(137): error C2061: 语法错误: 标识符“st_rdev”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(137): error C2059: 语法错误:“;”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(138): error C2061: 语法错误: 标识符“st_size”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(138): error C2059: 语法错误:“;”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(139): error C2371: “st_atime”: 重定义;不同的基类型
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(93) : 参见“st_atime”的声明
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(140): error C2371: “st_mtime”: 重定义;不同的基类型
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(94) : 参见“st_mtime”的声明
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(141): error C2371: “st_ctime”: 重定义;不同的基类型
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(95) : 参见“st_ctime”的声明
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(142): error C2059: 语法错误:“}”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(145): error C2016: C 要求一个结构或联合至少有一个成员
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(145): error C2061: 语法错误: 标识符“_dev_t”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(146): error C2061: 语法错误: 标识符“st_ino”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(146): error C2059: 语法错误:“;”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(151): error C2061: 语法错误: 标识符“st_rdev”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(151): error C2059: 语法错误:“;”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(153): error C2371: “st_atime”: 重定义;不同的基类型
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(93) : 参见“st_atime”的声明
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(154): error C2371: “st_mtime”: 重定义;不同的基类型
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(94) : 参见“st_mtime”的声明
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(155): error C2371: “st_ctime”: 重定义;不同的基类型
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(95) : 参见“st_ctime”的声明
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(156): error C2059: 语法错误:“}”
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.inl(53): error C2027: 使用了未定义类型“stat”
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(100) : 参见“stat”的声明
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.inl(53): error C2027: 使用了未定义类型“_stat64i32”
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(130) : 参见“_stat64i32”的声明
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.inl(58): error C2027: 使用了未定义类型“stat”
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(100) : 参见“stat”的声明
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.inl(58): error C2027: 使用了未定义类型“_stat64i32”
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(130) : 参见“_stat64i32”的声明
1>d:\program files (x86)\microsoft visual studio 11.0\vc\include\sys\stat.h(246): warning C4161: #pragma pack(pop...) : 出栈的比入栈的多
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdict.c(117): error C2079: “st1”使用未定义的 struct“stat”
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdict.c(117): error C2079: “st2”使用未定义的 struct“stat”
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdict.c(121): warning C4133: “函数”: 从“int *”到“stat *”的类型不兼容
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdict.c(136): warning C4133: “函数”: 从“int *”到“stat *”的类型不兼容
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdict.c(136): error C2224: “.st_mtime”的左侧必须具有结构/联合类型
1> xdb.c
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(60): warning C4996: 'lseek': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _lseek. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(313) : 参见“lseek”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(61): warning C4996: 'read': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _read. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(316) : 参见“read”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(135): warning C4996: 'open': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _open. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(315) : 参见“open”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(150): warning C4996: 'close': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _close. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(305) : 参见“close”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(156): warning C4996: 'lseek': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _lseek. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(313) : 参见“lseek”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(158): warning C4996: 'read': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _read. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(316) : 参见“read”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(163): warning C4996: 'close': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _close. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(305) : 参见“close”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(207): warning C4996: 'open': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _open. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(315) : 参见“open”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(232): warning C4996: 'lseek': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _lseek. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(313) : 参见“lseek”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(233): warning C4996: 'write': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _write. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(321) : 参见“write”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(254): warning C4996: 'lseek': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _lseek. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(313) : 参见“lseek”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(255): warning C4996: 'write': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _write. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(321) : 参见“write”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(258): warning C4996: 'close': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _close. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(305) : 参见“close”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(309): warning C4996: 'lseek': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _lseek. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(313) : 参见“lseek”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(310): warning C4996: 'write': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _write. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(321) : 参见“write”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(315): warning C4996: 'lseek': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _lseek. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(313) : 参见“lseek”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(316): warning C4996: 'write': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _write. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(321) : 参见“write”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(335): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(191) : 参见“strncpy”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(338): warning C4996: 'lseek': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _lseek. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(313) : 参见“lseek”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(339): warning C4996: 'write': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _write. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(321) : 参见“write”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(340): warning C4996: 'write': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _write. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(321) : 参见“write”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(345): warning C4996: 'lseek': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _lseek. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(313) : 参见“lseek”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(346): warning C4996: 'write': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _write. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(321) : 参见“write”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(530): warning C4996: 'lseek': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _lseek. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(313) : 参见“lseek”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(531): warning C4996: 'write': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _write. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\io.h(321) : 参见“write”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdb.c(566): warning C4113: “int (__cdecl *)()”和“int (__cdecl *)(const void *,const void *)”的参数列表不同
1> scws.c
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\xdict.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(305): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(191) : 参见“strncpy”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(310): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(191) : 参见“strncpy”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(318): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(191) : 参见“strncpy”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(323): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(191) : 参见“strncpy”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(330): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(191) : 参见“strncpy”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(353): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(191) : 参见“strncpy”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(372): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(191) : 参见“strncpy”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(446): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(191) : 参见“strncpy”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(452): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(191) : 参见“strncpy”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(486): error C2065: “SCWS_ZFLAG_ENGLISH”: 未声明的标识符
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(494): error C2065: “SCWS_ZFLAG_ENGLISH”: 未声明的标识符
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(566): error C2065: “SCWS_ZFLAG_ENGLISH”: 未声明的标识符
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(571): error C2065: “SCWS_ZFLAG_ENGLISH”: 未声明的标识符
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(587): error C2065: “SCWS_ZFLAG_ENGLISH”: 未声明的标识符
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(636): error C2065: “SCWS_WORD_USED”: 未声明的标识符
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(647): error C2065: “SCWS_WORD_RULE”: 未声明的标识符
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(651): error C2065: “SCWS_WORD_USED”: 未声明的标识符
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(671): error C2065: “SCWS_WORD_USED”: 未声明的标识符
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(696): error C2065: “SCWS_WORD_USED”: 未声明的标识符
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(802): error C2065: “SCWS_ZFLAG_ENGLISH”: 未声明的标识符
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(822): error C2065: “SCWS_ZFLAG_SYMBOL”: 未声明的标识符
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(871): error C2065: “SCWS_ZFLAG_NR2”: 未声明的标识符
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\scws.c(1428): warning C4113: “int (__cdecl *)()”和“int (__cdecl *)(const void *,const void *)”的参数列表不同
1> rule.c
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\rule.c(45): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\stdio.h(218) : 参见“fopen”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\rule.c(68): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(110) : 参见“strcpy”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\rule.c(71): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(191) : 参见“strncpy”的声明
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\rule.c(222): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(191) : 参见“strncpy”的声明
1> pool.c
1> lock.c
1>d:\php-sdk\phpdev\vc11\x86\scws-1.2.3\libscws\lock.h(38): warning C4005: “EWOULDBLOCK”: 宏重定义
1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\errno.h(132) : 参见“EWOULDBLOCK”的前一个定义
1> darray.c
1> crc32.c
1> charset.c
1> 正在生成代码...
2>------ 已启动生成: 项目: scws, 配置: Debug_PHP53 Win32 ------
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1137,5): warning MSB8012: TargetPath(D:\php-sdk\phpdev\vc11\x86\scws-1.2.3\win32.../Debug\scws.dll) does not match the Linker's OutputFile property value (D:\php-sdk\phpdev\vc11\x86\scws-1.2.3\Debug\php-5.3.x\php_scws.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1139,5): warning MSB8012: TargetName(scws) does not match the Linker's OutputFile property value (php_scws). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
2>LINK : fatal error LNK1181: 无法打开输入文件“libscws.lib”
========== 生成: 成功 0 个,失败 2 个,最新 0 个,跳过 0 个 ==========

求指教!!!

授权问题

http://www.xunsearch.com/scws/about.php

本软件自 1.1.9 版本起正式使用 BSD开源协议 发布,敬请了解并遵循。


本软件可以任意的免费使用,但未经同意严禁修改和移植 libscws 核心代码、分支发布等。所有已经正确安
装并享受使用本软件的用户,希望可以在论坛或其它方式通知我,让我知道有多少人在用它。

网站上的 about 声明 和 选用的 BSD 授权不符合

你好,hightman,请问下我使用PHP添加自定义词组时,报错?

692 $so = scws_new();
693 $so->set_charset('utf8');
694 // 这里没有调用 set_dict 和 set_rule 系统会自动试调用 ini 中指定路径下的词典和规则文件
695 //$dictPath = ini_get('scws.default.fpath').'/dict.utf8.xdb';
696 //$so->set_dict($dictPath);//设置词典
697
698 //$so->set_dict('/usr/local/scws/etc/dict.utf8.xdb');
699 $so->add_dict('/usr/local/scws/etc/dict.user.txt');
700 //$so->set_rule('/usr/local/scws/etc/rules.utf8.ini');
701
702 $so->set_duality(true);//设定是否将闲散文字自动以二字分词法聚合。
703 $so->set_ignore(true);//设定分词返回结果时是否去除一些特殊的标点符号之类。
704 $so->set_multi(1);//按位异或的 1 | 2 | 4 | 8 分别表示: 短词 | 二元 | 主要单字 | 所有单字
705
706 $so->send_text("我是一个**人,我会C++语言,我也有很多T恤衣服,我的衣服比我还重老司机遇上新能源遇上新能源这个分词怎么分");
707 echo '<pre>';
708 //$tmp = $so->get_result();
709 //$tmp = $so->get_tops(6, '~V');
710 $tmp = $so->get_tops(7);
711 foreach($tmp as $v)
712 {
713 print_r($v);
714 }
715 $so->close();

总是在 报699行 $so->add_dict('/usr/local/scws/etc/dict.user.txt'); 错误,我想添加一些自定义的词组:老司机。

请问是哪里出了问题呢?

谢谢

关于分词的问题

尊敬的hightman您好,
我发现了一个问题,将“去年12月以来,已有数以万计的示威者冒着严寒,从新俄罗斯的办公室、教室和工作室涌上街头,他们穿着体面,手拿智能手机,是反对普京(Vladimir Putin)的新生力量。抗议者们系着白色带子,挥动着自制的条幅,上书诸如“我们知道你想第三次当总统,但我们很头疼”这样的讽刺标语,要求获得政治话语权,并结束普京的**。为抗议杜马选举中普遍存在的舞弊行为,他们发起了几十年来规模最大的反政府示威。上周日,他们还围绕莫斯科市中心结成了一道人 。”这段话以及该段最后一句话:“上周日,他们还围绕莫斯科市中心结成了一道人 。”分别进行分词(http://www.xunsearch.com/scws/demo/v48.php),如果是一整段话的话会将最后的“莫斯科市中心”分成“莫斯 科 市中心”,而就只针对以一小句话做分词的话却不会有问题,请问这是什么原因?

编译错误

CentOS release 6.9 (Final)
PHP 7.2.6

.libs/php_scws.o
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘php_scws_dtor’中:
/root/scws-1.2.1/phpext/php_scws.c:145: 错误:‘rsrc’未声明(在此函数内第一次使用)
/root/scws-1.2.1/phpext/php_scws.c:145: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
/root/scws-1.2.1/phpext/php_scws.c:145: 错误:所在的函数内也只报告一次。)
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘zif_scws_new’中:
/root/scws-1.2.1/phpext/php_scws.c:278: 警告:传递‘add_property_resource_ex’的第 4 个参数时将整数赋给指针,未作类型转换
/usr/local/php/include/php/Zend/zend_API.h:471: 附注:需要类型‘struct zend_resource *’,但实参的类型为‘int’
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘zif_scws_close’中:
/root/scws-1.2.1/phpext/php_scws.c:288: 警告:传递‘zend_hash_find’的第 2 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_hash.h:168: 附注:需要类型‘struct zend_string *’,但实参的类型为‘char *’
/root/scws-1.2.1/phpext/php_scws.c:288: 错误:提供给函数‘zend_hash_find’的实参太多
/root/scws-1.2.1/phpext/php_scws.c:288: 警告:比较指针和整数
/root/scws-1.2.1/phpext/php_scws.c:298: 错误:expected expression before ‘struct’
/root/scws-1.2.1/phpext/php_scws.c:300: 警告:传递‘zend_list_delete’的第 1 个参数时将整数赋给指针,未作类型转换
/usr/local/php/include/php/Zend/zend_list.h:59: 附注:需要类型‘struct zend_resource *’,但实参的类型为‘int’
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘zif_scws_set_charset’中:
/root/scws-1.2.1/phpext/php_scws.c:313: 警告:传递‘zend_hash_find’的第 2 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_hash.h:168: 附注:需要类型‘struct zend_string *’,但实参的类型为‘char *’
/root/scws-1.2.1/phpext/php_scws.c:313: 错误:提供给函数‘zend_hash_find’的实参太多
/root/scws-1.2.1/phpext/php_scws.c:313: 警告:比较指针和整数
/root/scws-1.2.1/phpext/php_scws.c:325: 错误:expected expression before ‘struct’
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘zif_scws_add_dict’中:
/root/scws-1.2.1/phpext/php_scws.c:345: 警告:传递‘zend_hash_find’的第 2 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_hash.h:168: 附注:需要类型‘struct zend_string *’,但实参的类型为‘char *’
/root/scws-1.2.1/phpext/php_scws.c:345: 错误:提供给函数‘zend_hash_find’的实参太多
/root/scws-1.2.1/phpext/php_scws.c:345: 警告:比较指针和整数
/root/scws-1.2.1/phpext/php_scws.c:357: 错误:expected expression before ‘struct’
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘zif_scws_set_dict’中:
/root/scws-1.2.1/phpext/php_scws.c:396: 警告:传递‘zend_hash_find’的第 2 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_hash.h:168: 附注:需要类型‘struct zend_string *’,但实参的类型为‘char *’
/root/scws-1.2.1/phpext/php_scws.c:396: 错误:提供给函数‘zend_hash_find’的实参太多
/root/scws-1.2.1/phpext/php_scws.c:396: 警告:比较指针和整数
/root/scws-1.2.1/phpext/php_scws.c:408: 错误:expected expression before ‘struct’
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘zif_scws_set_rule’中:
/root/scws-1.2.1/phpext/php_scws.c:446: 警告:传递‘zend_hash_find’的第 2 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_hash.h:168: 附注:需要类型‘struct zend_string *’,但实参的类型为‘char *’
/root/scws-1.2.1/phpext/php_scws.c:446: 错误:提供给函数‘zend_hash_find’的实参太多
/root/scws-1.2.1/phpext/php_scws.c:446: 警告:比较指针和整数
/root/scws-1.2.1/phpext/php_scws.c:458: 错误:expected expression before ‘struct’
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘zif_scws_set_ignore’中:
/root/scws-1.2.1/phpext/php_scws.c:495: 警告:传递‘zend_hash_find’的第 2 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_hash.h:168: 附注:需要类型‘struct zend_string *’,但实参的类型为‘char *’
/root/scws-1.2.1/phpext/php_scws.c:495: 错误:提供给函数‘zend_hash_find’的实参太多
/root/scws-1.2.1/phpext/php_scws.c:495: 警告:比较指针和整数
/root/scws-1.2.1/phpext/php_scws.c:507: 错误:expected expression before ‘struct’
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘zif_scws_set_multi’中:
/root/scws-1.2.1/phpext/php_scws.c:522: 警告:传递‘zend_hash_find’的第 2 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_hash.h:168: 附注:需要类型‘struct zend_string *’,但实参的类型为‘char *’
/root/scws-1.2.1/phpext/php_scws.c:522: 错误:提供给函数‘zend_hash_find’的实参太多
/root/scws-1.2.1/phpext/php_scws.c:522: 警告:比较指针和整数
/root/scws-1.2.1/phpext/php_scws.c:534: 错误:expected expression before ‘struct’
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘zif_scws_set_duality’中:
/root/scws-1.2.1/phpext/php_scws.c:552: 警告:传递‘zend_hash_find’的第 2 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_hash.h:168: 附注:需要类型‘struct zend_string *’,但实参的类型为‘char *’
/root/scws-1.2.1/phpext/php_scws.c:552: 错误:提供给函数‘zend_hash_find’的实参太多
/root/scws-1.2.1/phpext/php_scws.c:552: 警告:比较指针和整数
/root/scws-1.2.1/phpext/php_scws.c:564: 错误:expected expression before ‘struct’
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘zif_scws_send_text’中:
/root/scws-1.2.1/phpext/php_scws.c:579: 警告:传递‘zend_hash_find’的第 2 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_hash.h:168: 附注:需要类型‘struct zend_string *’,但实参的类型为‘char *’
/root/scws-1.2.1/phpext/php_scws.c:579: 错误:提供给函数‘zend_hash_find’的实参太多
/root/scws-1.2.1/phpext/php_scws.c:579: 警告:比较指针和整数
/root/scws-1.2.1/phpext/php_scws.c:591: 错误:expected expression before ‘struct’
/root/scws-1.2.1/phpext/php_scws.c:593: 警告:传递‘zval_get_type’的第 1 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_types.h:389: 附注:需要类型‘const struct zval *’,但实参的类型为‘struct zval **’
/root/scws-1.2.1/phpext/php_scws.c:593: 警告:传递‘zval_get_type’的第 1 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_types.h:389: 附注:需要类型‘const struct zval *’,但实参的类型为‘struct zval **’
/root/scws-1.2.1/phpext/php_scws.c:593: 警告:传递‘_convert_to_string’的第 1 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_operators.h:250: 附注:需要类型‘struct zval *’,但实参的类型为‘struct zval **’
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘zif_scws_get_result’中:
/root/scws-1.2.1/phpext/php_scws.c:615: 警告:传递‘zend_hash_find’的第 2 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_hash.h:168: 附注:需要类型‘struct zend_string *’,但实参的类型为‘char *’
/root/scws-1.2.1/phpext/php_scws.c:615: 错误:提供给函数‘zend_hash_find’的实参太多
/root/scws-1.2.1/phpext/php_scws.c:615: 警告:比较指针和整数
/root/scws-1.2.1/phpext/php_scws.c:625: 错误:expected expression before ‘struct’
/root/scws-1.2.1/phpext/php_scws.c:635:68: 错误:宏“add_assoc_stringl”传递了 5 个参数,但只需要 4 个
/root/scws-1.2.1/phpext/php_scws.c:635: 错误:‘add_assoc_stringl’未声明(在此函数内第一次使用)
/root/scws-1.2.1/phpext/php_scws.c:639:78: 错误:宏“add_assoc_stringl”传递了 5 个参数,但只需要 4 个
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘zif_scws_get_tops’中:
/root/scws-1.2.1/phpext/php_scws.c:661: 警告:传递‘zend_hash_find’的第 2 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_hash.h:168: 附注:需要类型‘struct zend_string *’,但实参的类型为‘char *’
/root/scws-1.2.1/phpext/php_scws.c:661: 错误:提供给函数‘zend_hash_find’的实参太多
/root/scws-1.2.1/phpext/php_scws.c:661: 警告:比较指针和整数
/root/scws-1.2.1/phpext/php_scws.c:673: 错误:expected expression before ‘struct’
/root/scws-1.2.1/phpext/php_scws.c:684:45: 错误:宏“add_assoc_string”传递了 4 个参数,但只需要 3 个
/root/scws-1.2.1/phpext/php_scws.c:684: 错误:‘add_assoc_string’未声明(在此函数内第一次使用)
/root/scws-1.2.1/phpext/php_scws.c:687:78: 错误:宏“add_assoc_stringl”传递了 5 个参数,但只需要 4 个
/root/scws-1.2.1/phpext/php_scws.c:687: 错误:‘add_assoc_stringl’未声明(在此函数内第一次使用)
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘zif_scws_has_word’中:
/root/scws-1.2.1/phpext/php_scws.c:706: 警告:传递‘zend_hash_find’的第 2 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_hash.h:168: 附注:需要类型‘struct zend_string *’,但实参的类型为‘char *’
/root/scws-1.2.1/phpext/php_scws.c:706: 错误:提供给函数‘zend_hash_find’的实参太多
/root/scws-1.2.1/phpext/php_scws.c:706: 警告:比较指针和整数
/root/scws-1.2.1/phpext/php_scws.c:718: 错误:expected expression before ‘struct’
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘zif_scws_get_words’中:
/root/scws-1.2.1/phpext/php_scws.c:739: 警告:传递‘zend_hash_find’的第 2 个参数时在不兼容的指针类型间转换
/usr/local/php/include/php/Zend/zend_hash.h:168: 附注:需要类型‘struct zend_string *’,但实参的类型为‘char *’
/root/scws-1.2.1/phpext/php_scws.c:739: 错误:提供给函数‘zend_hash_find’的实参太多
/root/scws-1.2.1/phpext/php_scws.c:739: 警告:比较指针和整数
/root/scws-1.2.1/phpext/php_scws.c:751: 错误:expected expression before ‘struct’
/root/scws-1.2.1/phpext/php_scws.c:759:45: 错误:宏“add_assoc_string”传递了 4 个参数,但只需要 3 个
/root/scws-1.2.1/phpext/php_scws.c:759: 错误:‘add_assoc_string’未声明(在此函数内第一次使用)
/root/scws-1.2.1/phpext/php_scws.c:762:78: 错误:宏“add_assoc_stringl”传递了 5 个参数,但只需要 4 个
/root/scws-1.2.1/phpext/php_scws.c:762: 错误:‘add_assoc_stringl’未声明(在此函数内第一次使用)
/root/scws-1.2.1/phpext/php_scws.c:776:22: 错误:宏“RETURN_STRING”传递了 2 个参数,但只需要 1 个
/root/scws-1.2.1/phpext/php_scws.c: 在函数‘zif_scws_version’中:
/root/scws-1.2.1/phpext/php_scws.c:776: 错误:‘RETURN_STRING’未声明(在此函数内第一次使用)
make: *** [php_scws.lo] 错误 1

./check.sh

1a2

psql:sql/zhparser.sql:1: ERROR: could not access file "$libdir/zhparser": No such file or directory
3a5
psql:sql/zhparser.sql:5: ERROR: text search parser "zhparser" does not exist
4a7
psql:sql/zhparser.sql:7: ERROR: text search configuration "testzhcfg" does not exist

编译出错,rules.ini: 未找到命令

  1. git clone file
  2. run acprep
  3. ./configure
  4. sudo make install

结果出现错误

Making install in etc
make[1]: 正在进入目录 `/home/abc/documents/C/scws/etc'
make[2]: 正在进入目录 `/home/abc/documents/C/scws/etc'
test -z "/usr/local/etc" || /bin/mkdir -p "/usr/local/etc"
  'rules.ini' '/usr/local/etc/f=rules.ini'
/bin/bash: 行 6: rules.ini: 未找到命令
  'rules.utf8.ini' '/usr/local/etc/f=rules.utf8.ini'
/bin/bash: 行 6: rules.utf8.ini: 未找到命令
  'rules_cht.utf8.ini' '/usr/local/etc/f=rules_cht.utf8.ini'
/bin/bash: 行 6: rules_cht.utf8.ini: 未找到命令
make[2]: *** [install-sysconfDATA] 错误 127
make[2]:正在离开目录 `/home/abc/documents/C/scws/etc'
make[1]: *** [install-am] 错误 2
make[1]:正在离开目录 `/home/abc/documents/C/scws/etc'
make: *** [install-recursive] 错误 1

从网站下载 bzip 包编译没问题。

add_dict貌似没起作用

代码如下:

//测试分词
$cws = scws_new();
$cws->set_charset('utf8');
// use default dictionary & rules
//$cws->set_duality(false);
//$cws->set_ignore(true);
//$cws->set_multi(3);
//$cws->set_rule(dirname(dirname(FILE)).'/conf/scws/rules/rules.utf8.ini');
$cws->add_dict(dirname(dirname(FILE)).'/conf/scws/dict.utf8.xdb');
$cws->add_dict(dirname(dirname(FILE)).'/conf/scws/dict.utf8.txt', SCWS_XDICT_TXT);
$cws->send_text("JOHNBOSS 肖特 插刀架 5件套");
$res = $cws->get_result();
print_r($res);
die;

dict.utf8.txt:
插刀架 2.0
5件套 1.0 1.0 @
JOHNBOSS 1.0 1.0 !

然而并没有 删除 'JOHNBOSS', 查询结果依然存在

[root@localhost lib]# php console.php help
Array
(
[0] => Array
(
[word] => JOHNBOSS
[off] => 0
[len] => 8
[idf] => 5.1986036300659
[attr] => en
)

)
求解?

arch下 编译后 无法安装

test -z "/usr/local/scws/etc" || /usr/bin/mkdir -p "/usr/local/scws/etc"
'rules.ini' '/usr/local/scws/etc/f=rules.ini'
/bin/sh:行6: rules.ini: 未找到命令

版本不同切词也不同了

1.2.3
scws -M 9 -i '汪蛋' -c utf8 -d etc/dict.utf8.xdb -r etc/rules.utf8.ini
汪 蛋
+--[scws(scws-cli/1.2.3)]----------+
1.2.1
./bin/scws -M 9 -i '汪蛋' -c utf8 -d etc/dict.utf8.xdb -r etc/rules.utf8.ini
汪蛋 汪 蛋
+--[scws(scws-cli/1.2.1)]----------+

请问,这个我怎么解决好?

highman你好,调用C API遇到一些问题。

我使用网友打包的1.2.1版的DLL,在DELPHI中调用,能成功使用,但遇到一些问题。
比如,当使用UTF8模式时,如果文本含有 “人大”一词,调用_scws_get_result就会导致stack overflow 错误。
用GBK模式时,“人大”一词虽然不会引发stack overflow,但仍会遇到出现stack overflow的情况。
包括调用scws_add_dict加载txt词典。
另外,如果在scws_add_dict加载默认XDB文件时启用SCWS_XDICT_MEM模式,会失败。

不知你的1.2.3版是否有解决此问题,能否请你提供一个1.2.3版的DLL来测试(新人小白自己尝试生成DLL失败)

Windows PHP5.6.30编译失败

操作系统: windows 7
VS: Visual studio 2013
PHP: 5.6.30
SCWS: 1.2.3

第一次尝试在Windows下进行编译,之前也看过其他人的,但是.....

错误 3 error C1083: 无法打开包括文件: “version.h”: No such file or directory d:\php-compile\phpdev\vc11\x86\scws\libscws\scws.h 15 1 libscws
错误 5 error C1083: 无法打开包括文件: “version.h”: No such file or directory D:\php-compile\phpdev\vc11\x86\scws\libscws\scws.h 15 1 scws

求帮助

不支持php7.1.8的扩展模块

[root@sdkback phpext]# php -m|grep scws
PHP Warning:  PHP Startup: scws: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20160303
These options need to match
 in Unknown on line 0

phpinfo()页面不能显示scws扩展

当add_dict的类型为txt时,负载狂高

$cws->add_dict('/path/to/dict.utf8.txt', SCWS_XDICT_TXT);

当添加txt类型字典时,我看了代码,会去检查/tmp/scws-xxx.xdb是否存在,且时间是否小于相应地txt字典文件,然后尝试unlink,重新生成。但是,如果当字典更新在webserver时,则引发惊群,所有进程都会尝试去生成这个xdb文件。

我的使用场景,有定时任务机器定时生成新的字典,然后同步到所有前端机上进行分词。

建议在尝试自动生成xdb时:加锁或者独占进程生成。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.