2016-11-16 131 views
1

我在使用斯坦福大學Lemmatizer時遇到了麻煩。 由於我使用Intellij IDE,我嘗試通過依賴窗口導入它,但我無法通過該方式訪問所有類。進口斯坦福nlp Intellij

有沒有辦法在Intellij上正確導入stanford-english-corenlp-models-current.jar & stanford-corenlp-models-current.jar?

+0

你的意思是什麼,但我不能訪問所有的類那樣。? –

+0

所有這些導入: import edu.stanford.nlp.ling.CoreAnnotations.LemmaAnnotation; import edu.stanford.nlp.ling.CoreAnnotations.SentencesAnnotation; import edu.stanford.nlp.ling.CoreAnnotations.TokensAnnotation; import edu.stanford.nlp.ling.CoreLabel; import edu.stanford.nlp.pipeline.Annotation; import edu.stanford.nlp.pipeline.StanfordCoreNLP; import edu.stanford.nlp.util.CoreMap;找不到。 我只有導入edu.stanford.nlp.demo。*; – soundlicious

+0

看來你正在使用一個錯誤的jar文件。請確保獲得正確的罐子 –

回答

2

正如傢伙上面提到的,你只需要導入錯誤的文件

首先,下載CoreNLP 3.7.0(測試版) enter image description here

在上面的屏幕截圖,點擊紅色按鈕下載文件,其中涵蓋了運行CoreNLP的所有內容。

其次,右鍵單擊您要導入罐子,打開「開放模塊設置」潘內爾模塊,那麼你可能會得到這樣

enter image description here

圖片點擊綠色的加號按鈕導入所有的東西

enter image description here

注意:這是我點到你的目錄。

然後點擊 「應用」 和 「OK」

這是done.Enjoy吧!

參考:

http://stanfordnlp.github.io/CoreNLP/ (CoreNLP官方網頁)

http://jingyan.baidu.com/article/fec7a1e5f79e2b1191b4e74f.html (如何在中國的進口在罐子的IntelliJ)

+0

確實我沒有下載好的jar ......我的不好-_-「謝謝你們,它現在完美了! – soundlicious