Optional TF-IDF ngram weighting added.