8592777b126908e3205cfb8371744ed359e4b04e,magpie/base/inverted_index.py,InvertedIndex,get_first_phrase_occurrence,#InvertedIndex#Any#,29
Before Change
first_occ = [self._get_first_term_occurrence(term) for term in terms]
// TODO maybe a better function would do here
return sum(first_occ) / len(first_occ)
def _get_first_term_occurrence(self, term):
stemmed = stem(term)
if stemmed not in self.index:
After Change
def get_first_phrase_occurrence(self, keyphrase):
// TODO maybe a better function would do here
return np.mean([self._get_first_term_occurrence(term)
for term in keyphrase])
def _get_first_term_occurrence(self, term):
if term not in self.index:
return 1
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 6
Instances Project Name: inspirehep/magpie
Commit Name: 8592777b126908e3205cfb8371744ed359e4b04e
Time: 2016-01-11
Author: jan.stypka@cern.ch
File Name: magpie/base/inverted_index.py
Class Name: InvertedIndex
Method Name: get_first_phrase_occurrence
Project Name: inspirehep/magpie
Commit Name: 8592777b126908e3205cfb8371744ed359e4b04e
Time: 2016-01-11
Author: jan.stypka@cern.ch
File Name: magpie/base/inverted_index.py
Class Name: InvertedIndex
Method Name: get_last_phrase_occurrence
Project Name: tristandeleu/pytorch-maml-rl
Commit Name: db9d883aecb6cdfba6c6bbc76b83d85397fef28d
Time: 2018-10-23
Author: tristan.deleu@gmail.com
File Name: maml_rl/utils/torch_utils.py
Class Name:
Method Name: weighted_mean
Project Name: rasbt/mlxtend
Commit Name: cec517350d259a4f49a58a769db784c248cfffa8
Time: 2021-01-08
Author: mail@sebastianraschka.com
File Name: mlxtend/evaluate/accuracy.py
Class Name:
Method Name: accuracy_score
Project Name: ekzhu/datasketch
Commit Name: 5240e8ed8e7ac4fd805f3ca6a858375b368d9406
Time: 2015-06-25
Author: ekzhu@cs.toronto.edu
File Name: datasketch/hyperloglog.py
Class Name: HyperLogLogPlusPlus
Method Name: _estimate_bias