Book Image

The Applied AI and Natural Language Processing Workshop

By : Krishna Sankar, Jeffrey Jackovich, Ruze Richards
Book Image

The Applied AI and Natural Language Processing Workshop

By: Krishna Sankar, Jeffrey Jackovich, Ruze Richards

Overview of this book

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.
Table of Contents (8 chapters)
Preface

3. Topic Modeling and Theme Extraction

Activity 3.01: Performing Topic Modeling on a Set of Documents with Unknown Topics

Solution:

  1. For this activity, we are going to use 1,000 movie review files. Navigate to the following link (or to your local directory where you have downloaded the GitHub files) to obtain the text data files that contain movie review comments: https://packt.live/3gISDZL. It is definitely better to download the GitHub repository rather than download 1,000 files by hand.
  2. Navigate to the S3 dashboard at https://s3.console.aws.amazon.com/s3/home.
  3. Click the bucket that you created earlier (in my case, it is "aws-ml-input-for-topic-modeling-20200301"):

    Figure 3.50: The S3 home screen for 'input-for-topic-modeling'

  4. Click Create folder:

    Figure 3.51: Clicking on Create folder

  5. Type movie_review_files and click Save:

    Figure 3.52: Clicking Save

    Note

    For this step, you may either follow along with the exercise and type in the code in...