allenai / allennlp

An open-source NLP research library, built on PyTorch.
http://www.allennlp.org
Apache License 2.0
11.74k stars 2.24k forks source link

Different results when running Open IE using online demo vs python code #4943

Closed Tharu87 closed 3 years ago

Tharu87 commented 3 years ago

The results from the online demo version of Open IE is different from the results I get when calling the model from python code, even it is using the exact same model stated on the demo page (openie-model.2020.03.26.tar.gz).

For example, the sentence "Yellowstone National Park is in the United States of America." yields the following results when using the online demo: [ARG1: Yellowstone National Park] [V: is] [ARG2: in the United States of America.] while calling the model from the code yields no results. Anyone can shed some light on why this might be?

AkshitaB commented 3 years ago

@Tharu87 Thank you for pointing this out. The issue is caused by the latest update to SpacyTokenizer, which tags auxiliary verbs like "is" as AUX instead of VERB. This should be resolved by this fix.

Tharu87 commented 3 years ago

Works like a charm, thank you @AkshitaB!