The Applied AI and Natural Language Processing Workshop

Book description

With the help of engaging activities, learn how to leverage Amazon Web Services for building serverless intelligent applications that can process information in no time

Key Features

  • Learn how to integrate Amazon's Simple Storage Services with AI and NLP projects
  • Get to grips with serverless computing and its applications
  • Create intelligent applications such as chatbots and image recognition models

Book Description

Are you fascinated with applications like Alexa and Siri and how they accurately process information within seconds before returning accurate results? Are you looking for a practical guide that will teach you how to build intelligent applications that can revolutionize the world of artificial intelligence? The Applied AI and NLP Workshop will take you on a practical journey where you will learn how to build artificial intelligence (AI) and natural language processing (NLP) applications with Amazon Web services (AWS).

Starting with an introduction to AI and machine learning, this book will explain how Amazon S3, or Amazon Simple Storage Service, works. You'll then integrate AI with AWS to build serverless services and use Amazon's NLP service Comprehend to perform text analysis on a document. As you advance, the book will help you get to grips with topic modeling to extract and analyze common themes on a set of documents with unknown topics. You'll also work with Amazon Lex to create and customize a chatbot for task automation and use Amazon Rekognition for detecting objects, scenes, and text in images.

By the end of The Applied AI and NLP Workshop, you'll be equipped with the knowledge and skills needed to build scalable intelligent applications with AWS.

What you will learn

  • Grasp the fundamentals of AI, ML, and AWS
  • Explore the AWS command line, its interface, and its applications
  • Import and export data to Amazon S3
  • Perform topic modeling on a set of documents to analyze common themes
  • Develop a custom chatbot to get the latest stock market quotes
  • Create a personal call center and connect it to the chatbot

Who this book is for

If you are a machine learning enthusiast, data scientist, or programmer who wants to explore AWS's artificial intelligence and machine learning capabilities, this book is for you. Although not necessary, a basic understanding of AI and NLP will assist with grasping key topics quickly.

