SentimentAnalysisParser

Combines Apache OpenNLP and Apache Tika and provides facilities for automatically deriving sentiment from text.

License

License

GroupId

GroupId

edu.usc.ir
ArtifactId

ArtifactId

sentiment-analysis-parser
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

jar
Description

Description

SentimentAnalysisParser
Combines Apache OpenNLP and Apache Tika and provides facilities for automatically deriving sentiment from text.
Project URL

Project URL

https://github.com/USCDataScience/SentimentAnalysisParser
Source Code Management

Source Code Management

https://github.com/USCDataScience/SentimentAnalysisParser.git

Download sentiment-analysis-parser

How to add to project

<!-- https://jarcasting.com/artifacts/edu.usc.ir/sentiment-analysis-parser/ -->
<dependency>
    <groupId>edu.usc.ir</groupId>
    <artifactId>sentiment-analysis-parser</artifactId>
    <version>0.1</version>
</dependency>
// https://jarcasting.com/artifacts/edu.usc.ir/sentiment-analysis-parser/
implementation 'edu.usc.ir:sentiment-analysis-parser:0.1'
// https://jarcasting.com/artifacts/edu.usc.ir/sentiment-analysis-parser/
implementation ("edu.usc.ir:sentiment-analysis-parser:0.1")
'edu.usc.ir:sentiment-analysis-parser:jar:0.1'
<dependency org="edu.usc.ir" name="sentiment-analysis-parser" rev="0.1">
  <artifact name="sentiment-analysis-parser" type="jar" />
</dependency>
@Grapes(
@Grab(group='edu.usc.ir', module='sentiment-analysis-parser', version='0.1')
)
libraryDependencies += "edu.usc.ir" % "sentiment-analysis-parser" % "0.1"
[edu.usc.ir/sentiment-analysis-parser "0.1"]

Dependencies

compile (9)

Group / Artifact Type Version
org.apache.tika : tika-core jar 1.13
org.apache.tika : tika-parsers jar 1.13
org.apache.tika : tika-langdetect jar 1.13
org.apache.tika : tika-batch jar 1.13
org.apache.opennlp : opennlp-tools jar 1.6.0
org.slf4j : slf4j-log4j12 jar 1.7.21
org.slf4j : jul-to-slf4j jar 1.7.21
org.slf4j : jcl-over-slf4j jar 1.7.21
log4j : log4j jar 1.2.17

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Sentiment Analysis Parser

A parser performing sentiment analysis that uses the Apache OpenNLP and Apache Tika libraries to perform text analysis on the the Large Movie Review Dataset. Negative and positive reviews were combined together in a file "result", and each review has a "positive" or a "negative" label before it.

Use

How to build Sentiment Analysis Parser

$ cd $HOME/src
$ git clone https://github.com/USCDataScience/SentimentAnalysisParser
$ cd SentimentAnalysisParser
$ mvn install assembly:assembly

How to train a model

$ cd target/sentiment
$ mkdir -p model/org/apache/tika/parser/sentiment/topic/
$ bin/sentiment SentimentTrainer -model model/org/apache/tika/parser/sentiment/topic/en-sentiment.bin -lang en -data ./../../examples/categorical_dataset -encoding UTF-8

The model is written to en-sentiment.bin

How to run the parser

Make sure you are in target/sentiment

$ bin/sentiment Tika -model model/org/apache/tika/parser/sentiment/topic/en-sentiment.bin -o ../../examples/gun-output1 -j ../../examples/gun-ads

Contributors

  • Chris A. Mattmann, JPL
  • Anastasija Mensikova, Trinity College, CT

Credits

This project began as the Google Summer of Code 2016 project of Anastasija Mensikova for Apache Software Foundation under the supervision of Chris Mattmann

License

Apache License, version 2

edu.usc.ir

USC Information Retrieval & Data Science

USC Information Retrieval and Data Science Group

Versions

Version
0.1