Text Classification and Sequence Labeling in NLP
In this blog I am describing a short note about what is text classificaiton and sequence labeling in NLP.
Text Classification
Text classification measns classify a sentence with it’s corresponding label.
In short:
Given a sentence X and predict an output Y
Type of Text Classification
-
Topic Classification
Topic classifcation predict a topic(like food, sports, music) from an input sentence or text
For Example:
I like pizza -> food I like Ariana Grande -> music ------------------------
-
Sentiment Analysis
Sentiment analysis predict a sentiment (like positive, negative or neutral) from an input sentence or text
For example:
I like this picture -> positive I hate this picture -> negative
-
Language Identification
Language identification predict a language type(like English, Bangla…..) from an input sentence or text
For Example:
She live in Dhaka -> English সে ঢাকায় বাস করে -> Bangla
-
Hate Speech Detection
Hate speech detection detect hateness (like political, religious, personal, race….) from an input sentence or text
For example:
He is ugly -> personal
and there are so many classification problem arround here
Sequence Labeling
Sequnce labeling means generate a sequence of label from an input sentence
In short:
Given an input sentence X and generate sequence of label Y of equal length
Type of Sequence Labling
-
Part of Speech Tagging
Part of speech tagging problem generate different
part of speech tag
from an input sentenceFor example:
I eat rice -> PRON VERB NOUN
-
Lemmatization
Lemmatization predict different
lemma
from an input sentenceFor example:
He ate rice -> He eat rice
-
Language Identification
Language identification predict different language type from an input sentence
For example:
ami tomake love kori -> BN BN EN BN
and there are more sequence tagging problem around here
Span Labeling as Sequence Labeling
Span labeling kind of sequence labeling but instead of labeling sequence it’s label span by speical kind of sequence label
-
Name Entity Recognition
Name entity recogtion predict different name entity(like PERSON, LOCATION) from an input sentence
For Example:
Sagor Sarker love to visit Rangpur -> B-PER I-PER O O O S-LOC -> (Sagor Sarker)-> PERSON, Rangpur->LOCATION
you can find different type of name entity tagging format here
More example for other type sequence labeling:
semantic role labeling
Sagor Sarker is living in Dhaka, Bangladesh -> (Sagor Sarker)-> Actor, living->Predicate, (Dhaka, Bangladesh)->Location
syntactic chunking
Sagor Sarker is living in Dhaka -> (Sagor Sarker)->NP, (is living)-> VP, (in Dhaka)->NP
Comments