Skip to content
Snippets Groups Projects
Commit 47655bce authored by Maja Jablonska's avatar Maja Jablonska
Browse files

Add a safer use_sem accessor method in predict.py

parent 28f79649
Branches
Tags
1 merge request!46Merge COMBO 3.0 into master
......@@ -150,7 +150,7 @@ class COMBO(PredictorModule):
if self.without_sentence_embedding:
outputs.sentence_embedding = []
if self.line_to_conllu:
return sentence2conllu(outputs, keep_semrel=self.dataset_reader.use_sem).serialize()
return sentence2conllu(outputs, keep_semrel=getattr(self.dataset_reader, 'use_sem', False)).serialize()
else:
return outputs.to_json()
......
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