mickelfeng / acfilter Goto Github PK
View Code? Open in Web Editor NEWThis project forked from xurenlu/acfilter
用来查找文本中是否有指定的词
Home Page: http://www.162cm.com/
This project forked from xurenlu/acfilter
用来查找文本中是否有指定的词
Home Page: http://www.162cm.com/
1: acfilter 用于实现查询某段文本中是否含有指定的词(当前禁词越来越多的情况下, 是有必要开发一个扩展来干这个了): ;在词库够大的情况下,能实现一定的分词的功能; 2: acfilter 基于发布于http://code.google.com/p/pysoft/ 上的acseg完成,原有代码发布的license为New BSD license; acfilter 仍使用New BSD lincense; 3: 安装: tar -xzf acfilter.tar.gz cd acfilter phpize ./configure make sudo make install 安装完之后请在php.ini里加上: extension=acfilter.so 4:使用: 示例代码: $ac=acfilter_new(); var_dump($ac); acfilter_add_word($ac,"河边"); acfilter_add_word($ac,"狗屎"); acfilter_add_word($ac,","); acfilter_add_word($ac,"工信部"); acfilter_prepare($ac); print_r(acfilter_check_text($ac,"曾经有一个很狗屎的部门,叫工信部,到河边自杀了")); acfilter_close($ac); 运行后输出为包含的各个禁词用空格连起来的一个字符串,如下所示: resource(4) of type (Acfilter Index) 狗屎 , 工信部 , 河边 具体可参见example.php; 5: 有任何Bug,请发信给:[email protected],谢谢! ====Change log ====== 2010.09.17 新增一个功能点:以前只能检测完全相同的匹配,现在可以检测类似"共*产*党"这样的敏感词;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.