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?
shap
package. $\endgroup$shap
package is completely independing on whether you are using transformers or another model and are using a CPU or GPU for your computations. See for example their documatation where they use a logistic regression model for sentiment analysis. $\endgroup$