realize ngram filter