Skip to content

Commit

Permalink
min, score
Browse files Browse the repository at this point in the history
  • Loading branch information
jlherzberg committed Nov 6, 2019
1 parent c00157a commit e7c4dde
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/tagnews/senteval/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def is_police_entity(self, entity):
def extract_google_priority_bin(article, cpd_model_val, cpd_val):
cop_words = sent_evaller().police_words
cop_word_counts = sum([article.count(substr) for substr in cop_words])
score = 0.5 * cpd_val + 0.25 * cpd_model_val + 0.25 * max(cop_word_counts / (2 * len(cop_words)), 1.)
score = 0.5 * cpd_val + 0.25 * cpd_model_val + 0.25 * min(cop_word_counts / (2 * len(cop_words)), 1.)
return score


def pre_process_text(html_text):
Expand Down

0 comments on commit e7c4dde

Please sign in to comment.