Implemented n-gram generator using a simplified version of sentence iterable