def read_corpus_file(self, file_name):
        _logger.info("Reading corpus from '%s'..." % file_name)
        for line in self._read_text_file(file_name, raw=True):
            for compound in self.compound_sep_re.split(line):
                if len(compound) > 0:
                    yield 1, compound, self._split_atoms(compound)
            yield 0, "\n", ()
        _logger.info("Done.")
Read one corpus file.
dataset/ETHPy150Open aalto-speech/morfessor/morfessor/io.py/MorfessorIO.read_corpus_file