2e07c2d2743bc80fe0a2b9c8ec5a8460b2f5d6dd,src/gensim/corpora/svmlightcorpus.py,SvmLightCorpus,__iter__,#SvmLightCorpus#,53

Before Change


        Iterate over the corpus, returning one sparse vector at a time.
        
        for lineNo, line in enumerate(open(self.fname)):
            if line.startswith("//"):
                continue
            parts = line.split()
            target, fields = parts[0], [part.rsplit(":", 1) for part in parts[1:]]

After Change


        Iterate over the corpus, returning one sparse vector at a time.
        
        for lineNo, line in enumerate(open(self.fname)):
            line = line[: line.find("//")].strip()
            if not line:
                continue // ignore comments and empty lines
            parts = line.split()
            if not parts:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: RaRe-Technologies/gensim
Commit Name: 2e07c2d2743bc80fe0a2b9c8ec5a8460b2f5d6dd
Time: 2010-03-12
Author: radimrehurek@seznam.cz
File Name: src/gensim/corpora/svmlightcorpus.py
Class Name: SvmLightCorpus
Method Name: __iter__


Project Name: RaRe-Technologies/gensim
Commit Name: 2299d6fb7437903bf421884c0191c38d59d06f7b
Time: 2010-03-12
Author: piskvorky@92d0401f-a546-4972-9173-107b360ed7e5
File Name: src/gensim/corpora/svmlightcorpus.py
Class Name: SvmLightCorpus
Method Name: __iter__


Project Name: vatlab/SoS
Commit Name: affcf8e59f6942e93cee19aa19637ba7f0da20b1
Time: 2017-01-06
Author: ben.bog@gmail.com
File Name: sos/__main__.py
Class Name:
Method Name: cmd_unpack


Project Name: vatlab/SoS
Commit Name: 394541392806a620ab8b6bfb606e5bad7cac936c
Time: 2017-01-06
Author: ben.bog@gmail.com
File Name: sos/__main__.py
Class Name:
Method Name: cmd_unpack