hankcs / AhoCorasickDoubleArrayTrie

An extremely fast implementation of Aho Corasick algorithm based on Double Array Trie.
http://www.hankcs.com/program/algorithm/aho-corasick-double-array-trie.html
950 stars 290 forks source link

匹配的结果冗余太多,需要二次过滤 #37

Open andrewlu1 opened 4 years ago

andrewlu1 commented 4 years ago

示例: 词库中敏感词汇为: "你妈逼", 用户输入词汇为:"你妈逼", 实际将会输出匹配结果: "妈", "妈逼", "你妈',"你妈逼".

不太理解为什么为匹配到一个单字:"妈". 期望能够进行结果包容性过滤. 即只输出最大匹配结果.