Implemented Aho-Corasick algorithm for CPU.