fixed gram bug in sentence2ngrams()