No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

#Neural Sentiment Translator


Require python 2.7, Tensorflow, Gensim (for word2vec model), and Numpy

dowload dataset from and extract into data/

Download google news negative 300 vectors and extract into model/




To train with GPU, add the --gpu flag:

python --gpu

To load a checkpoint, use --load (and --skip_train to skip the training step)

python --skip_train --load path/to/checkpoint/dir

To get the sentiment of a sentence, use the --custom_input flag:

python --skip_train --load path/to/checkpoint/dir --custom_input "input sentence"

To translate to a given sentiment use --target_sentiment (-1 or 0 is negative, 1 is positive):

python --skip_train --load path/to/checkpoint/dir --custom_input "input sentence" --target_sentiment [-1,1]