跳过导航链接
A C D F G I M P S T W 

A

addWord(String) - 类 中的方法cn.hutool.dfa.WordTree
添加单词,使用默认类型
addWords(Collection<String>) - 类 中的方法cn.hutool.dfa.WordTree
增加一组单词
addWords(String...) - 类 中的方法cn.hutool.dfa.WordTree
增加一组单词

C

clear() - 类 中的方法cn.hutool.dfa.WordTree
清除所有的词, 此方法调用后, wordTree 将被清空 endCharacterSet 也将清空
cn.hutool.dfa - 程序包 cn.hutool.dfa
DFA全称为:Deterministic Finite Automaton,即确定有穷自动机。
containsSensitive(String) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
是否包含敏感词
containsSensitive(Object) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
是否包含敏感词

D

DEFAULT_SEPARATOR - 类 中的静态变量cn.hutool.dfa.SensitiveUtil
 

F

FoundWord - cn.hutool.dfa中的类
匹配到的单词,包含单词,text中匹配单词的内容,以及匹配内容在text中的下标, 下标可以用来做单词的进一步处理,如果替换成**
FoundWord(String, String, int, int) - 类 的构造器cn.hutool.dfa.FoundWord
构造

G

getFoundAllSensitive(String) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
查找敏感词,返回找到的所有敏感词
getFoundAllSensitive(String, boolean, boolean) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
查找敏感词,返回找到的所有敏感词
密集匹配原则:假如关键词有 ab,b,文本是abab,将匹配 [ab,b,ab]
贪婪匹配(最长匹配)原则:假如关键字a,ab,最长匹配将匹配[a, ab]
getFoundAllSensitive(Object) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
查找敏感词,返回找到的所有敏感词
getFoundAllSensitive(Object, boolean, boolean) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
查找敏感词,返回找到的所有敏感词
密集匹配原则:假如关键词有 ab,b,文本是abab,将匹配 [ab,b,ab]
贪婪匹配(最长匹配)原则:假如关键字a,ab,最长匹配将匹配[a, ab]
getFoundFirstSensitive(String) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
查找敏感词,返回找到的第一个敏感词
getFoundFirstSensitive(Object) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
查找敏感词,返回找到的第一个敏感词
getFoundWord() - 类 中的方法cn.hutool.dfa.FoundWord
获取单词匹配到的内容,即文中的单词
getWord() - 类 中的方法cn.hutool.dfa.FoundWord
获取生效的单词,即单词树中的词

I

init(Collection<String>, boolean) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
初始化敏感词树
init(Collection<String>) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
初始化敏感词树
init(String, char, boolean) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
初始化敏感词树
init(String, boolean) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
初始化敏感词树,使用逗号分隔每个单词
isInited() - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
 
isMatch(String) - 类 中的方法cn.hutool.dfa.WordTree
指定文本是否包含树中的词
isNotStopChar(char) - 类 中的静态方法cn.hutool.dfa.StopChar
是否为合法字符(待处理字符)
isStopChar(char) - 类 中的静态方法cn.hutool.dfa.StopChar
判断指定的词是否是不处理的词。

M

match(String) - 类 中的方法cn.hutool.dfa.WordTree
获得第一个匹配的关键字
matchAll(String) - 类 中的方法cn.hutool.dfa.WordTree
找出所有匹配的关键字
matchAll(String, int) - 类 中的方法cn.hutool.dfa.WordTree
找出所有匹配的关键字
matchAll(String, int, boolean, boolean) - 类 中的方法cn.hutool.dfa.WordTree
找出所有匹配的关键字
密集匹配原则:假如关键词有 ab,b,文本是abab,将匹配 [ab,b,ab]
贪婪匹配(最长匹配)原则:假如关键字a,ab,最长匹配将匹配[a, ab]
matchAllWords(String) - 类 中的方法cn.hutool.dfa.WordTree
找出所有匹配的关键字
matchAllWords(String, int) - 类 中的方法cn.hutool.dfa.WordTree
找出所有匹配的关键字
matchAllWords(String, int, boolean, boolean) - 类 中的方法cn.hutool.dfa.WordTree
找出所有匹配的关键字
密集匹配原则:假如关键词有 ab,b,文本是abab,将匹配 [ab,b,ab]
贪婪匹配(最长匹配)原则:假如关键字a,ab,最长匹配将匹配[a, ab]
matchWord(String) - 类 中的方法cn.hutool.dfa.WordTree
获得第一个匹配的关键字

P

process(FoundWord) - 接口 中的方法cn.hutool.dfa.SensitiveProcessor
敏感词过滤处理

S

sensitiveFilter(T, boolean, SensitiveProcessor) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
敏感词过滤
sensitiveFilter(String) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
处理过滤文本中的敏感词,默认替换成*
sensitiveFilter(String, boolean, SensitiveProcessor) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
处理过滤文本中的敏感词,默认替换成*
SensitiveProcessor - cn.hutool.dfa中的接口
 
SensitiveUtil - cn.hutool.dfa中的类
敏感词工具类
SensitiveUtil() - 类 的构造器cn.hutool.dfa.SensitiveUtil
 
setCharFilter(Filter<Character>) - 类 中的静态方法cn.hutool.dfa.SensitiveUtil
设置字符过滤规则,通过定义字符串过滤规则,过滤不需要的字符
当accept为false时,此字符不参与匹配
setCharFilter(Filter<Character>) - 类 中的方法cn.hutool.dfa.WordTree
设置字符过滤规则,通过定义字符串过滤规则,过滤不需要的字符
当accept为false时,此字符不参与匹配
STOP_WORD - 类 中的静态变量cn.hutool.dfa.StopChar
不需要处理的词,如标点符号、空格等
StopChar - cn.hutool.dfa中的类
过滤词及一些简单处理
StopChar() - 类 的构造器cn.hutool.dfa.StopChar
 

T

toString() - 类 中的方法cn.hutool.dfa.FoundWord
默认的,只输出匹配到的关键字

W

WordTree - cn.hutool.dfa中的类
DFA(Deterministic Finite Automaton 确定有穷自动机) DFA单词树(以下简称单词树),常用于在某大段文字中快速查找某几个关键词是否存在。
WordTree() - 类 的构造器cn.hutool.dfa.WordTree
默认构造
A C D F G I M P S T W 
跳过导航链接

Copyright © 2024. All rights reserved.