diff --git a/lib/tagnews/senteval/eval.py b/lib/tagnews/senteval/eval.py index 0112726..b140c1a 100644 --- a/lib/tagnews/senteval/eval.py +++ b/lib/tagnews/senteval/eval.py @@ -66,7 +66,7 @@ def is_police_entity(self, entity): def extract_google_priority_bin(self, article:str, cpd_model_val=1, cpd_val=1): cop_word_counts = sum([article.count(substr) for substr in self.police_words]) score = 0.5 * cpd_val + 0.25 * cpd_model_val + 0.25 * min(cop_word_counts / (2 * len(self.police_words)), 1.) - bin = [bin for bin, bin_max_val in enumerate(self.bins) if bin_max_val > score][-1] + bin = [bin for bin, bin_max_val in enumerate(self.bins) if bin_max_val >= score][-1] return bin