Skip to content

awheel/phptrie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhpTrie

Trie 树实现的违禁词搜索和替换

安装

composer require awheel/phptrie

示例

$trie = new PhpTrie();
$words = ['我是', '我们', 'abcd'];
$string = '我们是违禁词: abcde';

$trie->addWord($words);
var_dump($trie->check($string))
var_dump($trie->search($string))
var_dump($trie->isWord('我们')))

About

Trie 树实现的违禁词搜索和替换

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages