2013-02-21 70 views
0

我正在關注此文檔:LingPipe和情感分析

http://alias-i.com/lingpipe/demos/tutorial/sentiment/read-me.html使用lingpipe進行情緒分析。

其中一個步驟說「假設數據位於目錄POLARITY_DIR和sentimentDemo.jar文件存在(如果jar不存在,編譯它),演示可以從命令行」

我無法找到SentimentDemo.jar文件。嘗試Windows搜索。 那麼我們如何編譯它?我不熟悉在Windows上使用Ant,以及如何編譯lingpipe jar文件 - 它的任何指導都是值得讚賞的!

而且當我嘗試運行代碼:

java 
-cp "sentimentDemo.jar; 
    ../../../lingpipe-4.1.0.jar" 
PolarityBasic POLARITY_DIR 

我得到的錯誤,說: 「錯誤:無法找到或加載主類PolarityBasic」

我已經配置polarity_dir所以我猜測這不是問題。

附加信息:

I am on windows 7 using lingpipe 4.1.0

在完成本教程的任何指導感激,謝謝!

+0

解決!博客:http://parasdoshi.com/2013/02/22/sentiment-analysis-using-lingpipe-on-windows-7/ – 2013-02-22 06:18:08

回答

1

你應該可以用「ant jar」來建立jar文件。

該命令,建議在本教程(LingPipe: Sentiment Analysis Tutorial

...(if it doesn't, run ant jar to create it)...

你需要安裝Ant(從ant.apache.org),並將其添加到您的PATH稍晚。在運行ant之前,您可能必須設置ANT_HOME和/或JAVA_HOME環境變量。

+0

謝謝!我爲我工作。我在這裏發表了博文:http://parasdoshi.com/2013/02/22/sentiment-analysis-using-lingpipe-on-windows-7/ – 2013-02-22 06:17:20