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

Refactor keywords

parent 36410d73
No related branches found
No related tags found
No related merge requests found
......@@ -2,16 +2,26 @@ import dataset
import evaluation
import timeline_generation
keywords_by_topic = {
'bpoil': ['bp', 'oil', 'spill'],
'EgyptianProtest': ['egypt', 'egyptian'],
'Finan': ['financial', 'economic', 'crisis'],
'H1N1': ['h1n1', 'swine', 'flu'],
'haiti': ['haiti', 'quake', 'earthquake'],
'IraqWar': ['iraq', 'iraqi'],
'LibyaWar': ['libya', 'libyan'],
'MJ': ['michael', 'jackson'],
'SyrianCrisis': ['syria', 'syrian']
}
def main():
def main():
data = dataset.get_timeline17_dataset('data/in/timeline17/Data')
for topic in data.keys():
articles = data[topic]['articles']
gold_timelines = data[topic]['gold_timelines']
keywords = ['bp', 'oil', 'spill']
keywords = keywords_by_topic[topic]
for gold_timeline_name, gold_timeline in gold_timelines.items():
print(f'Topic {topic}, gold timeline {gold_timeline_name}')
......
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