CogComp / cogcomp-nlpy

CogComp's light-weight Python NLP annotators
http://nlp.cogcomp.org/
Other
116 stars 26 forks source link

unable to Use Some Annotators #121

Closed sagarsanjeev closed 5 years ago

sagarsanjeev commented 6 years ago

I am Unable to Use Some of Annotators Like Relations And Coref(Stanford) as these are avaliable in the the package of cogcomp-nlp and also present in the demo version

Can Anyone Please Help

danyaljj commented 6 years ago

Are you getting any errors?

sagarsanjeev commented 6 years ago

ya i tried the AttributeError: 'TextAnnotation' object has no attribute 'get_relations'

sagarsanjeev commented 6 years ago

for Coref i am not able to find which function to call

danyaljj commented 6 years ago

Are you using local pipeline or remote pipeline? Can put paste here a code snippet you have tried?

sagarsanjeev commented 6 years ago

i am Using Remote Pipeline from ccg_nlpy import remote_pipeline from ccg_nlpy.core.view import View pipeline = remote_pipeline.RemotePipeline() doc = pipeline.doc("Rick is Married to Priya")

print(doc.view.get_relations)

print(doc.get_lemma)

print(doc.get_ner_conll)

print(doc.get_ner_ontonotes)

print(doc.get_srl_verb)

print(doc.annotate(article.text, properties={"annotators":"coref"}))

danyaljj commented 6 years ago

In order to use the remote server, you have the server running somewhere. Have you done that? https://github.com/CogComp/cogcomp-nlpy#remote-pipeline

To verify this, do any other annotations work for you? (say doc.get_lemma)

sagarsanjeev commented 6 years ago

Ya i Have A Server Running I Just Need Help That i cannot call the Relation,Coref(Stanford) Annotator in this but i am able to i to use the get_lemma get_ner_conll etc

sagarsanjeev commented 5 years ago

Solved