Code for Deeply Moving: Deep Learning for Sentiment Analysis
The original code was written in Matlab. Due to the strong interest in this work we decided to re-write the entire algorithm in Java for easier and more scalable use without license restrictions.
The current model is integrated into Stanford CoreNLP as of version 3.3.0 and is available here. This includes the model and the source code, as well as the parser and sentence splitter needed to use the sentiment tool.
You can run this code with our trained model on text files with the following command:
java -cp "*" -mx5g edu.stanford.nlp.sentiment.SentimentPipeline -file foo.txt
An evaluation tool is included with the distribution:
java edu.stanford.nlp.sentiment.Evaluate edu/stanford/nlp/models/sentiment/sentiment.ser.gz test.txt
Models can be retrained using the following command using the PTB format dataset:
java -mx8g edu.stanford.nlp.sentiment.SentimentTraining -numHid 25 -trainPath train.txt -devPath dev.txt -train -model model.ser.gz
Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank
Conference on Empirical Methods in Natural Language Processing (EMNLP 2013)
This webpage requires one of the following web browsers: