Get the keywords from positive and negative reviews

I have trained a classifier algorithm on a sentiment analysis model which classifies the reviews scraped off Amazon as Positive or Negative. Now for each class, I want to get the keywords from the review i.e. reason for the positive or negative review.

For example if I have a review the quality of the shirt is the worst!. I want to get the keyword as quality. Similarly Really liked the fitting of the shirt should return fitting as the keyword.

Any idea how this can be done?

Topic sentiment-analysis nlp python

Category Data Science


Another option would be to use integrated gradients to get an attribution for each word in a review and add them up over all reviews. Then you know for each word whether it let to a positive or negative review.

This is a practical use case on how to use integrated gradients.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.