Activate makeCopulaHead in Stanford CoreNLP parser

蹲街弑〆低调 提交于 2019-12-11 03:24:12

问题


I want to use Stanford CoreNLP Parser to parse a sentence with the flag "makeCopulaHead" activated.

In my file input.txt, I have the following sentence:

I am tall.

The objective is to not have a copula relation (cop) in the output dependency tree.

I tried:

java -cp "*" -mx8g edu.stanford.nlp.pipeline.StanfordCoreNLP -makeCopulaHead -file input.txt 

The .xml file contains cop relation :(

I also tried (a bug with xml-output: https://mailman.stanford.edu/pipermail/java-nlp-user/2013-January/002959.html ?):

java -cp "*" -mx8g edu.stanford.nlp.pipeline.StanfordCoreNLP -makeCopulaHead -file input.txt -outputFormat text 

But it's the same thing...


回答1:


I've finally found out the solution, the correct line is:

java -cp "*" -mx8g edu.stanford.nlp.pipeline.StanfordCoreNLP -parse.flags " -makeCopulaHead" -file input.txt 

Don't forget the space in " -makeCopulaHead".



来源:https://stackoverflow.com/questions/26525859/activate-makecopulahead-in-stanford-corenlp-parser

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!