SlideShare a Scribd company logo
1 of 26
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Pratap Ramamurthy
Partner Solutions Architect, AWS
How to enhance your
applications using Amazon
Comprehend for NLP
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Voice-of-the-Customer Application
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Internal NLP
Transform Deliver
Gather customer feedback Process Categorize and Score Distill Actionable Insight and
make it accessible
• Email / Chat Transcripts
• Online Return Center
• Tickets
• Ad Hoc Sources
• Survey
External
• Social Media
• Forums
• Customer Reviews
Structured Data Joiner
Sentiment Scoring
Classification
Analysis Preparation
Analysis Database
Reports & Validation
Discovery & Exploration
Event Detection
Collect
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serverless VOC Application
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Scenario: Wild Rydes (AWS Workshop)
The Wild Rydes Serverless Web Application Workshop introduces the
basics of building web applications using serverless infrastructure.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Step 1: Static Website Hosting
OBJECTIVE: Create a bucket in Amazon S3 and configure it for static website
hosting. The static HTML, JS, and CSS will be served directly to user
browsers from Amazon S3.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Step 2: User Management
OBJECTIVE: Allow visitors to register as a new user on Wild Rydes, by providing
and validating their email address. Amazon Cognito will be used to manage the
User Pool for Wild Rydes.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Step 3: Serverless Service Backend
OBJECTIVE: Create a service backend using AWS Lambda and Amazon
DynamoDB to handle requests from your frontend static website content.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Step 4: Create RESTful API
OBJECTIVE: Use API Gateway to expose the Lambda function you built in the
previous module as a RESTful API
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serverless NLP application
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
NLP on AWS
Frameworks & Interfaces
AWS Deep Learning AMI
Vision Services:
Amazon Rekognition Image
Amazon Rekognition Video
Language Services:
Amazon Comprehend, Amazon Lex, Amazon Polly, Amazon
Translate, Amazon Transcribe
Apache
MXNet
Theano
Microsoft
Cognitive
Toolkit
Keras
Caffe2
& Caffe
TensorFlow Gluon
Application Services
Platform Services
Amazon SageMaker AWS DeepLens
PyTorch
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serverless VOC architecture
API Gateway
Dynamo
Amazon
Comprehend
Amazon
Translate
Amazon
Sagemaker
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Sentiment analysis
I love my country.
positive sentiment negative sentiment
I hate the flu.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Training NLP is Hard and Expensive
NLP Model
Data Collection
and Prep
Training the
model
Data annotation
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Comprehend: NLP
😃
Sentiment Entities Languages Key phrases Topic modeling
POWERED BY DEEP
LEARNING
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
A m a z o n . c o m , I n c . i s l o c a t e d i n
S e a t t l e , W A a n d w a s f o u n d e d J u l y
5 t h , 1 9 9 4 b y J e f f B e z o s . O u r
c u s t o m e r s l o v e b u y i n g e v e r y t h i n g
f r o m 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
N a m e d E n t i t i e s
• A m a z o n . c o m :
O r g a n i z a t i o n
• S e a t t l e , W A : L o c a t i o n
• J u l y 5 t h , 1 9 9 4 : D a t e
• J e f f B e z o s : P e r s o n
K e y p h r a s e s
• O u r c u s t o m e r s
• b o o k s
• b l e n d e r s
• 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
Text Analysis
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Topic Modeling
Document Topic Proportion
Doc.txt 0 .89
Doc.txt 1 .67
Doc.txt 2 .91
Topic Term Weight
0 Washington .89
1 Silicon Valley .67
2 Roasting .91
Keywords Topic Groups Document Relationship to Topics
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lambda code for Comprehend (python)
import boto3
import json
comprehend = boto3.client(service_name='comprehend', 
region_name='us-east-1')
def lambda_handler(event, context):
text = format(event['review'])
jsonstr = json.dumps(comprehend.detect_sentiment(
(Text=text, LanguageCode='en'), 
sort_keys=True, indent=4)
result = json.loads(jsonstr)
return result["Sentiment"]
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
In java…
AmazonComprehend client = AmazonComprehendClientBuilder.standard()
.withCredentials(new AWSStaticCredentialsProvider(awsCreds))
.withRegion("region")
.build();
String[] textList = {"I love Seattle", "Today is Sunday", "Tomorrow is Monday”};
// Call detectEntities API
BatchDetectEntitiesRequest batchDetectEntitiesRequest = new BatchDetectEntitiesRequest()
withTextList(textList)
withLanguageCode("en");
BatchDetectEntitiesResult batchDetectEntitiesResult =
client.batchDetectEntities(batchDetectEntitiesRequest);
for(BatchDetectEntitiesItemResult item : batchDetectEntitiesResult.getResultList())
{
System.out.println(item);
}
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serverless VOC architecture
API Gateway
Amazon
Comprehend
Amazon
Comprehend
Amazon
Comprehend
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
End-to-End
Machine Learning
Platform
Zero setup Flexible Model
Training
Pay by the second
$
Amazon SageMaker
Build, train, and deploy machine learning models at scale
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
One-click training for
ML, DL, and custom
algorithms
Easier training with
hyperparameter
optimization
Highly-optimized
machine learning
algorithms
Deployment
without
engineering effort
Fully-managed
hosting at scale
BuildPre-built notebook
instances
Deploy
Train
Amazon SageMaker
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Data Visualization &
Analysis
Business Problem –
ML problem framing Data Collection
Data Integration
Data Preparation &
Cleaning
Feature Engineering
Model Training &
Parameter Tuning
Model Evaluation
Are Business
Goals met?
Model Deployment
Monitoring &
Debugging
– Predictions
YesNo
DataAugmentation
Feature
Augmentation
The Machine Learning Process
Re-training
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serverless VOC architecture
API Gateway
Dynamo
Amazon
Comprehend
Amazon
Translate
Amazon
Sagemaker
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Cost estimate with Comprehend
Service Pricing Monthly estimate
Lambda 0.00001667 per GB second $16.67
API gateway $3.50 per million calls $3.500
S3 $0.0245 per GB $0.024
Comprehend $0.0001 PER UNIT $100.0
Dynamodb $0.47 per WCU
$0.09 per RCU
$0.25 per GB
$0.810
Total $121.0
( for 1 million sentences)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!
Get started with Amazon Comprehend:
https://aws.amazon.com/comprehend

More Related Content

What's hot

Best practices for integrating Amazon Rekognition into your own application
Best practices for integrating Amazon Rekognition into your own applicationBest practices for integrating Amazon Rekognition into your own application
Best practices for integrating Amazon Rekognition into your own applicationAmazon Web Services
 
Amazon CI-CD Practices for Software Development Teams
Amazon CI-CD Practices for Software Development Teams Amazon CI-CD Practices for Software Development Teams
Amazon CI-CD Practices for Software Development Teams Amazon Web Services
 
State of NLP and Amazon Comprehend
State of NLP and Amazon ComprehendState of NLP and Amazon Comprehend
State of NLP and Amazon ComprehendEgor Pushkin
 
Introduction to Cloud Computing with AWS (Thai Session)
Introduction to Cloud Computing with AWS (Thai Session)Introduction to Cloud Computing with AWS (Thai Session)
Introduction to Cloud Computing with AWS (Thai Session)Amazon Web Services
 
AWS Workshop Series: Microsoft licensing and active directory on AWS
AWS Workshop Series: Microsoft licensing and active directory on AWSAWS Workshop Series: Microsoft licensing and active directory on AWS
AWS Workshop Series: Microsoft licensing and active directory on AWSAmazon Web Services
 
Best Practice on using Azure OpenAI Service
Best Practice on using Azure OpenAI ServiceBest Practice on using Azure OpenAI Service
Best Practice on using Azure OpenAI ServiceKumton Suttiraksiri
 
Advanced Security Best Practices Masterclass
Advanced Security Best Practices MasterclassAdvanced Security Best Practices Masterclass
Advanced Security Best Practices MasterclassAmazon Web Services
 
Accelerating App Development with AWS Amplify
Accelerating App Development with AWS AmplifyAccelerating App Development with AWS Amplify
Accelerating App Development with AWS AmplifyAmazon Web Services
 
Using AWS IoT for Industrial Applications - AWS Online Tech Talks
Using AWS IoT for Industrial Applications - AWS Online Tech TalksUsing AWS IoT for Industrial Applications - AWS Online Tech Talks
Using AWS IoT for Industrial Applications - AWS Online Tech TalksAmazon Web Services
 
An Overview of Machine Learning on AWS
An Overview of Machine Learning on AWSAn Overview of Machine Learning on AWS
An Overview of Machine Learning on AWSAmazon Web Services
 
Customer and Constituent Engagement with Amazon Connect
Customer and Constituent Engagement with Amazon ConnectCustomer and Constituent Engagement with Amazon Connect
Customer and Constituent Engagement with Amazon ConnectAmazon Web Services
 
Dissecting Media Asset Management Architecture and Media Archive TCO (MAE301)...
Dissecting Media Asset Management Architecture and Media Archive TCO (MAE301)...Dissecting Media Asset Management Architecture and Media Archive TCO (MAE301)...
Dissecting Media Asset Management Architecture and Media Archive TCO (MAE301)...Amazon Web Services
 
Deep Learning for Semantic Search in E-commerce​
Deep Learning for Semantic Search in E-commerce​Deep Learning for Semantic Search in E-commerce​
Deep Learning for Semantic Search in E-commerce​Somnath Banerjee
 
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...Amazon Web Services Korea
 
Introduction to Artificial Intelligence on AWS
Introduction to Artificial Intelligence on AWSIntroduction to Artificial Intelligence on AWS
Introduction to Artificial Intelligence on AWSAmazon Web Services
 
AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법
AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법
AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법Amazon Web Services Korea
 
From Insights to Action, How to build and maintain a Data Driven Organization...
From Insights to Action, How to build and maintain a Data Driven Organization...From Insights to Action, How to build and maintain a Data Driven Organization...
From Insights to Action, How to build and maintain a Data Driven Organization...Amazon Web Services Korea
 
How do OpenAI GPT Models Work - Misconceptions and Tips for Developers
How do OpenAI GPT Models Work - Misconceptions and Tips for DevelopersHow do OpenAI GPT Models Work - Misconceptions and Tips for Developers
How do OpenAI GPT Models Work - Misconceptions and Tips for DevelopersIvo Andreev
 

What's hot (20)

Best practices for integrating Amazon Rekognition into your own application
Best practices for integrating Amazon Rekognition into your own applicationBest practices for integrating Amazon Rekognition into your own application
Best practices for integrating Amazon Rekognition into your own application
 
Amazon CI-CD Practices for Software Development Teams
Amazon CI-CD Practices for Software Development Teams Amazon CI-CD Practices for Software Development Teams
Amazon CI-CD Practices for Software Development Teams
 
State of NLP and Amazon Comprehend
State of NLP and Amazon ComprehendState of NLP and Amazon Comprehend
State of NLP and Amazon Comprehend
 
Introduction to Cloud Computing with AWS (Thai Session)
Introduction to Cloud Computing with AWS (Thai Session)Introduction to Cloud Computing with AWS (Thai Session)
Introduction to Cloud Computing with AWS (Thai Session)
 
AWS Workshop Series: Microsoft licensing and active directory on AWS
AWS Workshop Series: Microsoft licensing and active directory on AWSAWS Workshop Series: Microsoft licensing and active directory on AWS
AWS Workshop Series: Microsoft licensing and active directory on AWS
 
Best Practice on using Azure OpenAI Service
Best Practice on using Azure OpenAI ServiceBest Practice on using Azure OpenAI Service
Best Practice on using Azure OpenAI Service
 
introduction Azure OpenAI by Usama wahab khan
introduction  Azure OpenAI by Usama wahab khanintroduction  Azure OpenAI by Usama wahab khan
introduction Azure OpenAI by Usama wahab khan
 
Advanced Security Best Practices Masterclass
Advanced Security Best Practices MasterclassAdvanced Security Best Practices Masterclass
Advanced Security Best Practices Masterclass
 
Accelerating App Development with AWS Amplify
Accelerating App Development with AWS AmplifyAccelerating App Development with AWS Amplify
Accelerating App Development with AWS Amplify
 
Using AWS IoT for Industrial Applications - AWS Online Tech Talks
Using AWS IoT for Industrial Applications - AWS Online Tech TalksUsing AWS IoT for Industrial Applications - AWS Online Tech Talks
Using AWS IoT for Industrial Applications - AWS Online Tech Talks
 
An Overview of Machine Learning on AWS
An Overview of Machine Learning on AWSAn Overview of Machine Learning on AWS
An Overview of Machine Learning on AWS
 
Customer and Constituent Engagement with Amazon Connect
Customer and Constituent Engagement with Amazon ConnectCustomer and Constituent Engagement with Amazon Connect
Customer and Constituent Engagement with Amazon Connect
 
Dissecting Media Asset Management Architecture and Media Archive TCO (MAE301)...
Dissecting Media Asset Management Architecture and Media Archive TCO (MAE301)...Dissecting Media Asset Management Architecture and Media Archive TCO (MAE301)...
Dissecting Media Asset Management Architecture and Media Archive TCO (MAE301)...
 
Deep Learning for Semantic Search in E-commerce​
Deep Learning for Semantic Search in E-commerce​Deep Learning for Semantic Search in E-commerce​
Deep Learning for Semantic Search in E-commerce​
 
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
 
Introduction to Artificial Intelligence on AWS
Introduction to Artificial Intelligence on AWSIntroduction to Artificial Intelligence on AWS
Introduction to Artificial Intelligence on AWS
 
AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법
AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법
AWS Summit Seoul 2023 | 갤럭시 규모의 서비스를 위한 Amazon DynamoDB의 역할과 비용 최적화 방법
 
From Insights to Action, How to build and maintain a Data Driven Organization...
From Insights to Action, How to build and maintain a Data Driven Organization...From Insights to Action, How to build and maintain a Data Driven Organization...
From Insights to Action, How to build and maintain a Data Driven Organization...
 
How do OpenAI GPT Models Work - Misconceptions and Tips for Developers
How do OpenAI GPT Models Work - Misconceptions and Tips for DevelopersHow do OpenAI GPT Models Work - Misconceptions and Tips for Developers
How do OpenAI GPT Models Work - Misconceptions and Tips for Developers
 
AzureOpenAI.pptx
AzureOpenAI.pptxAzureOpenAI.pptx
AzureOpenAI.pptx
 

Similar to How to Enhance your Application using Amazon Comprehend for NLP - AWS Online Tech Talks

Mike Gillespie - Build Intelligent Applications with AWS ML Services (200).pdf
Mike Gillespie - Build Intelligent Applications with AWS ML Services (200).pdfMike Gillespie - Build Intelligent Applications with AWS ML Services (200).pdf
Mike Gillespie - Build Intelligent Applications with AWS ML Services (200).pdfAmazon Web Services
 
Add Intelligence to Applications with AWS ML Services
Add Intelligence to Applications with AWS ML ServicesAdd Intelligence to Applications with AWS ML Services
Add Intelligence to Applications with AWS ML ServicesAmazon Web Services
 
Add Intelligence to Applications with AWS ML Services: Machine Learning Week ...
Add Intelligence to Applications with AWS ML Services: Machine Learning Week ...Add Intelligence to Applications with AWS ML Services: Machine Learning Week ...
Add Intelligence to Applications with AWS ML Services: Machine Learning Week ...Amazon Web Services
 
AWS Machine Learning Week SF: Build Intelligent Applications with AWS ML Serv...
AWS Machine Learning Week SF: Build Intelligent Applications with AWS ML Serv...AWS Machine Learning Week SF: Build Intelligent Applications with AWS ML Serv...
AWS Machine Learning Week SF: Build Intelligent Applications with AWS ML Serv...Amazon Web Services
 
Building Text Analytics Applications on AWS using Amazon Comprehend - AWS Onl...
Building Text Analytics Applications on AWS using Amazon Comprehend - AWS Onl...Building Text Analytics Applications on AWS using Amazon Comprehend - AWS Onl...
Building Text Analytics Applications on AWS using Amazon Comprehend - AWS Onl...Amazon Web Services
 
Add Intelligence to Applications with AWS ML Services
Add Intelligence to Applications with AWS ML ServicesAdd Intelligence to Applications with AWS ML Services
Add Intelligence to Applications with AWS ML ServicesAmazon Web Services
 
Build Intelligent Apps with Amazon ML
Build Intelligent Apps with Amazon ML Build Intelligent Apps with Amazon ML
Build Intelligent Apps with Amazon ML Amazon Web Services
 
BDA302 Building Intelligent Apps with AWS Machine Learning Language Services
BDA302 Building Intelligent Apps with AWS Machine Learning Language ServicesBDA302 Building Intelligent Apps with AWS Machine Learning Language Services
BDA302 Building Intelligent Apps with AWS Machine Learning Language ServicesAmazon Web Services
 
Ai services AWS - Taglit
Ai services AWS - TaglitAi services AWS - Taglit
Ai services AWS - TaglitBoaz Ziniman
 
Add Intelligence to Applications with AWS ML: Machine Learning Workshops SF
Add Intelligence to Applications with AWS ML: Machine Learning Workshops SFAdd Intelligence to Applications with AWS ML: Machine Learning Workshops SF
Add Intelligence to Applications with AWS ML: Machine Learning Workshops SFAmazon Web Services
 
AWS의 새로운 언어, 음성, 텍스트 처리 인공지능 서비스::Vikram Anbazhagan::AWS Summit Seoul 2018
AWS의 새로운 언어, 음성, 텍스트 처리 인공지능 서비스::Vikram Anbazhagan::AWS Summit Seoul 2018AWS의 새로운 언어, 음성, 텍스트 처리 인공지능 서비스::Vikram Anbazhagan::AWS Summit Seoul 2018
AWS의 새로운 언어, 음성, 텍스트 처리 인공지능 서비스::Vikram Anbazhagan::AWS Summit Seoul 2018Amazon Web Services Korea
 
Enhancing Your Startup With Amazon AI
Enhancing Your Startup With Amazon AIEnhancing Your Startup With Amazon AI
Enhancing Your Startup With Amazon AIAmazon Web Services
 
Building High Performance Apps with In-memory Data
Building High Performance Apps with In-memory DataBuilding High Performance Apps with In-memory Data
Building High Performance Apps with In-memory DataAmazon Web Services
 
Introduction to AWS ML Application Services - BDA202 - Toronto AWS Summit
Introduction to AWS ML Application Services - BDA202 - Toronto AWS SummitIntroduction to AWS ML Application Services - BDA202 - Toronto AWS Summit
Introduction to AWS ML Application Services - BDA202 - Toronto AWS SummitAmazon Web Services
 
Serverless Text Analytics with Amazon Comprehend
Serverless Text Analytics with Amazon ComprehendServerless Text Analytics with Amazon Comprehend
Serverless Text Analytics with Amazon ComprehendDonnie Prakoso
 
DataXDay - Machine learning models at scale with Amazon SageMaker
DataXDay - Machine learning models at scale with Amazon SageMaker DataXDay - Machine learning models at scale with Amazon SageMaker
DataXDay - Machine learning models at scale with Amazon SageMaker DataXDay Conference by Xebia
 
Connecting the Unconnected using GraphDB - Tel Aviv Summit 2018
Connecting the Unconnected using GraphDB - Tel Aviv Summit 2018Connecting the Unconnected using GraphDB - Tel Aviv Summit 2018
Connecting the Unconnected using GraphDB - Tel Aviv Summit 2018Amazon Web Services
 
Build Smarter Enterprise Apps with AI, AR & VR on AWS
Build Smarter Enterprise Apps with AI, AR & VR on AWSBuild Smarter Enterprise Apps with AI, AR & VR on AWS
Build Smarter Enterprise Apps with AI, AR & VR on AWSAmazon Web Services
 
Bring the Power of AI to Your Amazon Connect Contact Center (BAP322-R1) - AWS...
Bring the Power of AI to Your Amazon Connect Contact Center (BAP322-R1) - AWS...Bring the Power of AI to Your Amazon Connect Contact Center (BAP322-R1) - AWS...
Bring the Power of AI to Your Amazon Connect Contact Center (BAP322-R1) - AWS...Amazon Web Services
 

Similar to How to Enhance your Application using Amazon Comprehend for NLP - AWS Online Tech Talks (20)

Mike Gillespie - Build Intelligent Applications with AWS ML Services (200).pdf
Mike Gillespie - Build Intelligent Applications with AWS ML Services (200).pdfMike Gillespie - Build Intelligent Applications with AWS ML Services (200).pdf
Mike Gillespie - Build Intelligent Applications with AWS ML Services (200).pdf
 
Add Intelligence to Applications with AWS ML Services
Add Intelligence to Applications with AWS ML ServicesAdd Intelligence to Applications with AWS ML Services
Add Intelligence to Applications with AWS ML Services
 
Add Intelligence to Applications with AWS ML Services: Machine Learning Week ...
Add Intelligence to Applications with AWS ML Services: Machine Learning Week ...Add Intelligence to Applications with AWS ML Services: Machine Learning Week ...
Add Intelligence to Applications with AWS ML Services: Machine Learning Week ...
 
AWS Machine Learning Week SF: Build Intelligent Applications with AWS ML Serv...
AWS Machine Learning Week SF: Build Intelligent Applications with AWS ML Serv...AWS Machine Learning Week SF: Build Intelligent Applications with AWS ML Serv...
AWS Machine Learning Week SF: Build Intelligent Applications with AWS ML Serv...
 
Building Text Analytics Applications on AWS using Amazon Comprehend - AWS Onl...
Building Text Analytics Applications on AWS using Amazon Comprehend - AWS Onl...Building Text Analytics Applications on AWS using Amazon Comprehend - AWS Onl...
Building Text Analytics Applications on AWS using Amazon Comprehend - AWS Onl...
 
Add Intelligence to Applications with AWS ML Services
Add Intelligence to Applications with AWS ML ServicesAdd Intelligence to Applications with AWS ML Services
Add Intelligence to Applications with AWS ML Services
 
Build Intelligent Apps with Amazon ML
Build Intelligent Apps with Amazon ML Build Intelligent Apps with Amazon ML
Build Intelligent Apps with Amazon ML
 
BDA302 Building Intelligent Apps with AWS Machine Learning Language Services
BDA302 Building Intelligent Apps with AWS Machine Learning Language ServicesBDA302 Building Intelligent Apps with AWS Machine Learning Language Services
BDA302 Building Intelligent Apps with AWS Machine Learning Language Services
 
Ai services AWS - Taglit
Ai services AWS - TaglitAi services AWS - Taglit
Ai services AWS - Taglit
 
Add Intelligence to Applications with AWS ML: Machine Learning Workshops SF
Add Intelligence to Applications with AWS ML: Machine Learning Workshops SFAdd Intelligence to Applications with AWS ML: Machine Learning Workshops SF
Add Intelligence to Applications with AWS ML: Machine Learning Workshops SF
 
AWS의 새로운 언어, 음성, 텍스트 처리 인공지능 서비스::Vikram Anbazhagan::AWS Summit Seoul 2018
AWS의 새로운 언어, 음성, 텍스트 처리 인공지능 서비스::Vikram Anbazhagan::AWS Summit Seoul 2018AWS의 새로운 언어, 음성, 텍스트 처리 인공지능 서비스::Vikram Anbazhagan::AWS Summit Seoul 2018
AWS의 새로운 언어, 음성, 텍스트 처리 인공지능 서비스::Vikram Anbazhagan::AWS Summit Seoul 2018
 
Enhancing Your Startup With Amazon AI
Enhancing Your Startup With Amazon AIEnhancing Your Startup With Amazon AI
Enhancing Your Startup With Amazon AI
 
Building High Performance Apps with In-memory Data
Building High Performance Apps with In-memory DataBuilding High Performance Apps with In-memory Data
Building High Performance Apps with In-memory Data
 
Introduction to AWS ML Application Services - BDA202 - Toronto AWS Summit
Introduction to AWS ML Application Services - BDA202 - Toronto AWS SummitIntroduction to AWS ML Application Services - BDA202 - Toronto AWS Summit
Introduction to AWS ML Application Services - BDA202 - Toronto AWS Summit
 
Serverless Text Analytics with Amazon Comprehend
Serverless Text Analytics with Amazon ComprehendServerless Text Analytics with Amazon Comprehend
Serverless Text Analytics with Amazon Comprehend
 
AI Today
AI TodayAI Today
AI Today
 
DataXDay - Machine learning models at scale with Amazon SageMaker
DataXDay - Machine learning models at scale with Amazon SageMaker DataXDay - Machine learning models at scale with Amazon SageMaker
DataXDay - Machine learning models at scale with Amazon SageMaker
 
Connecting the Unconnected using GraphDB - Tel Aviv Summit 2018
Connecting the Unconnected using GraphDB - Tel Aviv Summit 2018Connecting the Unconnected using GraphDB - Tel Aviv Summit 2018
Connecting the Unconnected using GraphDB - Tel Aviv Summit 2018
 
Build Smarter Enterprise Apps with AI, AR & VR on AWS
Build Smarter Enterprise Apps with AI, AR & VR on AWSBuild Smarter Enterprise Apps with AI, AR & VR on AWS
Build Smarter Enterprise Apps with AI, AR & VR on AWS
 
Bring the Power of AI to Your Amazon Connect Contact Center (BAP322-R1) - AWS...
Bring the Power of AI to Your Amazon Connect Contact Center (BAP322-R1) - AWS...Bring the Power of AI to Your Amazon Connect Contact Center (BAP322-R1) - AWS...
Bring the Power of AI to Your Amazon Connect Contact Center (BAP322-R1) - AWS...
 

More from Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

How to Enhance your Application using Amazon Comprehend for NLP - AWS Online Tech Talks

  • 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Pratap Ramamurthy Partner Solutions Architect, AWS How to enhance your applications using Amazon Comprehend for NLP
  • 2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Voice-of-the-Customer Application
  • 3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Internal NLP Transform Deliver Gather customer feedback Process Categorize and Score Distill Actionable Insight and make it accessible • Email / Chat Transcripts • Online Return Center • Tickets • Ad Hoc Sources • Survey External • Social Media • Forums • Customer Reviews Structured Data Joiner Sentiment Scoring Classification Analysis Preparation Analysis Database Reports & Validation Discovery & Exploration Event Detection Collect
  • 4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless VOC Application
  • 5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Scenario: Wild Rydes (AWS Workshop) The Wild Rydes Serverless Web Application Workshop introduces the basics of building web applications using serverless infrastructure.
  • 6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Step 1: Static Website Hosting OBJECTIVE: Create a bucket in Amazon S3 and configure it for static website hosting. The static HTML, JS, and CSS will be served directly to user browsers from Amazon S3.
  • 7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Step 2: User Management OBJECTIVE: Allow visitors to register as a new user on Wild Rydes, by providing and validating their email address. Amazon Cognito will be used to manage the User Pool for Wild Rydes.
  • 8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Step 3: Serverless Service Backend OBJECTIVE: Create a service backend using AWS Lambda and Amazon DynamoDB to handle requests from your frontend static website content.
  • 9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Step 4: Create RESTful API OBJECTIVE: Use API Gateway to expose the Lambda function you built in the previous module as a RESTful API
  • 10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless NLP application
  • 11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. NLP on AWS Frameworks & Interfaces AWS Deep Learning AMI Vision Services: Amazon Rekognition Image Amazon Rekognition Video Language Services: Amazon Comprehend, Amazon Lex, Amazon Polly, Amazon Translate, Amazon Transcribe Apache MXNet Theano Microsoft Cognitive Toolkit Keras Caffe2 & Caffe TensorFlow Gluon Application Services Platform Services Amazon SageMaker AWS DeepLens PyTorch
  • 12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless VOC architecture API Gateway Dynamo Amazon Comprehend Amazon Translate Amazon Sagemaker
  • 13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Sentiment analysis I love my country. positive sentiment negative sentiment I hate the flu.
  • 14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Training NLP is Hard and Expensive NLP Model Data Collection and Prep Training the model Data annotation
  • 15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Comprehend: NLP 😃 Sentiment Entities Languages Key phrases Topic modeling POWERED BY DEEP LEARNING
  • 16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. A m a z o n . c o m , I n c . i s l o c a t e d i n S e a t t l e , W A a n d w a s f o u n d e d J u l y 5 t h , 1 9 9 4 b y J e f f B e z o s . O u r c u s t o m e r s l o v e b u y i n g e v e r y t h i n g f r o m 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 N a m e d E n t i t i e s • A m a z o n . c o m : O r g a n i z a t i o n • S e a t t l e , W A : L o c a t i o n • J u l y 5 t h , 1 9 9 4 : D a t e • J e f f B e z o s : P e r s o n K e y p h r a s e s • O u r c u s t o m e r s • b o o k s • b l e n d e r s • 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 Text Analysis
  • 17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Topic Modeling Document Topic Proportion Doc.txt 0 .89 Doc.txt 1 .67 Doc.txt 2 .91 Topic Term Weight 0 Washington .89 1 Silicon Valley .67 2 Roasting .91 Keywords Topic Groups Document Relationship to Topics
  • 18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lambda code for Comprehend (python) import boto3 import json comprehend = boto3.client(service_name='comprehend', region_name='us-east-1') def lambda_handler(event, context): text = format(event['review']) jsonstr = json.dumps(comprehend.detect_sentiment( (Text=text, LanguageCode='en'), sort_keys=True, indent=4) result = json.loads(jsonstr) return result["Sentiment"]
  • 19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. In java… AmazonComprehend client = AmazonComprehendClientBuilder.standard() .withCredentials(new AWSStaticCredentialsProvider(awsCreds)) .withRegion("region") .build(); String[] textList = {"I love Seattle", "Today is Sunday", "Tomorrow is Monday”}; // Call detectEntities API BatchDetectEntitiesRequest batchDetectEntitiesRequest = new BatchDetectEntitiesRequest() withTextList(textList) withLanguageCode("en"); BatchDetectEntitiesResult batchDetectEntitiesResult = client.batchDetectEntities(batchDetectEntitiesRequest); for(BatchDetectEntitiesItemResult item : batchDetectEntitiesResult.getResultList()) { System.out.println(item); }
  • 20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless VOC architecture API Gateway Amazon Comprehend Amazon Comprehend Amazon Comprehend
  • 21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. End-to-End Machine Learning Platform Zero setup Flexible Model Training Pay by the second $ Amazon SageMaker Build, train, and deploy machine learning models at scale
  • 22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. One-click training for ML, DL, and custom algorithms Easier training with hyperparameter optimization Highly-optimized machine learning algorithms Deployment without engineering effort Fully-managed hosting at scale BuildPre-built notebook instances Deploy Train Amazon SageMaker
  • 23. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Data Visualization & Analysis Business Problem – ML problem framing Data Collection Data Integration Data Preparation & Cleaning Feature Engineering Model Training & Parameter Tuning Model Evaluation Are Business Goals met? Model Deployment Monitoring & Debugging – Predictions YesNo DataAugmentation Feature Augmentation The Machine Learning Process Re-training
  • 24. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless VOC architecture API Gateway Dynamo Amazon Comprehend Amazon Translate Amazon Sagemaker
  • 25. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Cost estimate with Comprehend Service Pricing Monthly estimate Lambda 0.00001667 per GB second $16.67 API gateway $3.50 per million calls $3.500 S3 $0.0245 per GB $0.024 Comprehend $0.0001 PER UNIT $100.0 Dynamodb $0.47 per WCU $0.09 per RCU $0.25 per GB $0.810 Total $121.0 ( for 1 million sentences)
  • 26. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you! Get started with Amazon Comprehend: https://aws.amazon.com/comprehend