Replace ngram functions with their iterator counterparts, cf https://github.com/nltk/nltk/issues/527

Replace ngram functions with their iterator counterparts, cf https://github.com/nltk/nltk/issues/527