I'm trying to do sentiment analysis of News Headlines about a particular subject mentioned in it.

Initially, I used TextBlob library for sentiment analysis to generate a polarity score. But the polarity score being generated for news headlines are not accurate. It is classifying negative news as positive news.

For example: Goldman Sachs CEO apologizes to people of Malaysia. This news is being classified as positive.

Post that, I've tried to build a custom model using spaCy library. I trained the custom model on 500 manually labelled news headlines. After training the model, I ran it on new set of headlines. The accuracy has improved but there is still scope for improvement. The accuracy is particularly poor with regard to financial news and editorial headlines.

My expectations is to create a model that can accurately predict the sentiment of news headline. So that I can plot sentiment trend about the subject over a time period.

  • $\begingroup$ what is the question?! $\endgroup$
    – asmgx
    Aug 5, 2019 at 4:24
  • $\begingroup$ You can completely build your model using any deep learning framework and also using Word2Vec for vectorizing the headlines. $\endgroup$ Aug 5, 2019 at 5:01
  • 2
    $\begingroup$ One problem with sentiment analysis is that it can be very subjective. For instance, a CEO apologizing can be considered positive as is shows that he is admitting his mistakes. One suggestion to this is providing scores to both positive and negative class. Or you can convert the classification problem into a regression one. $\endgroup$
    – atmarges
    Aug 5, 2019 at 7:08
  • $\begingroup$ five hundred headlines seems to be a very small training set for such a task. you can get better results with more training data. you can also try editing the sentiment lexicon by moving unsuitable words into the negative sentiment word set. trump is an example of a word that gets marked as positive sentiment while actually it is an entity that should not have any sentiment value. $\endgroup$
    – Rohit
    Aug 7, 2021 at 16:18

1 Answer 1

  1. Try to find a pattern in the sentences which are failing.
  2. Use negspacy, find out words which are negative, replace them with opposite words. eg - 'not good' -> 'bad'
  3. try using bert transformers pretrained sentiment classification models.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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