@van51 `generate_ngram_hashes` should handle the unigram case, so that you can avoid the switchcase here