Commit 9715c4c2 authored by Jerome Wuerf's avatar Jerome Wuerf
Browse files

Refactor structural distance

parent c8372371
......@@ -139,10 +139,10 @@ class StructuralDistanceReranking(Reranking):
for topic_nrb, premises_pre_conclusions in tqdm(
self.premises_per_conclusions_per_topics.items()):
for premises_per_conclusion in tqdm(premises_pre_conclusions.values()):
conclusion_text = premises_per_conclusion['conclusion']['_source']['sentence_text']
conclusion = premises_per_conclusion['conclusion']
conclusion_text = conclusion['_source']['sentence_text']
conclusion[self.reranking_key] = structural_distance(
conclusion['_source']['sentence_text'],
conclusion_text,
self.topics.loc[topic_nrb]['topic'])
for premise in premises_per_conclusion['premises']:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment