Lynten / stanford-corenlp

Python wrapper for Stanford CoreNLP.
MIT License
919 stars 200 forks source link

No nice way to reclaim original text of a sentence #66

Open demongolem opened 5 years ago

demongolem commented 5 years ago

I call nlp.annotate and then I get a json object from this returned value to get a dict. This dict has no key which corresponds the original text of the sentence. In java, we can easily get that by CoreAnnotations.TextAnnotation, but now that I am in Python, I seem to be on my one to piece the sentence back together which can be difficult in certain cases.