Skip to content

Commit

Permalink
type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
jlherzberg committed Jan 15, 2020
1 parent 7d38545 commit f79018e
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 @@ -63,7 +63,7 @@ def is_police_entity(self, entity):
return entity
return False

def extract_google_priority_bin(self, article, cpd_model_val=1, cpd_val=1):
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]
Expand Down

0 comments on commit f79018e

Please sign in to comment.