Is text classification always sentiment analysis (what is the task if other non-sentiment labels are needed)?

A completely beginner’s question: I have short text sequences (names of dishes) and I want to decide a few things about each item (e.g. whether the dish is vegetarian, whether it is sweet, type of cuisine, …). I thought it was a classification task (e.g. assigning the tag: is_vegetarian/is_not_vegetarian, Czech/French/Greek/… cuisine, …). Am I wrong? I’m running into the fact that the classification task seems to always be narrowed down to sentiment analysis (and positive/negative tags).

Ugh. Despite reading various manuals and discussions here, I’m still lost. It seems more and more likely that I’m just completely off the mark and overlooking something fundamental. Would someone please point me in the right direction?

(I want to solve the problem for a language other than English which adds to my disorientation a bit.)

Thank you for all your tips and help. :slightly_smiling_face:

it’s a classification task. class labels would be is_vegetarian/is_not_vegetarian.
classification task can be any, not limited to sentiment analysis. it should have discrete class labels like is_vegetarian/is_not_vegetarian. or if we are modelling hate speech detection, class labels would be hate/non-hate.

when you build a classification model, text should also be encoded, and class labels should also be encoded into numeric values.

to start with, you can use machine learning algorithms like Naive Bayes (this is best, given your task), Logistic regression, decision trees etc.

for naive bayes (to start with): https://machinelearningmastery.com/how-to-develop-and-evaluate-naive-classifier-strategies-using-probability/

1 Like

Thank you for your assurance! :slight_smile: