I'm facing a text classification problem where the algo is human-made but impacted by keywords. Hence I can't use any ML model but I certainly can take a data-science driven approach to find the best keywords that would determine a class.
Therefore I managed to build a dataframe with Countvectorizer, where each row is a word of the whole input data vocabulary, and the 3 categories columns hold the amount of times the word appeared in each category.
What's my best shot at getting the best keywords from that dataframe? Can I use statistical tests for significance ? I can't just choose an arbitrary threshold and say all words having more than 20 occurrences in a category are good keywords for that category; this because the dataset is also quite unbalanced (50% is class A, 35% is class B and 15% is class C) so I'm sure there must be some clever way to extract the most significant impacting keywords.
My first try that somewhat works is weighting occurrences by class occurrences, so having a word appear 15+X% in class C could be significant although the word appears way more often in class A when looking at absolute numbers. This method is not perfect but that's where I'm stuck. Ideas are very much welcome.