680de8d4f35325e7486c07c4e06422929e826b57,gensim/corpora/lowcorpus.py,LowCorpus,line2doc,#LowCorpus#Any#,145

Before Change



        if self.use_wordids:
            // get all distinct terms in this document, ignore unknown words
            uniq_words = set(words).intersection(iterkeys(self.word2id))

            // the following creates a unique list of words *in the same order*
            // as they were in the input. when iterating over the documents,
            // the (word, count) pairs will appear in the same order as they

After Change


            // if this was not needed, we might as well have used useWords = set(words)
            use_words, counts = [], Counter()
            for word in words:
                if word not in self.word2id:
                    continue
                if word not in counts:
                    use_words.append(word)
                counts[word] += 1
            // construct a list of (wordIndex, wordFrequency) 2-tuples
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 3

Instances


Project Name: RaRe-Technologies/gensim
Commit Name: 680de8d4f35325e7486c07c4e06422929e826b57
Time: 2019-01-10
Author: __Singleton__@hackerdom.ru
File Name: gensim/corpora/lowcorpus.py
Class Name: LowCorpus
Method Name: line2doc


Project Name: polyaxon/polyaxon
Commit Name: df2089b7132ced1f1c5322b338f686840f947438
Time: 2018-04-15
Author: mouradmourafiq@gmail.com
File Name: polyaxon_schemas/utils.py
Class Name:
Method Name: pvalues


Project Name: polyaxon/polyaxon
Commit Name: 57a90c815b43fdfa6031597bbafa9fbcbfc00fe6
Time: 2017-12-13
Author: mouradmourafiq@gmail.com
File Name: polyaxon_cli/cli/cluster.py
Class Name:
Method Name: get_node_info


Project Name: matplotlib/matplotlib
Commit Name: 18b5c87e2318218ada9799a069c0b65fae0b1e28
Time: 2017-12-18
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/rcsetup.py
Class Name:
Method Name:


Project Name: OpenNMT/OpenNMT-tf
Commit Name: ba28f13e3c6bbeb8521feef63af72557ac08781b
Time: 2019-08-26
Author: guillaume.klein@systrangroup.com
File Name: opennmt/utils/checkpoint.py
Class Name:
Method Name: _restore_v1_checkpoint


Project Name: RaRe-Technologies/gensim
Commit Name: 1aa7e115fcf87b443373c14b7b2f3dd2e3383584
Time: 2011-02-19
Author: radimrehurek@seznam.cz
File Name: src/gensim/corpora/lowcorpus.py
Class Name: LowCorpus
Method Name: __iter__