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

Remove debug logic

parent e63996a5
No related branches found
No related tags found
No related merge requests found
......@@ -128,8 +128,6 @@ def get_crisis_dataset():
date_path = topic_path / 'public' / 'content' / pub_date
for article_filename in util.files(date_path, extension='.cont'):
article_file_path = date_path / article_filename
if '1093.htm.cont' not in str(article_file_path):
continue
print(article_file_path)
article = {'pub_date': pub_date, 'sentences': []}
......@@ -144,8 +142,8 @@ def get_crisis_dataset():
# get date mentions using HeidelTime
# and add them to the sentence data
mentioned_dates_by_sentence = heideltime_util.mentioned_dates_by_sentence(article_file_path, pub_date)
mentioned_dates_by_sentence = mentioned_dates_by_sentence[1:]
assert len(mentioned_dates_by_sentence) == len(sentences_in_article) # skip first line (headline)
mentioned_dates_by_sentence = mentioned_dates_by_sentence[1:] # skip first line (headline)
assert len(mentioned_dates_by_sentence) == len(sentences_in_article)
for i in range(len(sentences_in_article)):
sentence = sentences_in_article[i]
sentence['mentioned_dates'] = mentioned_dates_by_sentence[i]
......
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