f36935bbb0a364d0426c8f7338147b3b114b5299,gensim/corpora/svmlightcorpus.py,SvmLightCorpus,save_corpus,#Any#Any#Any#Any#Any#,84

Before Change


        logger.info("converting corpus to SVMlight format: %s" % fname)

        offsets = []
        with open(fname, "w") as fout:
            for docno, doc in enumerate(corpus):
                label = labels[docno] if labels else 0 // target class is 0 by default
                offsets.append(fout.tell())

After Change


        logger.info("converting corpus to SVMlight format: %s" % fname)

        offsets = []
        with utils.smart_open(fname, "wb") as fout:
            for docno, doc in enumerate(corpus):
                label = labels[docno] if labels else 0 // target class is 0 by default
                offsets.append(fout.tell())
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 2

Instances


Project Name: RaRe-Technologies/gensim
Commit Name: f36935bbb0a364d0426c8f7338147b3b114b5299
Time: 2014-03-13
Author: radimrehurek@seznam.cz
File Name: gensim/corpora/svmlightcorpus.py
Class Name: SvmLightCorpus
Method Name: save_corpus


Project Name: RaRe-Technologies/gensim
Commit Name: f36935bbb0a364d0426c8f7338147b3b114b5299
Time: 2014-03-13
Author: radimrehurek@seznam.cz
File Name: gensim/corpora/malletcorpus.py
Class Name: MalletCorpus
Method Name: save_corpus


Project Name: RaRe-Technologies/gensim
Commit Name: db2f551793638d0372673f5d6804c0b7fc06e3df
Time: 2014-03-02
Author: radimrehurek@seznam.cz
File Name: gensim/models/word2vec.py
Class Name: Word2Vec
Method Name: save_word2vec_format


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


Project Name: RaRe-Technologies/gensim
Commit Name: f36935bbb0a364d0426c8f7338147b3b114b5299
Time: 2014-03-13
Author: radimrehurek@seznam.cz
File Name: gensim/corpora/lowcorpus.py
Class Name: LowCorpus
Method Name: save_corpus