ngram class