以下請求'http://corenlp.run'將標籤'dep'分配給所有依賴關係。有人可以解釋這種行爲嗎?對我來說看起來像一個問題,或者這可能是來自公共端點的限制(速率限制)嗎?但是,web-interface會返回正確的響應。CoreNLP服務器將'dep'分配給所有依賴關係
wget --post-data "Having earned a doctorate as a physical chemist, Merkel entered politics in the wake of the Revolutions of 1989, briefly serving as a deputy spokesperson for the first democratically-elected East German Government in 1990. Following German reunification in 1990, Merkel was elected to the Bundestag for Stralsund-Nordvorpommern-Rügen in the state of Mecklenburg-Vorpommern, a seat she has held ever since. Merkel was later appointed as the Minister for Women and Youth in 1991 under Chancellor Helmut Kohl, later becoming the Minister for the Environment in 1994. After Kohl was defeated in 1998, Merkel was elected Secretary-General of the CDU before becoming the party's first woman leader two years later in the aftermath of a donations scandal that toppled Wolfgang Schäuble." 'http://corenlp.run/?properties={"tokenize.whitespace": "true", "annotators": "tokenize,ssplit,pos,lemma,ner,parse, depparse,mention,coref", "outputFormat": "json",'timeout': 30000}' -O -
對於其他輸入,解析屬性響應看起來很奇怪。 Web界面的答案再次正確。例如,對於一個錯誤的解析響應:
"parse":"(X ... (X their) (X stomachs) (X while) (X simultaneously) (X appealing) (X to) (X their) (X vanity.) (X The) ...)"
我試過公共端點,因爲最新的編譯版本從這個遭受和GitHub的代碼庫建立的指令似乎已經過時。我完全錯過了一個指南,它描述瞭如何構建Github回購的命令包here中提供的* .jars。
UPDATE:
只是試圖用本地實例和最新CoreNLP服務器相同的請求。同樣的問題。只有Web界面纔會返回正確的響應。如果我刪除了解析註釋器,它就可以工作。不過,我需要兩個註釋。
我實際上想要在給定的「文檔」級別上對每個句子和coref進行分析和排序。我看到了問題。由於我使用了空格標記器,並且所有完整標記都是標記的一部分,因此'ssplit'將整個輸入記錄爲單個句子。我的錯,謝謝你指點我!每個單獨的句子都不會達到parse.maxlen值,因此這應該不成問題。你知道一個指導,解釋誰從Github代碼編譯CoreNLP服務器? – user2715478
編譯服務器應該像運行'ant'(或'ant jar'來製作一個jar)一樣簡單。請注意,您還需要下載相關的模型jar(自述文件中的鏈接)。然後,除了你需要的'lib /'目錄中的任何庫之外,把它們都放到你的classpath中。 –
是的,'螞蟻罐'做了詭計。應該添加[這裏](https://github.com/stanfordnlp/CoreNLP/wiki/Compilation-Instructions)。非常感謝你! – user2715478