Support new ngram_size attribute