Mahout Sentiment Test
Java
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
README
pom.xml

README

Abstract:

Preparation:

cd src/test/resourcez
tar -xjf review-imdb.tbz2
tar -xjf review-polarity.tbz2

Setup Eclipse:

mvn eclipse:eclipse

Import the project an run the train and test phase (Run -> Run configurations ...)

Train:
com.memonews.mahout.sentiment.SentimentModelTrainer src/test/resources/review-imdb/train target/model
com.memonews.mahout.sentiment.SentimentModelTrainer src/test/resources/review-polarity/train target/model

Output (imdb example):

    25000 training files
    0.00  0.00	0.00	0.00	0.0000000	0.0000000	1	0.000	0.00	none
    0.00	0.00	0.00	0.00	0.0000000	0.0000000	2	0.000	0.00	none
    0.00	0.00	0.00	0.00	0.0000000	0.0000000	3	0.000	0.00	none
    0.00	0.00	0.00	0.00	0.0000000	0.0000000	4	0.000	0.00	none
    0.00	0.00	0.00	0.00	0.0000000	0.0000000	6	0.000	0.00	none
    ...

Test:
com.memonews.mahout.sentiment.SentimentModelTester --input src/test/resources/review-imdb/test/ --model target/model
com.memonews.mahout.sentiment.SentimentModelTester --input src/test/resources/review-polarity/test/ --model target/model