A I M 3 5 0 - R Identifying product mentions in customer reviews using ML
Phi Nguyen Solutions Architect Amazon Web Services
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda
Amazon Comprehend overview
Demonstration © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. THE AWS ML STACK
Broadest and deepest set of capabilities
AI Services
VISION SPEECH LANGUAGE CHATBOTS FORECASTING RECOMMENDATIONS
Amazon Rekognition Amazon Rekognition Amazon Textract Amazon Polly Amazon Transcribe Amazon Translate Amazon Comprehend Amazon Lex Amazon Forecast Amazon Personalize Image Video & Amazon Comprehend Medical
ML Services
Amazon SageMaker Ground Truth Notebooks Algorithms + Marketplace Reinforcement Learning Training Optimization Deployment Hosting
ML Frameworks + Infrastructure
FRAMEWORKS INTERFACES INFRASTRUCTURE
Amazon EC2 P3 EC2 G4 FPGAs DL Amazon Elastic Amazon Elastic AWS IoT Amazon Elastic AWS Inferentia & P3dn EC2 C5 CONTAINERS Container Kubernetes Greengrass Inference & AMIs Service (Amazon ECS) Service (Amazon EKS) Natural language data
• Customer engagement Call center, issue triage, social media analytics • Business processes Customer/vendor emails, product support messages • Records and research Actionable document-centric processes, understand patterns • News media Brand trends, correlating events Training NLP is hard and expensive
• Learn machine learning Data annotation • Specialize in NLP concepts • Continuously train Data Training the and retrain models model collection and • Finally, use the data prep NLP model Amazon Comprehend
A fully managed and continuously trained service that discovers insights and relationships in text Amazon Comprehend
Discover insights and relationships Entities in text
Key Phrases
Language
Amazon Comprehend Sentiment
Topic Modeling Text analysis Named entities Amazon.com: Organization Seattle, WA: Location July 5,1994: Date Jeff Bezos: Person
A m a z o n . c o m , Inc. is located Key phrases i n Seattle, WA, a n d w a s Our customers f o u n d e d July 5, 1994, b y b o o k s J e f f B e z o s . Our customers b l e n d e r s love buying everything f r o m great prices b o o k s t o b l e n d e r s a t g r e a t p r i c e s . S e n t i m e n t P o s i t i v e
L a n g u a g e E n g l i s h Topic Modeling
Keywords Topic Groups Document Relationship to Topics
Topic Term Weight Document Topic Proportion 0 Washington 0.89 Doc.txt 0 0.89 1 Silicon Valley 0.67 Doc.txt 1 0.67 2 Roasting 0.91 Doc.txt 2 0.91 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Custom classification EXAMPLE
Classification: “PRICING”
• Triage support tickets • Moderate forums Classification: “CANCEL_ACCOUNT” • Organize customer feedback • Organize support calls
Classification: “LOYALTY_PROGRAM” Train the custom classifier
1 Create a CSV file 2 Train the 3 Classify with training data service
TEXT LABEL
I am calling about my LOYALTY_PROGRAM credit card I really need to shut the CANCEL_ACCOUNT service down •Automated algorithm My points are not being LOYALTY_PROGRAM selection applied correctly The service is very PRICING •Automated tuning and expensive compared to testing competition I need a discount to PRICING •SDK or code-free subscribe console UX Custom entities
• Analyze documents for your business and domain terms and phrases • Bring your own schema to unstructured text analytics Hello, my name is John Doe, and thank you for calling Organization: AnyCompany AnyCompany. I understand you are calling about part number XT2457. We have that part on back order and we are expediting it for you. Person: John Doe Thank you, but I was expecting it last week. At this point I think we Part: XT2457 should go ahead and cancel the order entirely.
We are sorry to hear that, sir. Would you be willing to complete the order if we offered a 10% discount? Account_Action: cancel the order Yes, thank you. Train the custom entity recognizer
1 Prepare examples 2 Train the service 3 Analyze Hello, my name is John Doe, and ENTITY VALUE ENTITY TYPE thank you for calling AnyCompany. I understand you XT2457 Part Terms are calling about part number and AnyCompany Organization XT2457. We have that part on phrases back order and we are expediting John Doe Person it for you. Cancel the order Account_Action •Automated annotation Thank you, but I was expecting it last week. At this point I think we •Automated algorithm should go ahead and cancel the Documents order entirely. containing selection We are sorry to hear that, sir. terms and Would you be willing to complete phrases in •Automated tuning and the order if we offered a 10% text testing discount? •SDK or code-free Yes, thank you. console UX Amazon Comprehend structured output
Pre-trained entities Custom entities
Person Organization Part Account_Action John Doe AnyCompany XT2457 Cancel the order
Richard Roe SomeCompany SD5578 Renew subscription Training data for custom entity recognizer training
Using entity list and Using annotations 1 OR 2 training docs and training docs
• Simple and fast • Specify document offset for values • Specify entity values that are present in the present in the training documents training documents • Higher annotation effort • May have poor accuracy if different entity • Higher accuracy as only specific values in types have same values or values in wrong the desired context are selected for context are selected for training training Most common patterns
Content personalization: Customers are using Amazon Comprehend to analyze content and look for trends and relationships based on entities, phrases, or even topic similarities. These capabilities enable content personalization and recommendation use cases.
Semantic search: Customers are using Amazon Comprehend to index entities and keyphrases, boosting and ranking search results.
Intelligent data warehouse: Customers are using Amazon Comprehend to query unstructured data in relational databases, process that data with Amazon Comprehend via remote call, then insert them back into the data warehouse to join and understand trends.
Social analytics: Customers are using Amazon Comprehend to ingest, process, and analyze feedback and comments from social media posts across Twitter and Facebook.
Information management: Customers are using Amazon Comprehend for analyzing and discovering related content for enterprise information management, topical organization, and support for internal business processes like compliance. Document processing modes
• Single document processing: Single document, synchronous response to calling application
• Multiple documents, synchronous processing: Collection of up to 25 documents, synchronous response
• Asynchronous batch processing: Collection of documents in Amazon S3 bucket, asynchronous operation, analysis placed in S3 bucket Protect jobs by using an Amazon VPC
• Avoids dataflow over the internet to access Amazon Comprehend
• Amazon Comprehend creates elastic network interfaces (ENIs) that are associated with your security groups in one of the subnets
• ENIs allow our job containers to connect to resources in your VPC
Ref: https://docs.aws.amazon.com/comprehend/latest/dg/usingVPC.html Amazon Comprehend works with AWS KMS encryption
• Enable Amazon Comprehend to work with this encrypted data via an integration with AWS Key Management Service (AWS KMS)
• The feature can be configured via the AWS Management Console or the SDK
• Supports Amazon Comprehend asynchronous training and inference jobs
Ref: https://aws.amazon.com/blogs/machine-learning/amazon-comprehend- now-support-kms-encryption/?nc1=b_rp © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Comprehend: Cost-effective pricing
Model: Pay-as-you-go, tiered (with free tier)
Please refer to the following link for details: https://aws.amazon.com/comprehend/pricing/ Amazon Comprehend: Cost-effective pricing
Please refer to the following link for details: https://aws.amazon.com/comprehend/pricing/ © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Learn ML with AWS Training and Certification The same training that our own developers use, now available on demand
Role-based ML learning paths for developers, data scientists, data platform engineers, and business decision makers
70+ free digital ML courses from AWS experts let you learn from real-world challenges tackled at AWS
Validate expertise with the AWS Certified Machine Learning - Specialty exam
Visit https://aws.training/machinelearning
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.