Short answer
Natural language processing (NLP) is the field of artificial intelligence that enables computers to understand, interpret and generate human language, written or spoken. It powers search engines, translation, spam filters, voice assistants and chatbots. NLP has gone through three eras: hand-written rules, statistical machine learning, and today's deep learning with transformers, which produced large language models like GPT, Claude and Gemini that can handle almost any language task.
Why language is hard for computers
Human language is ambiguous and full of context. "I saw her duck" can mean two very different things. Words change meaning ("bank" of a river vs a bank account), sarcasm flips meaning, and the same idea can be expressed in endless ways. NLP is about turning this messy, flexible language into something a computer can work with, and back again.
Common NLP tasks
| Task | What it does | Example |
|---|---|---|
| Text classification | Assigns a category | Spam detection, topic tagging |
| Sentiment analysis | Detects opinion or emotion | Rating product reviews as positive or negative |
| Named entity recognition | Finds names, places, dates, amounts | Extracting company names from news |
| Machine translation | Converts between languages | Google Translate, DeepL |
| Summarisation | Shortens text while keeping key points | Meeting and article summaries |
| Question answering | Answers questions from text | Search snippets, document chatbots |
| Speech recognition | Turns speech into text | Dictation, call transcription |
| Text generation | Writes new text | Chatbots, drafting emails |
| Information retrieval | Finds relevant documents | Search engines, RAG |
How NLP evolved
1. Rule-based NLP (1950s to 1980s)
Experts wrote grammar rules and dictionaries by hand. These systems worked in narrow domains but broke easily with real-world language.
2. Statistical NLP (1990s to 2010s)
Systems learned patterns from large text collections: counting which words appear together, then using models like n-grams, naive Bayes and conditional random fields. Statistical machine translation and early spam filters came from this era.
3. Neural NLP and word embeddings (2013 onwards)
Word2vec (2013) represented words as vectors so that similar words sit close together, see What are embeddings?. Recurrent neural networks (RNNs and LSTMs) then processed sentences word by word.
4. Transformers and LLMs (2017 onwards)
The transformer architecture (2017) used attention to look at all words at once, which trained faster and captured long-range meaning. BERT (2018) set new records on understanding tasks, and the GPT series showed that one model trained to predict the next word could do translation, summarisation, question answering and more. Today most NLP tasks are handled by a single large language model with a good prompt, or by a smaller model fine-tuned for one task.
How modern NLP works, step by step
1. Tokenization: text is split into tokens, words or word pieces. 2. Embedding: each token becomes a vector of numbers. 3. Contextual processing: transformer layers update each token's vector based on the surrounding words, so "bank" gets a different representation in different sentences. 4. Task output: the model produces a label, extracts spans of text or generates new text one token at a time.
NLP in everyday life
- Search engines understanding what you mean, not just matching keywords
- Autocomplete and grammar correction in keyboards and email
- Voice assistants and dictation
- Translation in browsers and apps
- Customer service chatbots and email routing
- Social media moderation and spam filtering
- Medical and legal document analysis
- Coding assistants that turn instructions into code
NLP vs LLMs vs NLU
- NLP is the whole field.
- NLU (natural language understanding) focuses on comprehension: intent, meaning, entities.
- NLG (natural language generation) focuses on producing text.
- LLMs are a powerful technology within NLP that now handles both understanding and generation.
Challenges that remain
- Hallucinations: generative models can state false information confidently. See AI hallucinations.
- Bias: models can reflect stereotypes in training data.
- Low-resource languages: many of the world's languages have little digital text, so models perform worse in them, and they often need more tokens per word.
- Cost: large models need expensive GPUs to train and serve. See AI training vs inference.
How to get started with NLP
- No code: use an LLM chat app to classify, summarise or extract information with clear prompts.
- Python: libraries such as Hugging Face Transformers, spaCy and NLTK cover most tasks.
- Local models: run open models on your own computer for private text processing; see how to run an LLM locally.
Frequently asked questions
Is ChatGPT an example of NLP?
Yes. ChatGPT is built on large language models, the most advanced form of NLP today.
What is the difference between NLP and machine learning?
Machine learning is a general method for learning from data. NLP is an application area focused on language, which today relies mostly on machine learning and deep learning.
Is NLP still a good career?
Yes, though the work has shifted from building task-specific models towards building applications with LLMs, retrieval, evaluation and fine-tuning.
Does NLP include speech?
Speech recognition and text-to-speech are closely related fields often grouped with NLP. Modern multimodal models handle speech and text together.
Sources and further reading
- Jurafsky and Martin, Speech and Language Processing (3rd edition draft)
- Mikolov et al., Efficient Estimation of Word Representations in Vector Space (2013)
- Vaswani et al., Attention Is All You Need (2017)
- Devlin et al., BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding (2018)




Leave a Reply