Add ngram-based pattern check.