def check(self, text):
for word, pos in self.tokenizer(text):<EOL><INDENT>correct = self.dictionary.check(word)<EOL>if correct:<EOL><INDENT>continue<EOL><DEDENT>yield word, self.dictionary.suggest(word) if self.suggest else []<EOL><DEDENT>return<EOL>
Yields bad words and suggested alternate spellings.