4ea27ba44e2ce56f06c2294d02e59031707e1ca5,gensim/matutils.py,MmReader,__init__,#MmReader#Any#Any#,538

Before Change


        
        logger.info("initializing corpus reader from %s" % input)
        self.input, self.transposed = input, transposed
        if isinstance(input, string_types):
            input = open(input)
        header = next(input).strip()
        if not header.lower().startswith("%%matrixmarket matrix coordinate real general"):
            raise ValueError("File %s not in Matrix Market format with coordinate real general; instead found: \n%s" %
                             (self.input, header))

After Change


        logger.info("initializing corpus reader from %s" % input)
        self.input, self.transposed = input, transposed
        with utils.file_or_filename(self.input) as lines:
            header = utils.to_unicode(next(lines)).strip()
            if not header.lower().startswith("%%matrixmarket matrix coordinate real general"):
                raise ValueError("File %s not in Matrix Market format with coordinate real general; instead found: \n%s" %
                                 (self.input, header))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: RaRe-Technologies/gensim
Commit Name: 4ea27ba44e2ce56f06c2294d02e59031707e1ca5
Time: 2014-04-19
Author: radimrehurek@seznam.cz
File Name: gensim/matutils.py
Class Name: MmReader
Method Name: __init__


Project Name: RaRe-Technologies/gensim
Commit Name: 19a2292b8b21da8fd83e5f8129debb4b9ab4c14f
Time: 2014-07-01
Author: radimrehurek@seznam.cz
File Name: gensim/corpora/dictionary.py
Class Name: Dictionary
Method Name: from_corpus


Project Name: RaRe-Technologies/gensim
Commit Name: 4ea27ba44e2ce56f06c2294d02e59031707e1ca5
Time: 2014-04-19
Author: radimrehurek@seznam.cz
File Name: gensim/matutils.py
Class Name: MmReader
Method Name: __iter__