ngram Fast n-gram models using Cython and C++. NGramTrie A straightforward Trie implementation of ngram models. Not the most memory efficient, but it handles queries fast. NGramModel The more common implementation as suffix array