Taweh Beysolow II
Applied Natural Language Processing with Python Implementing Machine Learning and Deep Learning Algorithms for Natural Language Processing
Taweh Beysolow II
San Francisco, California, USA
Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the books product page, located at www.apress.com/978-1-4842-3732-8 . For more detailed information, please visit http://www.apress.com/source-code .
ISBN 978-1-4842-3732-8 e-ISBN 978-1-4842-3733-5
https://doi.org/10.1007/978-1-4842-3733-5
Library of Congress Control Number: 2018956300
Taweh Beysolow II 2018
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
To my family, friends, and colleagues for their continued support and encouragement to do more with myself than I often can conceive of doing
Introduction
Thank you for choosing Applied Natural Language Processing with Python for your journey into natural language processing (NLP). Readers should be aware that this text should not be considered a comprehensive study of machine learning, deep learning, or computer programming. As such, it is assumed that you are familiar with these techniques to some degree. Regardless, a brief review of the concepts necessary to understand the tasks that you will perform in the book is provided.
After the brief review, we begin by examining how to work with raw text data, slowly working our way through how to present data to machine learning and deep learning algorithms. After you are familiar with some basic preprocessing algorithms, we will make our way into some of the more advanced NLP tasks, such as training and working with trained word embeddings, spell-check, text generation, and question-and-answer generation.
All of the examples utilize the Python programming language and popular deep learning and machine learning frameworks, such as scikit-learn, Keras, and TensorFlow. Readers can feel free to access the source code utilized in this book on the corresponding GitHub page and/or try their own methods for solving the various problems tackled in this book with the datasets provided.
Acknowledgments
A special thanks to Santanu Pattanayak, Divya Modi, Celestin Suresh John, and everyone at Apress for the wonderful experience. It has been a pleasure to work with you all on this text. I couldnt have asked for a better team.
About the Author and About the Technical Reviewer
About the Author
Taweh Beysolow II
is a data scientist and author currently based in San Francisco, California. He has a bachelors degree in economics from St. Johns University and a masters degree in applied statistics from Fordham University. His professional experience has included working at Booz Allen Hamilton, as a consultant and in various startups as a data scientist, specifically focusing on machine learning. He has applied machine learning to federal consulting, financial services, and agricultural sectors.
About the Technical Reviewer
Santanu Pattanayak
currently works at GE Digital as a staff data scientist and is the author of the deep learning book Pro Deep Learning with TensorFlow: A Mathematical Approach to Advanced Artificial Intelligence in Python (Apress, 2017). He has more than eight years of experience in the data analytics/data science field and a background in development and database technologies. Prior to joining GE, Santanu worked at companies such as RBS, Capgemini, and IBM. He graduated with a degree in electrical engineering from Jadavpur University, Kolkata, and is an avid math enthusiast. Santanu is currently pursuing a masters degree in data science from the Indian Institute of Technology (IIT), Hyderabad. He also devotes his time to data science hackathons and Kaggle competitions, where he ranks within the top 500 across the globe. Santanu was born and brought up in West Bengal, India, and currently resides in Bangalore, India, with his wife.
Taweh Beysolow II 2018
Taweh Beysolow II Applied Natural Language Processing with Python https://doi.org/10.1007/978-1-4842-3733-5_1
1. What Is Natural Language Processing?
Taweh Beysolow II
(1)
San Francisco, California, USA
Deep learning and machine learning continues to proliferate throughout various industries, and has revolutionized the topic that I wish to discuss in this book: natural language processing (NLP). NLP is a subfield of computer science that is focused on allowing computers to understand language in a natural way, as humans do. Typically, this would refer to tasks such as understanding the sentiment of text, speech recognition, and generating responses to questions.
NLP has become a rapidly evolving field, and one whose applications have represented a large portion of artificial intelligence (AI) breakthroughs. Some examples of implementations using deep learning are chatbots that handle customer service requests, auto-spellcheck on cell phones, and AI assistants, such as Cortana and Siri, on smartphones. For those who have experience in machine learning and deep learning, natural language processing is one of the most exciting areas for individuals to apply their skills. To provide context for broader discussions, however, lets discuss the development of natural language processing as a field.