4.1 NLP Concepts and Common Tasks
Key Takeaways
- Natural Language Processing (NLP) lets AI understand, interpret, and generate human language — text and speech — and is 15-20% of the AI-900 after the May 2025 update.
- Key phrase extraction identifies main topics but does NOT classify them; named entity recognition (NER) detects AND classifies entities (people, organizations, locations, dates, quantities).
- Sentiment analysis returns positive/negative/neutral confidence scores at both document and sentence level; conflicting sentences in one document yield an overall 'mixed' result.
- Language detection identifies the dominant language of text across 100+ languages and returns '(Unknown)' when it cannot decide.
- Text summarization is extractive (pick existing sentences) or abstractive (generate new sentences via an LLM); PII detection finds and redacts sensitive personal data.
Quick Answer: NLP enables AI to understand and process human language. Key tasks include key phrase extraction (main topics), named entity recognition (people, places, dates), sentiment analysis (positive/negative/neutral), language detection (which language), and text summarization (condense text). Azure AI Language provides all these capabilities as pre-built APIs.
What Is Natural Language Processing?
Natural Language Processing (NLP) is a branch of AI that deals with the interaction between computers and human language. NLP enables machines to read, understand, derive meaning from, and respond to text and speech. On the AI-900, NLP is one of five exam domains and accounts for 15-20% of the exam after the May 2025 skills update.
NLP powers applications you use daily:
- Spam filters analyzing email content
- Virtual assistants understanding voice commands
- Auto-complete suggestions while typing
- Machine translation between languages
- Chatbots answering customer questions
- Search engines understanding your queries
A useful exam mindset: NLP almost always answers the question "what information do I need to pull OUT of text?" Match the information to the task, and you usually have the answer.
Core NLP Tasks
1. Key Phrase Extraction
What it does: Identifies the main topics and concepts in text, extracting the most important phrases — without classifying them.
Input: "The food at the restaurant was delicious and the service was excellent. The atmosphere was cozy and the prices were reasonable."
Output: ["food", "restaurant", "service", "atmosphere", "prices"]
Use cases:
- Summarize large document collections by their key topics
- Extract main themes from customer feedback
- Automatically tag articles and documents
- Identify trending topics in social media
2. Named Entity Recognition (NER)
What it does: Detects and classifies entities mentioned in text — people, organizations, locations, dates, quantities, URLs, emails, and more. The key difference from key phrase extraction is that NER assigns a category to each item.
Input: "Microsoft CEO Satya Nadella announced a $10 billion investment in Azure AI at the Build 2026 conference in Seattle."
Output:
| Entity | Type | Category |
|---|---|---|
| Microsoft | Organization | Company |
| Satya Nadella | Person | Name |
| $10 billion | Quantity | Currency |
| Azure AI | Product | Technology |
| Build 2026 | Event | Name |
| Seattle | Location | City |
Use cases:
- Extract contact information from documents
- Identify people and organizations mentioned in news articles
- Categorize support tickets by mentioned products
- Build knowledge graphs from unstructured text
A close cousin is entity linking, which disambiguates an entity and links it to a knowledge base such as Wikipedia. For example, "Mars" could mean the planet or the candy company — entity linking resolves which one is meant and returns a reference URL.
3. Sentiment Analysis
What it does: Determines whether text expresses positive, negative, or neutral sentiment, with confidence scores (0 to 1) for each label.
Input: "The hotel room was beautiful, but the check-in process was terrible."
Output:
| Scope | Sentiment | Positive | Neutral | Negative |
|---|---|---|---|---|
| Overall | Mixed | 0.45 | 0.10 | 0.45 |
| "The hotel room was beautiful" | Positive | 0.95 | 0.03 | 0.02 |
| "the check-in process was terrible" | Negative | 0.02 | 0.05 | 0.93 |
Important: Sentiment analysis operates at document level (overall sentiment) AND sentence level (sentiment per sentence). When opposing opinions appear in one document, the overall result is labeled mixed, while individual sentences keep their own scores. This sentence-level breakdown is a frequent exam distractor.
Use cases:
- Monitor brand sentiment on social media
- Analyze customer review trends
- Route customer support tickets by urgency (negative = urgent)
- Track employee satisfaction in survey responses
4. Language Detection
What it does: Identifies which language a piece of text is written in.
Input: "Bonjour le monde, comment allez-vous?"
Output: French (fr), Confidence: 0.99
Capabilities:
- Supports 100+ languages
- Returns the dominant language in mixed-language text (one result per document)
- Returns ISO 639-1 language codes (en, fr, es, de, etc.)
- Returns "(Unknown)" with a score of 0 when language cannot be determined (for example, random symbols or numbers)
Use cases:
- Route customer communications to language-appropriate agents
- Pre-process text before translation
- Analyze the language distribution of social media mentions
- Validate expected language in form submissions
5. Text Summarization
What it does: Condenses long text into a shorter summary that captures the key points.
Types:
- Extractive summarization — selects and ranks the most important existing sentences from the original text
- Abstractive summarization — generates new sentences that paraphrase the meaning (powered by generative AI / LLMs)
Azure AI Language also offers conversation summarization, which condenses chat transcripts into issues and resolutions — handy for call-center recap.
Use cases:
- Summarize meeting transcripts
- Create article summaries for newsletters
- Condense legal documents into key points
- Generate executive summaries from reports
6. PII (Personally Identifiable Information) Detection
What it does: Detects and optionally redacts sensitive personal information — names, phone numbers, email addresses, Social Security numbers, credit card numbers, and more.
Input: "Call John Smith at 555-123-4567 or email john@example.com"
Output: "Call [PERSON] at [PHONENUMBER] or email [EMAIL]"
Use cases:
- Comply with GDPR, HIPAA, and other privacy regulations
- Redact PII before storing or sharing documents
- Monitor communications for data leak prevention
- Anonymize customer data for analytics
On the Exam: Questions present a text-analysis scenario and ask which NLP task is needed. Decide what must be extracted: main topics = key phrase extraction; specific classified entities = NER; emotional tone = sentiment; which language = language detection; sensitive data = PII detection; shorter version = summarization. NER classifies; key phrase extraction does not — that single distinction resolves many tricky questions.
A company wants to analyze customer reviews to determine if customers feel positively or negatively about their products. Which NLP task should they use?
Which NLP task would identify "Microsoft", "Satya Nadella", and "Seattle" as entities of type Organization, Person, and Location in a news article?
A global company receives customer messages in many languages and needs to route them to agents who speak the appropriate language. Which NLP task should they use first?
A healthcare organization needs to automatically redact patient names, phone numbers, and Social Security numbers from medical documents. Which NLP task is most appropriate?
A document contains the sentence "The screen is gorgeous, but the battery life is awful." What overall sentiment label is Azure AI Language most likely to return for the document?
Match each NLP task to what it extracts from text:
Match each item on the left with the correct item on the right