What is natural language processing (NLP)?
1 Answer
Natural language processing, or NLP, is the branch of artificial intelligence focused on enabling computers to understand, interpret and generate human language, whether written or spoken.
Human language is difficult for computers. Words have multiple meanings, grammar has exceptions, context changes meaning, and people use slang, sarcasm, abbreviations and mixed languages like Hinglish. NLP aims to handle all of this.
Common NLP tasks:
1. Text classification: sorting text into categories, such as spam detection or tagging support tickets.
2. Sentiment analysis: identifying whether a review or comment is positive, negative or neutral.
3. Named entity recognition: finding names of people, places, organisations, dates and amounts in text.
4. Machine translation: translating between languages.
5. Summarisation: condensing long documents.
6. Question answering: answering questions from text.
7. Speech recognition and speech synthesis: converting speech to text and text to speech.
8. Text generation: writing new text, as chatbots do.
How NLP evolved:
Rule-based systems, from the 1950s onward, used hand-written grammar rules and dictionaries. They were brittle and could not handle language's variety.
Statistical NLP, from the 1990s, used probabilities learned from text, improving tasks like translation and search.
Machine learning and word embeddings, in the 2010s, represented words as numbers capturing meaning, enabling much better understanding.
Transformers and large language models, from 2017 onward, dramatically advanced NLP. Models like BERT improved understanding tasks, and GPT-style models showed remarkable text generation. Today's LLMs can perform most NLP tasks with a simple instruction, without separate specialised models.
NLP versus LLMs: NLP is the broad field; large language models are a powerful technology within it. Before LLMs, each NLP task typically needed its own specially trained model. Now, one general model can classify, summarise, translate and answer questions.
NLP in everyday life:
Search engines understanding your queries.
Autocorrect and predictive keyboards.
Voice assistants.
Email spam filters and smart replies.
Translation apps.
Customer service chatbots.
Social media content moderation.
NLP for Indian languages has been a particular challenge because of the number of languages, scripts and limited digital text in some languages. Initiatives like AI4Bharat and Bhashini, along with multilingual LLMs, are steadily improving support.
NLP is the reason you can now communicate with computers in your own words rather than in code.