The goal is as follows: I have a big article and I want to define the sentiment of the particular word. For example, the article describes pros and cons of bikes and cars and I want to find the sentiment of the word car.

In such an example I cannot use document-level SA as the article itself can be positive while the car was mentioned in a negative way.

So, I studied papers related to aspect-based sentiment analysis, but my constait is absence of data for training NNs. Hence, I concentrated on the approaches that basically do not involve training process. One of my attemts was to build sentiment analysis tool using word2vec and K-Means so that each cluster corresponds to one of three sentiments (pos, neg and neu). It actually worked great but I found that for some reason one word can be at two clusters at the same time. Plus it generally goes not give sentiment for specific keyword but for all aspects found in the text.
Another problem is that basically cannot test the correctness of the output if only not to read the text by myself and check whether the keyword belonged to the correct cluster or not.
So I came to the decision to make summarization of the article first and then applying sentiment analysis (like sentiwordnet or similar).

Question 1
Are there ways to improve word2vec+KMeans approach? Is it even worse improving?
Question 2
Is it a good idea to go through text summarization before sentiment analysis?
Question 2
Is there better way to find sentiment of the particular word without training process (due to no training data and small amount of unlabeled data)?

  • $\begingroup$ Your method is not clear to me: how do you obtain clusters which represent the 3 sentiment categories? In general without any labelled data I don't see how you can evaluate your approach. $\endgroup$ – Erwan Sep 5 '20 at 17:03
  • $\begingroup$ @Erwan as for the K-means, I firstly preprocessed obtained summary, then built Word2Vec model and built the K-Means model with X as Word2Vec. As for evaluation the only I can do for now, is just check by my own (like read the article by myself and define sentiment and then look what sentiment I obtained with code). $\endgroup$ – jas_0n Sep 5 '20 at 18:09
  • $\begingroup$ Sorry it's still not really clear: do your instances represent words or documents? As far as I understand you perform clustering on words, right? And after clustering, you happen to obtain clusters which represent sentiment according to your manual evaluation? $\endgroup$ – Erwan Sep 5 '20 at 20:56
  • $\begingroup$ @Erwan Yep, you understood everything right. But I don't actually like such approach, it's actually odd for getting sentiment just for particular word. $\endgroup$ – jas_0n Sep 6 '20 at 11:11

I'm not sure I completely get the idea, but it looks to me like what you're actually interested in is the sentiment of a word in a particular context: a content word like "car" might not carry a stable sentiment by itself, but its usage in a specific context might.

So I'd suggest a method like this: for any target word you extract either the sentence or a context window, i.e. N words on the left and N words on the right of the target word. Then you could use predefined sentiment analysis tools to extract a sentiment value for this instance. From there you could:

  • measure the mean sentiment for a word by averaging over the instances
  • compare the distribution of sentiment or average sentiment for two different words
  • $\begingroup$ Thanks, @Erwan, for the answer. I thought about counting the sentiment of the target word for the sentence (s) in which this word is used, using the sentiments of the words near the target. But I was not sure of the correctness of this approach. I previously studied work on entity (target) -based sentiment analysis, and usually, these were quite complex architectures. For this reason, this "simple" approach raised my doubts. $\endgroup$ – jas_0n Sep 6 '20 at 15:10

I am not sure what you are asking exactly, so if you are looking to determine the overall sentiment of the car throughout the whole text you have to deal with "Anaphora resolution" first, because the first obstacle you will encounter is how to know what the "it, its, she, her..." referring to, maybe the car, maybe something else. another way to overcome this problem " if it is the case", if your document is small you can manually extract the sentences that refer to the car.

After that, you can use a NLTK module for sentiment analysis called Vader "https://towardsdatascience.com/sentimental-analysis-using-vader-a3415fef7664" you just give it the sentences one by one, or if you want the overall score combine them together and hit RUN :)


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.