78fea7f6e759aef25811f5e987ea5b801be9ee41,gensim/models/word2vec.py,Word2Vec,scale_vocab,#Word2Vec#Any#Any#Any#,496
Before Change
if not dry_run:
new_vocab = {}
for w in retain_words:
new_vocab[w] = self.vocab[w]
new_vocab[w].index = len(self.index2word)
self.index2word.append(w)
self.vocab = new_vocab
After Change
retain_total += v
original_total += v
if not dry_run:
self.vocab[word] = Vocab(count=v, index=len(self.index2word))
self.index2word.append(word)
else:
drop_unique += 1
drop_total += v
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances Project Name: RaRe-Technologies/gensim
Commit Name: 78fea7f6e759aef25811f5e987ea5b801be9ee41
Time: 2015-07-05
Author: radimrehurek@seznam.cz
File Name: gensim/models/word2vec.py
Class Name: Word2Vec
Method Name: scale_vocab
Project Name: pytorch/tutorials
Commit Name: 4794be6f7e3827228b6e0dc9b1cfe432a3ecdeb3
Time: 2021-03-04
Author: brianjo@fb.com
File Name: beginner_source/text_sentiment_ngrams_tutorial.py
Class Name:
Method Name:
Project Name: RaRe-Technologies/gensim
Commit Name: ae243b31f370afbb95e185802295660fb8381b87
Time: 2015-07-06
Author: radimrehurek@seznam.cz
File Name: gensim/models/word2vec.py
Class Name: Word2Vec
Method Name: scale_vocab
Project Name: WZBSocialScienceCenter/tmtoolkit
Commit Name: d16ec36e570e8fe4487d2e47367ae61d8e4d04c9
Time: 2020-02-05
Author: markus.konrad@wzb.eu
File Name: tmtoolkit/preprocess/_preprocworker.py
Class Name: PreprocWorker
Method Name: _task_set_state