Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.
5.1.1. Azure Language Service Capabilities
- Concept: Pre-built NLP capabilities for common text analysis tasks
- Purpose: Extract insights from text without training
- Benefit: Immediate value from text data
Comparative Table: Language Service Capabilities
| Capability | Output | Example |
|---|---|---|
| Key phrase extraction | Important phrases | "Azure AI", "machine learning" |
| Entity recognition | Named entities (type + text) | Person: "John", Location: "Seattle" |
| Sentiment analysis | Sentiment score | Positive (0.95), Negative (0.05) |
| Language detection | ISO language code | "en", "es", "fr" |
| PII detection | Personal information | SSN: "123-45-6789" |
from azure.ai.textanalytics import TextAnalyticsClient
client = TextAnalyticsClient(endpoint, credential)
# Sentiment analysis
result = client.analyze_sentiment(["I love this product!"])
print(result[0].sentiment) # "positive"
# PII detection
pii_result = client.recognize_pii_entities(["My SSN is 123-45-6789"])
for entity in pii_result[0].entities:
print(f"{entity.category}: {entity.text}")
# "USSocialSecurityNumber: 123-45-6789"