7c1b64977ca136ecd9e443041efbc6d4267cb180,sumy/algorithms/edmundson.py,EdmundsonMethod,key_method,#EdmundsonMethod#,83
Before Change
words = map(self.stem_word, self._document.words)
words = filter(self._is_bonus_word, words)
word_counts = Counter(self.stem_word(w) for w in words)
word_frequencies = word_counts.values()
max_word_frequency = 1 if not word_frequencies else max(word_frequencies)
significant_words = tuple(w for w, c in word_counts.items()
if c/max_word_frequency > weight)
return self._get_best_sentences(self._document.sentences,
sentences_count, self._rate_sentence_by_key_method,
significant_words)
def _is_bonus_word(self, word):
return word in self._bonus_words
After Change
summarization_method = EdmundsonKeyMethod(self._document, self._stemmer,
self._bonus_words)
return summarization_method(sentences_count, weight)
def title_method(self, sentences_count):
self.__check_null_words()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: miso-belica/sumy
Commit Name: 7c1b64977ca136ecd9e443041efbc6d4267cb180
Time: 2013-03-09
Author: miso.belica@gmail.com
File Name: sumy/algorithms/edmundson.py
Class Name: EdmundsonMethod
Method Name: key_method
Project Name: arogozhnikov/einops
Commit Name: 42745519957d6a3d6614a66a1bcba032cef42214
Time: 2020-09-05
Author: iamfullofspam@gmail.com
File Name: einops/layers/keras.py
Class Name: Reduce
Method Name: compute_output_shape
Project Name: arogozhnikov/einops
Commit Name: 42745519957d6a3d6614a66a1bcba032cef42214
Time: 2020-09-05
Author: iamfullofspam@gmail.com
File Name: einops/layers/keras.py
Class Name: Rearrange
Method Name: compute_output_shape