NLP(Natural Language Processing) is a field of linguistics and machine learning focused on understanding everything related to human language. The aim of NLP tasks is not only to understand single words individually, but to be able to understand the context of those words.
The following is a list of common NLP tasks, with some examples of each:
- Classifying whole sentences: Getting the sentiment of a review, detecting if an email is spam, determining if a sentence is grammatically correct or whether two sentences are logically related or not
- Classifying each word in a sentence: Identifying the grammatical components of a sentence (noun, verb, adjective), or the named entities (person, location, organization)
- Generating text content: Completing a prompt with auto-generated text, filling in the blanks in a text with masked words
- Extracting an answer from a text: Given a question and a context, extracting the answer to the question based on the information provided in the context
- Generating a new sentence from an input text: Translating a text into another language, summarizing a text
NLP isn’t limited to written text though. It also tackles complex challenges in speech recognition and computer vision, such as generating a transcript of an audio sample or a description of an image.
Earlier, if you wanted to do NLP, you had to train a specific model for a specific task.
- If you wanted to translate English to French, you trained a “Translation Model.”
- If you wanted to detect spam, you trained a “Spam Model.”
- These models were “small” and usually couldn’t do anything else. If you asked the Translation Model to detect spam, it would fail completely.
It existed long before LLMs. In the past, NLP used simpler methods (like rules or small statistical models) to solve these problems.
