this project is a aho-corasick automaton implementation by python
import ahocorasick # or import hive
tree=ahocorasick.AhoCorasick("test","book","oo","ok")
tree.search("test book")
import ahocorasick # or import hive
tree=ahocorasick.AhoCorasick("test","book","oo","ok")
tree.search("test book",True)