Natural Language Processing with AWS AI Services

BIRMINGHAM—MUMBAI

Natural Language Processing with AWS AI Services

Copyright © 2021 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Publishing Product Manager: Sunith Shetty

Senior Editor: David Sugarman

Content Development Editor: Priyanka Soam

Technical Editor: Devanshi Ayare

Copy Editor: Safis Editing

Project Coordinator: Aparna Ravikumar Nair

Proofreader: Safis Editing

Indexer: Pratik Shirodkar

Production Designer: Sinhayna Bais

First published: November 2021

Production reference: 2191121

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham

B3 2PB, UK.

978-1-80181-253-5

www.packt.com

A person with a mustache wearing a tie

Description automatically generated with medium confidence A person wearing glasses

Description automatically generated with low confidence

Wisdom is knowing I am nothing. Love is knowing I am everything. Between the two, my life moves. – Shri Nisargadatta Maharaj

We dedicate this book to our dear fathers, for it is their wisdom and love that guides us from within. We may miss their physical presence, but we are blessed with the light of their true essence in every moment of our lives.

Acknowledgments

We also wanted to take a few moments to express our sincere gratitude to our families, friends, and well-wishers for their continued support, without whom this book would not have been possible.

I, Premkumar Rangarajan, would like to thank my wife, Sapna Mohan Kumar, for her patience with me, her words of encouragement during creative blocks, and her skillful ability to know exactly when to leave me alone; my son, Harivatsa Premkumar, for his faith in me; my mother, Prabhavathy Rangarajan, for her constant love and guidance; my brother, Arun Rangarajan, for his unwavering support; my niece Anya Arun and my nephew Satvik Arun for their playful encouragement; and all my family and friends, for being there for me during this very tough 2021.

I, Mona M, would like to thank my grandparents, Nawal Kishore Prasad and Indu Kumari Sinha, for their constant encouragement to write this book; my mother, Punam Kumari, for never losing faith in me even in the most difficult situation of my life. Also, to my aunts (Nirupama Kaushik and Anupama Kunwar), for always giving me the strength to stay positive, and all the rest of my family and friends, for being there for me during this very tough 2021

Foreword

For decades, very few organizations could master the arcane field of Machine Learning (ML). A fascinating mix of math, computer science, software engineering, and IT, ML required a collection of skills and resources that were simply not available outside of very large companies or research labs.

This all changed about 10 years ago with the availability of commodity compute and storage, open source libraries, and the omnipresence of digital data. Indeed, the near-simultaneous emergence of tools such as Amazon EC2, Amazon S3, scikit-learn, and Theano quickly made ML much more accessible and cost-effective. Just a few years later, research teams demonstrated that Graphical Processing Units (GPUs) could be used to massively accelerate neural networks, giving this ancient and impractical technology a new lease of life, and kicking off a Deep Learning (DL) frenzy that has yet to slow down.

Initially, Computer Vision (CV) stole the limelight, amazing us all with ever more sophisticated applications. Meanwhile, Natural Language Processing (NLP) progressed as well, although in a quieter manner. For a while, tasks such as translation, sentiment analysis, and searching didn't look as exciting and flashy as autonomous driving. And then, transformer models burst onto the scene, delivering stunning, state-of-the-art results on NLP tasks and rejuvenating the whole field.

Today, NLP use cases are ubiquitous. Many organizations have accumulated mountains of text documents, including invoices, contracts, forms, reports, emails, web pages, and more. The sheer volume and diversity of these documents make it very challenging to process them efficiently so as to extract precious business insights that can help improve business performance and customer experience.

Some teams decide to build their own NLP solutions using ML libraries and their preferred flavor of IT infrastructure. On top of the ML work, this also requires deploying and managing production environments, with their cohort of challenges: security, monitoring, high availability, scaling, and so on. All of this is important work (who wants to skimp on security?), but it takes valuable time and resources away from the project without creating any actual business value.

This is precisely the problem that AWS AI Services solves. You can extract business insights from your text documents without having to train models or manage any infrastructure. In fact, you don't even need to know the first thing about ML! The answer is literally an API call away, and any developer can start using these services in minutes. Many AWS customers have deployed these services in production in a couple of days, if not hours. They're that simple, and they provide the out-of-the-box security and robustness that is commonly associated with AWS infrastructure.

Authors Mona and Prem have worked with diverse AWS customers for years, and they've distilled this experience in their book, the first of its kind. Not only will you learn how AWS APIs work, but you'll also and, most importantly, learn how to combine them to implement powerful NLP workflows, such as automating document processing, understanding the voice of your customers, or building a solution to monetize content. I highly recommend this book to every developer interested in adding NLP capabilities to their applications with just a few lines of code. So, turn the page, start learning, and build great apps!

Julien Simon

Global AI and ML Evangelist, AWS

Contributors

About the authors

Mona M is an AI/ML customer engineer at Google. She is a highly skilled IT professional, with more than 10 years' experience in software design, development, and integration across diverse work environments. As an AWS solutions architect, her role is to ensure customer success in building applications and services on the AWS platform. She is responsible for crafting a highly scalable, flexible, and resilient cloud architecture that addresses customer business problems. She has published multiple blogs on AI and NLP on the AWS AI channel along with research papers on AI-powered search solutions.

Premkumar Rangarajan is an enterprise solutions architect, specializing in AI/ML at Amazon Web Services. He has 25 years of experience in the IT industry in a variety of roles, including delivery lead, integration specialist, and enterprise architect. He has significant architecture and management experience in delivering large-scale programs across various industries and platforms. He is passionate about helping customers solve ML and AI problems.

About the reviewers

Hitesh Hinduja is an ardent AI enthusiast working as a Senior Manager in AI at Ola Electric, where he leads a team of 20+ people in the areas of ML, statistics, CV, NLP, and reinforcement learning. He has filed 14+ patents in India and the US and has numerous research publications to his name. Hitesh has been associated in research roles at India's top B-schools: the Indian School of Business, Hyderabad, and the Indian Institute of Management, Ahmedabad. He is also actively involved in training and mentoring and has been invited to be a guest speaker by various corporations and associations across the globe.

Egor Pushkin is a technical leader responsible for natural language processing and understanding efforts within the AWS Languages organization. His specialty is the design of highly scalable and reliable services backed by ML/NLP tech. Before joining AWS, he focused on location-sharing technology and built systems deployed to over a billion devices worldwide. Prior to his years in the industry, he pursued an academic career, studying the processing of multispectral satellite images with the use of neural networks.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.22.244