Closed lighteternal closed 4 years ago
Update: I was able to pass the exact list of annotators to the StanfordNLP instance like this:
triples = client.annotate(corpus, properties={ "annotators":"tokenize,ssplit,pos,lemma,depparse,ner,coref,mention,natlog,openie", "outputFormat": "json", "openie.format": "ollie", "openie.resolve_coref": "true", })
However, no matter what kind of annotators I add, I get the following error:
AnnotationException: java.lang.IllegalArgumentException: annotator "openie" requires annotation "CorefChainAnnotation". The usual requirements for this annotator are: tokenize,ssplit,pos,lemma,depparse,natlog
I can extract triples without issues if I put the "openie.resolve_coref":
to false.
There must be a connection with this issue: https://github.com/stanfordnlp/CoreNLP/issues/789
Has anyone figured out how to overcome this problem?
@lighteternal yep that's the correct way to use it. But it seems like you're trying to do something that the lib does not really allow. Maybe it will be available with the 4.0.0.
You'll have to change the version here: https://github.com/philipperemy/Stanford-OpenIE-Python/blob/f01a302878ee584870276a63fcac4aff925de087/openie/openie.py#L13
Let me know :)
Thanks for the feedback! Closing this and will update when v4 becomes available.
Thank you!
any update on this
Yup, stumbled upon this too... Any news?
Hi, I would like to know if there's an option for coreference resolution in the python wrapper of OpenIE, similar to the Java implementation.
Thx!