-
Notifications
You must be signed in to change notification settings - Fork 122
Description
I have been following on the steps of the mechanic spacy interface notebook and wanted to replicate the same for ace event and relations.
I followed the same steps as for the coarse and granular, but there seems to be something off with it as I am not getting any output for the same examples that the coarse and granular models generate results for .
Any help is appreciated
nlp_ace_event = spacy.load('en_core_web_sm')
nlp_ace_rel = spacy.load('en_core_web_sm')
component_ace_event = DygieppPipe(nlp_ace_event,pretrained_filepath="./pretrained/ace05-event.tar.gz", dataset_name="ace-event")
component_ace_rel = DygieppPipe(nlp_ace_rel,pretrained_filepath="./pretrained/ace05-relation.tar.gz", dataset_name="ace05")
nlp_ace_event.add_pipe(component_ace_event)
nlp_ace_rel.add_pipe(component_ace_rel)
print("----------------------------ace event----------------------------")
for doc in nlp_ace_event.pipe(examples):
print(doc)
print("--------")
print("Relations:")
for sent_ev in doc._.events:
for ev in sent_ev:
print(ev)
print("----------------------------ace rel----------------------------")
for doc in nlp_ace_rel.pipe(examples):
print(doc)
print("--------")
print("Relations:")
for sent_rel in doc._.rels:
for rel in sent_rel:
print(rel)