Also use the numWordsInNgram parameter to cache

Otherwise changing the number of ngrams will break classification.
Merge pull request #14 from thomwiggers/fix-ngrams

Changing numWordsInNgram breaks classification if already trained