Optimized nGram for 2- and 3-grams.
Updated to use new Search method on Trie.