Natural Language Processing (NLP) is the branch of artificial intelligence that acts as a bridge between human language and machine language. While a computer natively handles only numbers, NLP teaches it to read text, grasp its meaning, and even reply in fluent language. It is the invisible technology behind machine translators, voice assistants and conversational agents such as ChatGPT.
What is it really?
Human language is ambiguous, contextual and cultural: the word "bank" can mean a financial institution or a river edge depending on the sentence. NLP gathers the methods that let a machine resolve such ambiguities. We usually distinguish:
- understanding language (NLU) — extracting meaning, intent and entities;
- generating language (NLG) — producing coherent, relevant text.
How does it work?
Text must first be turned into numbers. It is split into tokens (words or sub-words), and each token is represented by a vector called an embedding. Modern models, built on the Transformer architecture (2017), rely on the attention mechanism, which weighs the importance of each word relative to the others:
$$\text{Attention}(Q, K, V) = \text{softmax}!\left(\frac{QK^{\top}}{\sqrt{d_k}}\right)V$$
A few classic tasks
| Task | Example |
|---|---|
| Machine translation | EN AR |
| Sentiment analysis | Positive / negative review |
| Named-entity recognition | Tag "Casablanca" as a place |
| Summarization | Condense an article |
From the spell-checker to the large language model, NLP has become the most natural interface between humans and machines.