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


        for text in self.texts(fileids, plaintext):
            text = re.sub(r'\n\s*\n', '\n', text, re.MULTILINE) # Remove blank lines
            for line in text.split('\n'):
                yield line