I want to perform clustering to give words meaning like good, neutral and bad. My dataset is in the format :

product id       describers       ratings
     1         [great,lovely,        4
     2         [bad,wonderful,       3
     3         [poor, bad]           1

I want to cluster these words in the list based on ratings like obviously logically wonderful,lovely,amazing should be clustered as one and bad, worst etc. as another cluster. How can I cluster this type of dataset and then assign these cluster values of positive, neutral, negative ?

  • $\begingroup$ I doubt that clustering is the right tool here. $\endgroup$ – Has QUIT--Anony-Mousse Feb 17 '19 at 6:30

What you're after seems to be sentiment analysis at the word level. Since at the word level context is limited (in your case you have groups of words, but generally one doesn't even have that), a common approach is to use pre-made corpora. Naturally, such approach has many limitations, such as being limited only to a prespecified language and ambiguity of words, but still is a good point to start.

Consider using any of SentiWordNet, Bing Liu's Opinion Lexicon or any of these other resources. I've found these resources, via this question on Quora.


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.