Naive Bayes working with ngrams