Natural Language Processing (NLP) is a subfield of Artificial Intelligence (AI) that focuses on enabling computers to understand, interpret, generate, and interact with human languages like English, Hindi, or any spoken/written language.
Humans communicate using natural language, but computers work with numbers and structured data. NLP bridges the gap between human language and machine understanding, allowing AI systems to:
| Task | What it Does | Example |
|---|---|---|
| Tokenization | Breaks text into words or sentences | "Hello, world!" → ["Hello", ",", "world", "!"] |
| Part-of-Speech Tagging | Identifies grammatical parts of speech | "dog" → noun, "run" → verb |
| Named Entity Recognition (NER) | Identifies entities like names, locations, etc. | "John lives in Paris" → ["John" → person, "Paris" → location] |
| Sentiment Analysis | Detects sentiment or emotion | "I love this movie!" → Positive |
| Machine Translation | Translates between languages | "Bonjour" → "Hello" |
| Text Summarization | Produces a shorter version of a document | Long article → Short summary |
| Question Answering | Finds answers from text or databases | "Who is the president of the USA?" |
| Speech Recognition | Converts spoken language to text | Audio → Text |
Text Preprocessing:
Feature Extraction:
Convert text to numbers using methods like:
Modeling:
Use Machine Learning or Deep Learning models:
Output/Inference:
Input:
"I had a terrible experience with the service."
Output from a sentiment analysis model:
Negative
Open this section to load past papers