Introduction to token classification
The task of classifying each token in a token sequence is called token classification. This task requires the model to classify each token into a class. POS and NER are two of the most well-known tasks in this criterion. However, QA is also another major Natural Language Processing (NLP) task that fits in this category. We will discuss the basics of these three tasks in the following sections. It is important to note that tasks such as NER, POS, and QA can be seen from two perspectives: labeling the existing context of the text with respective classes or text generation.
The token classification approach gets the text as input and classifies each respective token into a class. Take the following example:
"I went to Berlin."
From this sentence, and using token classification-based NER, the output must be in the following form:
I = O Went = O to = O Berlin = Location
However, generative models solve the problem differently;...