Closed leonli02 closed 9 years ago
Thanks for the report! I think this has to do with some different behavior between SD and UD (see issue #10). I'll take a look.
In the meantime, I would recommend using the subprocess backend for UD, if possible. The JPype backend calls Java code based on EnglishGrammaticalStructure, but should probably be following UniversalEnglishGrammaticalStructure instead (just a guess).
Hi dmcc,
Thanks for your reply. JPype backend has better performance on big data sets, so I spent some time on your project and found the solution. I changed 'trees.EnglishGrammaticalStructure' to 'trees.UniversalEnglishGrammaticalStructure' in JPypeBackend.py line 54, and obtained same result as subprocess backend.
I also found that version 3.5.2 changed universal dependencies as default setting, maybe this is the reason why I got two different results.
Thanks for your help! There's now support for UD with a new patch (https://github.com/dmcc/PyStanfordDependencies/commit/54c84beb256a93bcf4d9f69b5c070f0f68e2a067). It defaults to using UD but can go back to SD if you pass universal=False
. If you're interested in testing it, please let me know if you run into any problems.
Hi,
I got different results when using two different backends with same stanford corenlp jar. It seems like the result from subprocess is identical to the one from Stanford online demo. I've also gone through the python code but still couldn't figure it out.
I'd be appreciated if you can offer me any advice.