d2f48bb83fdcb3e5bc1e8e5424140b250b5c6432,gensim/models/word2vec.py,Word2Vec,most_similar_cosmul,#Word2Vec#Any#Any#Any#,756
Before Change
if not topn:
return dists
best = argsort(dists)[::-1][:topn + len(all_words)]
// ignore (don"t return) words from the input
result = [(self.index2word[sim], float(dists[sim])) for sim in best if sim not in all_words]
return result[:topn]
After Change
if not topn:
return dists
best = matutils.argsort(dists, topn=topn + len(all_words), reverse=True)
// ignore (don"t return) words from the input
result = [(self.index2word[sim], float(dists[sim])) for sim in best if sim not in all_words]
return result[:topn]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances Project Name: RaRe-Technologies/gensim
Commit Name: d2f48bb83fdcb3e5bc1e8e5424140b250b5c6432
Time: 2015-07-02
Author: radimrehurek@seznam.cz
File Name: gensim/models/word2vec.py
Class Name: Word2Vec
Method Name: most_similar_cosmul
Project Name: RaRe-Technologies/gensim
Commit Name: d2f48bb83fdcb3e5bc1e8e5424140b250b5c6432
Time: 2015-07-02
Author: radimrehurek@seznam.cz
File Name: gensim/models/doc2vec.py
Class Name: DocvecsArray
Method Name: most_similar
Project Name: RaRe-Technologies/gensim
Commit Name: d2f48bb83fdcb3e5bc1e8e5424140b250b5c6432
Time: 2015-07-02
Author: radimrehurek@seznam.cz
File Name: gensim/models/word2vec.py
Class Name: Word2Vec
Method Name: most_similar