Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spacy Interface with ace #127

Open
ysfarag1 opened this issue Jul 11, 2024 · 3 comments
Open

Spacy Interface with ace #127

ysfarag1 opened this issue Jul 11, 2024 · 3 comments

Comments

@ysfarag1
Copy link

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)

@dwadden
Copy link
Owner

dwadden commented Aug 2, 2024

Thanks for your interest! I'm sorry to say I can't offer support for spacy bindings; this was contributed by @e3oroush a few years ago now. Maybe he can help?

@e3oroush
Copy link
Contributor

e3oroush commented Aug 3, 2024

I'm sorry, I'm not available at the moment, but will try to take a look at it next week.

@e3oroush
Copy link
Contributor

e3oroush commented Aug 6, 2024

@ysfarag1 Thank you for your question.
Is it possible to write all the steps you've made to reproduce the issue? As I can't reproduce it. Can you confirm that the problem is only existing when you use spacy interface?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants