statsmaths / cleanNLP

R package providing annotators and a normalized data model for natural language processing
GNU Lesser General Public License v2.1
209 stars 36 forks source link

Collapsed Dependencies with CoreNLP #48

Closed kanishkamisra closed 5 years ago

kanishkamisra commented 5 years ago

Hi!

Thanks a lot for working on this package! I was wondering if there is a way to obtain CoreNLP's collapsed dependencies within cleanNLP. I know this functionality exists in your coreNLP package for R, but I would love it if it were possible to do it here too!

thanks :)

kanishkamisra commented 5 years ago

I have a feeling the relation_full does the trick however since it uses UD dependencies, it shows (as an example) prep:in as nmod:in. Please correct me if I am wrong!

statsmaths commented 5 years ago

Yes, I believe you're correct about the relation_full column. If you have an example where the online tool (or coreNLP directly) does something different, though, please open a request and I will try to figure out how to get it into the output.

kanishkamisra commented 5 years ago

I was wondering if its possible to add separate columns for the various kinds of dependencies that are possible with corenlp (like basic, collapsed, collapsed cc-processed, etc.) and maybe let the user pass what they want. I am not sure if this is how the current code does it but I feel users who have knowledge about corenlp and have used it before might find this useful.