Nagao ngram detection algorithm is added.