<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def words(self: object, fileids: str):
 """ Tokenizes documents in the corpus by word """

        for sent in self.sents(fileids):
            for token in word_tokenize(sent):
                yield token