English
Share
Sign In
📔

Text classification

Text classification using a language model is a task of assigning specific labels to text. To do this, it is important to provide examples with clear instructions to the model. This allows the model to understand exactly what task is required and produce the desired results. You can understand it as the concept of literally dividing and organizing specific text by assigning properties to it.
The most commonly used examples in academia are emotion classification or purpose classification. I entered the following seven sentences and asked them to classify them by purpose or emotion.
"This product is very uncomfortable to use. I regret buying it."
"It's the most memorable restaurant I've ever visited. I'll visit again if I have the chance."
"Is there a McDonald's in the shopping mall I want to go to?"
"How to Make a McDonald's Big Mac"
"I ate some ice cream my friend bought me, and it was delicious until I found out where it came from."
"This outfit is very different from the picture. However, the seller responded quickly and I received an exchange."
"This guide is very friendly."
🤖
If we categorize these sentences by purpose or emotion, they are as follows:
"This product is very uncomfortable to use. I regret buying it."
Emotion: Negative
"It's the most memorable restaurant I've ever visited. I'll visit again if I have the chance."
Emotion: Positive
"Is there a McDonald's in the shopping mall I want to go to?"
Purpose: Obtain up-to-date information
"How to Make a McDonald's Big Mac"
Purpose: Creation
"I ate some ice cream my friend bought me, and it was delicious until I found out where it came from."
Emotion: Neutral
"This outfit is very different from the picture. However, the seller responded quickly and I received an exchange."
Emotion: Neutral
"This guide is very friendly."
Emotion: Positive
These classifications are based on sentence content and context, and are determined by the purpose each sentence is intended to convey and the emotion expressed.
This is how it looks when you ask without clearly defining the current criteria. What if you want to classify this in more detail? You can give an example or clarify the instructions. That's setting the criteria. For example, you can do this.
Negative: This category is used when the text expresses a negative emotion or attitude. For example, it may express feelings such as dissatisfaction, disappointment, sadness, anger, or fear. This may be the case when the text complains about a product or service, or speaks negatively about an experience.
Neutral: Neutral texts are those that do not clearly express positive or negative sentiment. These texts are usually emotionally neutral, such as conveying information or asking questions. For example, simple questions, factual statements, or sentences that do not express personal feelings or attitudes.
Positive: The positive category applies when the text expresses a positive emotion or attitude. This includes positive responses such as satisfaction, joy, interest, and gratitude. For example, compliments on a product or service, comments on a positive experience, and expressions of satisfactory results fall into this category.
If you set clear criteria for a specific classification in advance and assign classification tasks, you can expect higher quality work. What do you think? The more you know, the more you realize that it is similar to assigning tasks to humans, right?
💬
🎭
ⓒ 2023. Haebom, all rights reserved.
It may be used for commercial purposes with permission from the copyright holder, provided the source is cited.