
敏感词
文章平均质量分 62
凌风探梅
这个作者很懒,什么都没留下…
展开
-
php过滤敏感词实例代码
php过滤敏感词实例代码 /** * Created by JetBrains PhpStorm. * User: lsl * Date: 13-8-28 * Time: 下午2:58 * 敏感词过滤工具类 * 使用方法 * echo FilterTools::filterContent("你转载 2015-12-04 11:33:03 · 2471 阅读 · 0 评论 -
敏感词检测
import java.io.File;import java.io.IOException;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;import org.apache.commons.io.FileUtils;import org.转载 2015-12-04 11:35:48 · 6392 阅读 · 0 评论 -
In China, Google Offers a New Tool to Detect Sensitive Words
In China, Google Offers a New Tool to Detect Sensitive WordsBy Austin Ramzy @austinramzyJune 01, 2012Add a Comment inShareRead LaterNg Han Guan, File / APIn t转载 2015-12-04 12:01:29 · 1044 阅读 · 0 评论 -
关于java中敏感词检测的一些总结
之前项目里客户提出一个需求,需要对系统中使用文本转化成语音发送的功能进行敏感词检测,禁止用户提交有敏感词的语音。通过查询各方面资料,整理了大概几种方案:项目启动时对载入敏感词库作为缓存(一个大map,敏感词为key,取任意值为value)。 对请求传入的文本分词,遍历分词结果,每个分词在map中查找,如果有值,则请求文本存在敏感词。把敏感词库拼接成一个大的正则表达式,然后直接对文本匹配。使转载 2015-12-04 11:17:31 · 5551 阅读 · 0 评论 -
基于DFA的敏感词检测和替换模块 SmallGFW
#encoding=utf-8#DFA based text filter#author=sunjoy#version=0.3class GFW(object): def __init__(self): self.d = {} #give a list of "ming gan ci" def set(self,keywo转载 2015-12-04 11:30:34 · 2473 阅读 · 0 评论 -
敏感词过滤,PHP实现的Trie树
[转载]敏感词过滤,PHP实现的Trie树原文地址:http://blog.11034.org/2012-07/trie_in_php.html 项目需求,要做敏感词过滤,对于敏感词本身就是一个CRUD的模块很简单,比较麻烦的就是对各种输入的敏感词检测了。用Trie树来实现是比较通用的一种办法吧,之前一直没机会用过这种数据结构,正好试着写了一下。因为用PHP实现,关联数组用的很舒服转载 2015-12-04 11:34:24 · 2178 阅读 · 0 评论 -
An Implementation of Double-Array Trie
An Implementation of Double-Array TrieContentsWhat is Trie?What Does It Take to Implement a Trie?Tripple-Array TrieDouble-Array TrieSuffix CompressionKey InsertionKey DeletionDoubl转载 2015-12-04 11:26:57 · 1233 阅读 · 0 评论