diff --git a/date_selection.py b/date_selection.py index b93a1aecfd7a17f6506464d79ad215f01aba01dc..f26ea7ec8431eda886e1eed355186aa78ad217aa 100644 --- a/date_selection.py +++ b/date_selection.py @@ -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