Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sentiment Analysis using tensorflow

I am exploring tensorflow and would like to do sentiment analysis using the options available. I had a look at the following tutorial http://www.tensorflow.org/tutorials/recurrent/index.html#language_modeling

I have worked woth Naive Bayes Classifier, Maximum Entropy Algorithm and Scikit Learn Classifier and would like to know if there are any better algorithms offered by tensorflow. Is this the right place to start or are there any other options?

Any help pointing in the right direction would be greatly appreciated.

Thanks in advance.

like image 220
Radhakrishnan Avatar asked Dec 10 '15 05:12

Radhakrishnan


People also ask

Can TensorFlow be used for NLP?

TOP REVIEWS FROM NATURAL LANGUAGE PROCESSING IN TENSORFLOWTeaches NLP thoroughly, going from the basics such as tokenization and padding to complex topics such as word embeddings and sequence models (like RNNs, LSTMs and GRUs).

Which deep learning model is best for sentiment analysis?

RNNs are probably the most commonly used deep learning models for NLP and with good reason. Because these networks are recurrent, they are ideal for working with sequential data such as text. In sentiment analysis, they can be used to repeatedly predict the sentiment as each token in a piece of text is ingested.

Which algorithm is best for sentiment analysis?

Hybrid approach. Hybrid sentiment analysis models are the most modern, efficient, and widely-used approach for sentiment analysis.


1 Answers

A commonly used approach would be using a Convolutional Neural Network (CNN) to do sentiment analysis. You can find a great explanation/tutorial in this WildML blogpost. The accompanying TensorFlow code can be found here.

Another approach would be using an LSTM (or related network), you can find example implementations online, a good starting point is this blogpost.

like image 163
Fematich Avatar answered Oct 26 '22 16:10

Fematich