Ngram cache optimized