added comments for sentence2ngrams()