Converted ngram extraction to materialized view framework.