π¬
Natural Language Services
AWS services for natural language processing
β±οΈ Estimated reading time: 20 minutes
Amazon Comprehend
Natural Language Processing (NLP) service that uses ML to extract insights from text.
- Determines if text is positive, negative, neutral, or mixed
- Confidence score for each sentiment
- Useful for customer opinion analysis
Identifies and categorizes entities:
- People: Individual names
- Places: Geographic locations
- Organizations: Companies, institutions
- Dates: Temporal references
- Quantities: Numbers, percentages
- Events: Occurrences
- Identifies the primary language of text
- Supports 100+ languages
- Identifies important terms and phrases
- Useful for summaries and categorization
- Part-of-speech tagging (verbs, nouns, etc.)
- Grammatical analysis
- Discovers topics in document collections
- Groups documents by topic
- Predefined: Standard categories
- Custom: Train with your own categories
- Finds sensitive data:
- Names
- Addresses
- Credit card numbers
- SSN, passports
- Automatic redaction option
Specialized in medical texts:
- Extracts medical information
- Identifies conditions, medications, dosages
- Detects HIPAA-protected data
- Understands medical ontologies (ICD-10, RxNorm)
- Customer feedback analysis
- Automatic ticket categorization
- Social media analysis
- Intelligent document search
- Data compliance and privacy
- Medical record analysis
Main Capabilities
Sentiment Analysis
- Determines if text is positive, negative, neutral, or mixed
- Confidence score for each sentiment
- Useful for customer opinion analysis
Entity Extraction
Identifies and categorizes entities:
- People: Individual names
- Places: Geographic locations
- Organizations: Companies, institutions
- Dates: Temporal references
- Quantities: Numbers, percentages
- Events: Occurrences
Language Detection
- Identifies the primary language of text
- Supports 100+ languages
Key Phrase Extraction
- Identifies important terms and phrases
- Useful for summaries and categorization
Syntax Analysis
- Part-of-speech tagging (verbs, nouns, etc.)
- Grammatical analysis
Topic Modeling
- Discovers topics in document collections
- Groups documents by topic
Document Classification
- Predefined: Standard categories
- Custom: Train with your own categories
PII Detection (Personally Identifiable Information)
- Finds sensitive data:
- Names
- Addresses
- Credit card numbers
- SSN, passports
- Automatic redaction option
Amazon Comprehend Medical
Specialized in medical texts:
- Extracts medical information
- Identifies conditions, medications, dosages
- Detects HIPAA-protected data
- Understands medical ontologies (ICD-10, RxNorm)
Use Cases
- Customer feedback analysis
- Automatic ticket categorization
- Social media analysis
- Intelligent document search
- Data compliance and privacy
- Medical record analysis
π― Key Points
- β Comprehend is useful for quick text analysis without custom models
- β Verify language detection and adapt tokenizers/vocabularies for specific languages
- β Use Comprehend Medical for clinical data and regulatory compliance
- β Measure entity extraction accuracy on real domain text
- β Combine services (Transcribe -> Comprehend -> Translate) for multilingual pipelines
Amazon Lex and Conversational Services
Service for building conversational interfaces (chatbots) using voice and text.
- Converts speech to text
- Same technology as Alexa
- Interprets user intent
- Extracts relevant information (slots)
- Maintains conversation context
- Handles multiple turns
- Confirmations and clarifications
- AWS Lambda for business logic
- Amazon Connect for contact centers
- Multiple channels (web, mobile, Slack, Facebook)
Intents:
- Actions the user wants to perform
- Example: BookFlight, CheckBalance
Utterances:
- Phrases users say
- Example: 'I want to book a flight'
Slots:
- Variables to extract from user
- Example: origin_city, destination_city, date
Fulfillment:
- Logic to fulfill the intent
- Typically a Lambda function
- Customer service chatbots
- Enterprise virtual assistants
- Contact center automation
- Booking systems
- Automated FAQs
Recent improvements:
- Better contextual understanding
- Support for more complex conversations
- Audio streaming
- More predictable pricing
Features
Automatic Speech Recognition (ASR)
- Converts speech to text
- Same technology as Alexa
Natural Language Understanding (NLU)
- Interprets user intent
- Extracts relevant information (slots)
Dialog Management
- Maintains conversation context
- Handles multiple turns
- Confirmations and clarifications
Integration
- AWS Lambda for business logic
- Amazon Connect for contact centers
- Multiple channels (web, mobile, Slack, Facebook)
Key Concepts
Intents:
- Actions the user wants to perform
- Example: BookFlight, CheckBalance
Utterances:
- Phrases users say
- Example: 'I want to book a flight'
Slots:
- Variables to extract from user
- Example: origin_city, destination_city, date
Fulfillment:
- Logic to fulfill the intent
- Typically a Lambda function
Use Cases
- Customer service chatbots
- Enterprise virtual assistants
- Contact center automation
- Booking systems
- Automated FAQs
Amazon Lex V2
Recent improvements:
- Better contextual understanding
- Support for more complex conversations
- Audio streaming
- More predictable pricing
π― Key Points
- β Lex fits structured conversational flows; Bedrock/LLMs are better for open responses
- β Integrate Lambda for secure business logic fulfillment
- β Test with real conversations and handle long context/state
- β Manage scalability and concurrent call costs
- β Measure UX metrics (turns-to-resolution, fallback rate)
Speech and Translation Services
Amazon Polly
Text-to-Speech (TTS)
Features:
- High-quality neural voices
- Support for 60+ languages
- Standard and neural voices
- SSML (Speech Synthesis Markup Language)
- Pronunciation control
- Pauses, emphasis, speed
- Audio effects
Use cases:
- Reading applications
- Virtual assistants
- Accessibility
- E-learning
- IVR (phone systems)
- Content narration
Advanced Features:
- Newscaster style: News presenter style
- Brand Voice: Custom voices for companies
- Lexicons: Custom pronunciation
Amazon Transcribe
Speech-to-Text (STT)
Features:
- Automatic speech recognition
- Speaker identification
- Automatic timestamping
- Custom vocabularies
- Vocabulary filtering (forbidden words)
- Automatic PII redaction
Transcribe Medical:
- Specialized in medical terminology
- Medical consultation transcription
- HIPAA compliance
Transcribe Call Analytics:
- Contact center call analysis
- Sentiment detection
- Issue identification
- Conversation metrics
Use cases:
- Video subtitles
- Meeting transcription
- Call analysis
- Medical documentation
- Audio content search
Amazon Translate
Neural machine translation
Features:
- Real-time translation
- Support for 75+ languages
- Full document translation
- Custom terminology
- Batch translation
Active Custom Translation:
- Train models with your own data
- Domain-specific terminology
- Better quality for specialized cases
Use cases:
- Application localization
- Web content translation
- Multilingual communication
- Document translation
- International customer service
Service Integration
Complete pipeline example:
1. Transcribe: Converts audio to text
2. Comprehend: Analyzes sentiment and entities
3. Translate: Translates to other languages
4. Polly: Converts response to speech
This pipeline enables complete multilingual conversational experiences.
π― Key Points
- β Polly and Transcribe enable accessible, multilingual applications
- β Use lexicons and voice styles for brand consistency
- β Transcribe Call Analytics provides actionable contact-center metrics
- β Tune custom vocabularies for domain terminology
- β Combine with Comprehend for post-transcription analysis