I am following this document:

http://alias-i.com/lingpipe/demos/tutorial/sentiment/read-me.html to perform sentiment analysis using lingpipe.

One of the steps says that "Assuming the data is in the directory POLARITY_DIR and the sentimentDemo.jar file exists (if the jar doesn't exist, compile it), the demo may be run from the command line"

I am not able to find the SentimentDemo.jar file. Tried windows search. So how do we compile it? I am not familiar with using Ant on windows and how to compile lingpipe jar files w/ it - any guidance is appreciated!

Also When I try to run the code:

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

I get the error saying that: "Error: Could not find or load main class PolarityBasic"

I've configured polarity_dir so I am guessing that this isn't an issue.

Additional Info:

I am on windows 7 using lingpipe 4.1.0

Any guidance in completing the tutorial is appreciated, Thanks!

有帮助吗?

解决方案

You should be able to build the jar file with "ant jar".

That command is suggested a little later in the tutorial (LingPipe: Sentiment Analysis Tutorial)

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

You'll need to install Ant (from ant.apache.org), and add it to your PATH. And you may have to set the ANT_HOME and/or JAVA_HOME environment variables prior to running ant.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top