2
$\begingroup$

We can do text classification as positive and negative as mentioned in below notebook. But is there any way to classify neutral sentiment also?

https://colab.research.google.com/github/google-research/bert/blob/master/predicting_movie_reviews_with_bert_on_tf_hub.ipynb

Actually, I want to know like what kind of changes do we need to make in the above notebook so that it can classify neutral sentiments also besides positive and negative.

Thanks in advance.

$\endgroup$
0
$\begingroup$

Welcome to DS.SE, @prashanth

Yes! In general, it is possible to classify the documents to more than two classes of positive and negative sentiments as long as you have such labels in your training set.

Please take a look at this for some more general information about the sentiment analysis, tools, and applications.

|improve this answer|||||
$\endgroup$
  • $\begingroup$ Thanks for the response. Actually, I want to know like what kind of changes do we need to make in the above notebook so that it can classify neutral sentiments also besides positive and negative. $\endgroup$ – Prashanth Jun 11 '19 at 7:13
  • $\begingroup$ The dataset that is used in this notebook has only two labels (look at the polarity column which only has 0 and 1). If your data has more than two labels, I do not see much change needed except minor modifications such as load_dataset function that generates the polarity and label_list array that contains the labels. Other parts seem generic and very generalizable. $\endgroup$ – Borhan Kazimipour Jun 11 '19 at 7:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.