Skip to content

Commit

Permalink
Correct bin order
Browse files Browse the repository at this point in the history
  • Loading branch information
mchladek committed Jan 28, 2020
1 parent 7a3a158 commit 7872a99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tagnews/senteval/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(bins) if bin_max_val > score][0]
bin = [bin for bin, bin_max_val in enumerate(self.bins) if bin_max_val > score][-1]
return bin


Expand Down

0 comments on commit 7872a99

Please sign in to comment.