Table of contents

  1. The Applied AI and Natural Language Processing Workshop
  2. Preface
    1. About the Book
      1. Audience
      2. About the Chapters
      3. Conventions
      4. Code Presentation
      5. Setting up Your Environment
      6. Software Requirements
      7. Installation and Setup
      8. AWS Account
      9. A Word about AWS Regions
      10. AWS CLI Setup
      11. Configuration and Credential files for the AWS CLI
      12. Amazon Rekognition Account
      13. Installing Python and Anaconda
        1. Installing Python and Anaconda on Windows
        2. Installing Python and Anaconda on Linux
      14. Installing Python and Anaconda on macOS
      15. Project Jupyter
      16. Installing Libraries
      17. Accessing the Code Files
  3. 1. An Introduction to AWS
    1. Introduction
    2. How Is AWS Special?
      1. What Is ML?
      2. What Is AI?
    3. What Is Amazon S3?
      1. Why Use S3?
      2. The Basics of Working on AWS with S3
      3. AWS Free-Tier Account
        1. AWS Account Setup and Navigation
      4. Downloading the Support Materials for This Book
      5. A Word about Jupyter Notebooks
      6. Importing and Exporting Data into S3
      7. How S3 Differs from a Filesystem
    4. Core S3 Concepts
      1. S3 Operations
    5. Data Replication
      1. The REST Interface
      2. Exercise 1.01: Using the AWS Management Console to Create an S3 Bucket
      3. Exercise 1.02: Importing and Exporting the File with Your S3 Bucket
    6. The AWS CLI
      1. Exercise 1.03: Configuring the CLI
    7. CLI Usage
    8. Recursion and Parameters
      1. Activity 1.01: Putting the Data into S3 with the CLI
    9. Using the AWS Console to Identify ML Services
      1. Exercise 1.04: Navigating the AWS Management Console
      2. Exercise 1.05: Testing the Amazon Comprehend API Features
      3. The Utility of the AWS Console Interface to AI Services
    10. Summary
  4. 2. Analyzing Documents and Text with Natural Language Processing
    1. Introduction
    2. Serverless Computing
      1. Amazon Lambda and Function as a Service
      2. Serverless Computing as an Approach
    3. Amazon Comprehend
    4. What Is an NLP Service?
    5. Using Amazon Comprehend to Inspect Text and Determine the Primary Language
      1. Exercise 2.01: Detecting the Dominant Language in a Text Document Using the Command-Line Interface
      2. Exercise 2.02: Detecting the Dominant Language in Multiple Documents by Using the CLI
    6. Extracting Information from a Set of Documents
      1. Detecting Named Entities—AWS SDK for Python (boto3)
      2. DetectEntities – Input and Output
      3. Exercise 2.03: Determining the Named Entities in a Document (the DetectEntities method)
      4. Exercise 2.04: Detecting Entities in a Set of Documents (Text Files)
      5. Detecting Key Phrases
      6. Exercise 2.05: Detecting Key Phrases
      7. Detecting Sentiments
      8. Exercise 2.06: Conducting Sentiment Analysis
    7. Setting Up a Lambda Function and Analyzing Imported Text Using Comprehend
      1. Integrating Comprehend and AWS Lambda for responsive NLP
      2. What Is AWS Lambda?
      3. What Does AWS Lambda Do?
      4. Lambda Function Anatomy
      5. Exercise 2.07: Setting Up a Lambda Function for S3
      6. Exercise 2.08: Assigning Policies to S3_trigger to Access Comprehend
      7. Activity 2.01: Integrating Lambda with Amazon Comprehend to Perform Text Analysis
    8. Amazon Textract
      1. Exercise 2.09: Extracting Tax Information Using Amazon Textract
    9. Summary
  5. 3. Topic Modeling and Theme Extraction
    1. Introduction
    2. Topic Modeling with Latent Dirichlet Allocation (LDA)
      1. Basic LDA Example
      2. Why Use LDA?
    3. Amazon Comprehend—Topic Modeling Guidelines
      1. Exercise 3.01: Using Amazon Comprehend to Perform Topic Modeling on Two Documents with Known Topics
      2. Exercise 3.02: Performing Known Structure Analysis Programmatically
      3. Activity 3.01: Performing Topic Modeling on a Set of Documents with Unknown Topics
    4. Summary
  6. 4. Conversational Artificial Intelligence
    1. Introduction to Conversational AI
      1. Interaction Types
      2. Omnichannel
    2. What Is a Chatbot?
    3. What Is Natural Language Understanding?
      1. Core Concepts in a Nutshell
        1. Chatbot
        2. Utterances
        3. Intent
        4. Prompts
        5. Slot
        6. Fulfillment
    4. Best Practices for Designing Conversational AI
    5. Creating a Custom Chatbot
    6. A Bot That Recognizes an Intent and Filling a Slot
      1. Exercise 4.01: Creating a Bot That Will Recognize an Intent and Fill a Slot
      2. Natural Language Understanding Engine
    7. Lambda Function – Implementing Business Logic
      1. Exercise 4.02: Creating a Lambda Function to Handle Chatbot Fulfillment
      2. Implementing the Lambda Function
      3. Input Parameter Structure
      4. Implementing the High-Level Handler Function
      5. Implementing the Function to Retrieve the Market Quote
      6. Returning the Information to the Calling App (the Chatbot)
      7. Connecting to the Chatbot
      8. Debugging Tips
    8. Summary
  7. 5. Using Speech with the Chatbot
    1. Amazon Connect Basics
      1. Free Tier Information
    2. Interacting with the Chatbot
    3. Talking to Your Chatbot through a Call Center Using Amazon Connect
      1. Exercise 5.01: Creating a Personal Call Center
      2. Exercise 5.02: Obtaining a Free Phone Number for Your Call Center
    4. Using Amazon Lex Chatbots with Amazon Connect
      1. Understanding Contact Flows
      2. Contact Flow Templates
      3. Exercise 5.03: Connecting the Call Center to Your Lex Chatbot
      4. Activity 5.01: Creating a Custom Bot and Connecting the Bot with Amazon Connect
    5. Summary
  8. 6. Computer Vision and Image Processing
    1. Introduction
    2. Amazon Rekognition Basics
      1. Free Tier Information on Amazon Rekognition
    3. Rekognition and Deep Learning
      1. Detecting Objects and Scenes in Images
      2. Exercise 6.01: Detecting Objects and Scenes Using Your Images
    4. Image Moderation
      1. Exercise 6.02: Detecting Objectionable Content in Images
    5. Facial Analysis
      1. Exercise 6.03: Analyzing Faces with Your Own Images
    6. Celebrity Recognition
      1. Exercise 6.04: Recognizing Celebrities in Your Images
    7. Face Comparison
      1. Activity 6.01: Creating and Analyzing Different Faces in Rekognition
    8. Text in Images
      1. Exercise 6.05: Extracting Text from Your Own Images
    9. Summary
  9. Appendix
    1. 1. An Introduction to AWS
      1. Activity 1.01: Putting the Data into S3 with the CLI
    2. 2. Analyzing Documents and Text with Natural Language Processing
      1. Activity 2.01: Integrating Lambda with Amazon Comprehend to Perform Text Analysis
    3. 3. Topic Modeling and Theme Extraction
      1. Activity 3.01: Performing Topic Modeling on a Set of Documents with Unknown Topics
    4. 5. Using Speech with the Chatbot
      1. Activity 5.01: Creating a Custom Bot and Connecting the Bot with Amazon Connect
    5. 6. Computer Vision and Image Processing
      1. Activity 6.01: Creating and Analyzing Different Faces in Rekognition

Product information

  • Title: The Applied AI and Natural Language Processing Workshop
  • Author(s): Krishna Sankar, Jeffrey Jackovich, Ruze Richards
  • Release date: July 2020
  • Publisher(s): Packt Publishing
  • ISBN: 9781800208742