workaround for bug in nltk NgramModel