Skip to content
Snippets Groups Projects
Commit 037dba51 authored by vvye's avatar vvye
Browse files

Reword comment

parent 2ec78b3f
No related branches found
No related tags found
No related merge requests found
......@@ -26,8 +26,7 @@ def rank_dates_by_wilson(articles, start_date, end_date):
if pub_date != mentioned_date and start_date <= mentioned_date <= end_date:
pub_to_mention_count[(pub_date, mentioned_date)] += 1
# the edge weight for each published -> mentioned pair
# is how often it occurs * the temporal distance between the dates
# the edge weight for each published -> mentioned pair is (occurrence count) * (temporal distance between the dates)
edges = []
for pub_date, mentioned_date in pub_to_mention_count.keys():
date_diff = (datetime.strptime(pub_date, '%Y-%m-%d') - datetime.strptime(mentioned_date, '%Y-%m-%d')).days
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment