All Projects → awjuliani → DNN-Sentiment

awjuliani / DNN-Sentiment

Licence: MIT license
Convolutional and recurrent deep neural networks for text sentiment analysis.

Programming Languages

python
139335 projects - #7 most used programming language

DNN-Sentiment

Convolutional and recurrent deep neural networks for text sentiment analysis.

Convolutional model based on cnn-text-classification-tf.

Recurrent model based on example by aymericdamien.

Both models written in Tensorflow, and have been designed to allow for analyzing of sentinment of large text documents, such as works of literature once trained. Both can use word2vec to obtain pre-trained word embeddings to improve performance.

To train each model, run train_cnn.py and train_rnn.py.

In order to obtain sentiment of a text file, run:

python generateSentiment.py textfile model checkpoint

textfile is the document to analyze sentiment from. Don't include .txt extension. For example, when processing 'kafka.txt,' use 'kafka'

model is either "RNN" or "CNN"

checkpoint is the latest model checkpoint, contained in the runs or rnn_runs folder

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].