2015-07-28 38 views
1

我一直在試圖使用與斯坦福CoreNLP 3.5.2打包的自然邏輯推理組件(Naturalli)來提取關係三元組......但是,在創建新的OpenIE實例時,我得到以下異常:自然邏輯推理

Could not load affinity model at edu/stanford/nlp/naturalli/: Could not find a part of the path '...\edu\stanford\nlp\naturalli\pp.tab.gz' 

我試圖在網上搜索pp.tab.gz文件,但找不到它。然後我試圖通過禁用的親和力得到解決:

Properties props = new Properties(); 
props.put("ignoreaffinity", true); 
OpenIE ie = new OpenIE(props); 

但後來我開始這個以下異常:

Could not load clause splitter model at edu/stanford/nlp/naturalli/clauseSplitterModel.ser.gz: Unable to resolve "edu/stanford/nlp/naturalli/clauseSplitterModel.ser.gz" as either class path, filename or URL 

與此文件同樣的問題......我到處都找不到它。 有關如何解決這些問題的任何幫助,非常感謝!感謝所有參與進階的人!

回答

1

這個最近被提出來,也有一些可以在這裏下載:

http://nlp.stanford.edu/software/openie.shtml

我會建議使用的罐子指出存在的,而不是斯坦福CoreNLP 3.5.2版本。

+0

謝謝!我無法在任何地方找到它們! –

+0

您還可以使用[CoreNLP代碼的GitHub版本](https://github.com/stanfordnlp/CoreNLP)以及當前的模型文件:http://nlp.stanford.edu/software/stanford-corenlp -models-current.jar。我會從StanfordNLP主頁添加一個鏈接到項目:)。 –

+0

謝謝!我非常感謝您的反饋!我真的很喜歡你的框架! –