Text Classification

I will discuss, how can we classify a input text into different categories. There are many applications of text classification available in real time, some of them are

  • Sentiment analysis -- classifying sentiment of text(positive, negative, neutral)

  • Emotion analysis -- Classifying emotion in the text ( Happy, sad, bored, fear, exited, angry, etc.)

  • Intent analysis -- Classifying intent behind the text ( feedback, query, marketing, asking directions etc..)

  • Document classification -- any document classification ( fax, letter, different type of forms specific to business, etc)

  • Abusive analysis -- classifying abusive text in social media ( abusive or not )

  • Hate text analysis -- classifying hate speech or not

  • sarcasm analysis -- classifying sarcasm sentence or not

  • Language detection -- classification of languages

  • there are many more classification problem related to specific business use case like technical ticket categorization, Item categorization in eCommerce based on description we have, Search query categorization to give better search results, routing a complaint/service tickets to respected teams.

I will try to discuss different ways to do classification of text using Machine learning and Deep learning. Before going into the text classification , you have to know binary, multi class classification and multi-label classification.

Binary Classification

If we classify only 2 classes then it is Binary Classification.

Example: Classifying given text is positive text or negative text.

Multi Class Classification

If we classify more than 2, its a multi class classification problem.

Example: Classifying given question is related to sports, education, politics. Here we have 3 classes to classify

Multi-Label Classification

If we have multiple classes for one text and if we want to predict all the classes that are associated with the input, that is multi-label classification.

Example:

  1. Classifying given question related to ML, Python, NLP, Computer Vision, java, algorithms, c++. But One question may have tag like python, algorithms. There may be two or more tags/classes for one question.

  2. hashtag prediction for a given text post in the social media.

Last updated