Given list of labelled words, finding sentiment

machine_learning
sentiment_analysis

#1

I have been provided a list of words with their scores being positive or negative. Using this how do find the sentiment of new sentences. It is different from most of the tutorials available as they use existing labelled sentences(not individual words) to create the feature-sets.
Since I have individual words can I create a feature-set such that each feature consists of all the words except one marked as false and the sentiment of the existing word.


#2

Let me explain to you why you should use overall sentiment score of a sentence instead of individual words for sentiment analysis.

Suppose you have a sentence:

The cake you brought was not tasty enough.

Let’s see what will be the sentiment of our sentence when we have sentiments scores of individual words. (For brevity, we will use 0 as neutral, 1 as positive and -1 as negative sentiment)

The -> 0
cake -> 0
you -> 0
brought -> 0
was -> 0
not -> (-1)
tasty -> 1
enough -> 0

From these scores, how would you approach a sentiment analysis problem?

You can -

  • Naively say that if a negative word occurs, the sentiment should be negative. But approach is wrong, because what if the sentence has “not bad” in it?
  • Take a cumulative score of all the words in the form of summation or multiplication. This approach is a little better, because you can then model the overall sentiment of the sentence.

I myself am not well versed in NLP, so I cannot give you a concrete solution to the problem. But I would advise you to read the article below and gain insights from it.

If you are successful in solving the problem, do share your solution to the community. Good luck!