88b754261ee28f8e4143a573135a0f33da42d249,bugbug/similarity.py,Word2VecWmdSimilarity,__init__,#Word2VecWmdSimilarity#Any#Any#,230

Before Change


    def __init__(self, cut_off=0.2, cleanup_urls=True):
        super().__init__(cleanup_urls=cleanup_urls)
        self.corpus = []
        self.bug_ids = []
        self.cut_off = cut_off
        for bug in bugzilla.get_bugs():
            self.corpus.append(self.text_preprocess(self.get_text(bug)))
            self.bug_ids.append(bug["id"])

After Change


        corpus_final = [self.dictionary.doc2bow(text) for bug_id, text in self.corpus]

        // Initializing and applying the tfidf transformation model on same corpus,resultant corpus is of same dimensions
        tfidf = models.TfidfModel(corpus_final)
        corpus_tfidf = tfidf[corpus_final]

        // Transform TF-IDF corpus to latent 300-D space via Latent Semantic Indexing
        self.lsi = models.LsiModel(
            corpus_tfidf, id2word=self.dictionary, num_topics=300
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: mozilla/bugbug
Commit Name: 88b754261ee28f8e4143a573135a0f33da42d249
Time: 2019-07-29
Author: ayush.shridhar1506@gmail.com
File Name: bugbug/similarity.py
Class Name: Word2VecWmdSimilarity
Method Name: __init__


Project Name: RaRe-Technologies/gensim
Commit Name: 0bfb9daa540308cca9663bdf66a6266d599cf8ed
Time: 2018-01-15
Author: mrmohitrathoremr@gmail.com
File Name: gensim/test/test_tfidfmodel.py
Class Name: TestTfidfModel
Method Name: testPersistence


Project Name: mozilla/bugbug
Commit Name: 4ace4ef2fb1956ec4df46f78c9edd02154780913
Time: 2019-07-24
Author: cklyyung@users.noreply.github.com
File Name: bugbug/similarity.py
Class Name: Word2VecWmdSimilarity
Method Name: __init__


Project Name: RaRe-Technologies/gensim
Commit Name: 0bfb9daa540308cca9663bdf66a6266d599cf8ed
Time: 2018-01-15
Author: mrmohitrathoremr@gmail.com
File Name: gensim/test/test_tfidfmodel.py
Class Name: TestTfidfModel
Method Name: testPersistenceCompressed