0
$\begingroup$

I'll start with some examples. Think about a sentence like "Mazda CX5 is a good car.". NLTK sentiment analysis module "Vader" will give a positive polarity score on the sentence. Meanwhile a positive score will also be assigned to a sentence like "Mazda CX5 is a better car compared to Subaru Forester." However, the sentence in fact has a negative sentiment towards Subaru Forester. I wonder if there is any algorithm can actually identify such sentiment difference between the general sentiment and sentiment against a certain word in the sentence.

$\endgroup$

2 Answers 2

1
$\begingroup$

Aspect based analysis tried to solve above problem. It categorizes data by aspect and assign sentiment to it. Lets say you have a restaurant review :

Food was good and service was bad

It will create 2 categories :

  1. Aspect : Food Sentiment : Positive
  2. Aspect : Service Sentiment : Negative
$\endgroup$
0
$\begingroup$

I faced a similar problem. Here it is what I did

  1. Parts of speech tagging with spacy
  2. Extract relationship. In your case it will be object(Mazda) comparative (than) object (Subaru) .
  3. .label the data set using multi labels: positive object , negative object . Each sentence will have two labels. For example under positive write Mazda, under negative write Subaru.
  4. Train using word2vec approach.
$\endgroup$

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.