Deep Learning for Natural Language Processing

所需积分/C币:35 2018-07-04 08:46:51 6.93MB PDF
收藏 收藏

This book attempts to simplify and present the concepts of deep learning in a very comprehensive manner, with suitable, full-fledged examples of neural network architectures, such as Recurrent Neural Networks (RNNs) and Sequence to Sequence (seq2seq), for Natural Language Processing (NLP) tasks. The
Deep Learning for Natural language Processing: Creating Neural Networks with Python Palash goal Sumit Pandey Bangalore, Karnataka, India Bangalore, Karnataka, India Karan jain Bangalore, Karnataka, Ind ISBN-13(pbk:978-1-4842-3684-0 ISBN-13( electronic:978-1-4842-3685-7 htos:// doi. org/10.1007/978-1-4842-36857 Library of Congress Control Number: 2018947502 Copyright@ 2018 by Palash Goyal, Sumit Pandey Karan Jain 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 Managing Director, Apress Media LLC: Welmoed Spahr Acquisitions Editor: Celestin Suresh John Development Editor: Matthew Moodie Coordinating Editor: Aditee Mirash Cover designed by eStudio calamar CoverimagedesignedbyFreepik( 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,,orvisitwww.springeronline.comApressMedia,Llcisa California LLC and the sole member (owner) is Springer Science+ Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation, rights-permissions apress titles may be purchased in bulk for academic, corporate or promotional use eBook versions and licenses are also available for most titles. for more information reference our print Any source code or other supplementary material referenced by the author in this book is available Printed on acid-free paper To our parents, sisters, brothers, and friends without whom this book would have been completed one year earlier Table of contents About the authors ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■■■■■■■ About the technical reviewer XII Acknowledgments XV Introduction Chapter 1: Introduction to Natural Language Processing and Deep Learning aaammmaaaaanam aaa 1 Python Packages Pandas…8 Introduction to Natural Language Processing 16 What Is Natural Language Processing? Good Enough, But What is the Big Deal? 16 What Makes Natural Language Processing Difficult?mmeaanmmem 16 What Do We Want to Achieve Through Natural Language Processing....18 Common Terms associated with Language processing 19 Natural Language Processing Libraries NLTK TextBlob…… Spacy 25 Gensim∴ 27 TABLE OF CONTENTS Pattern Stanford coreNLP 29 Getting Started with NLP........,…………29 Text Search Using Regular Expressions ... nnmnnmnnn 30 Text to list m 30 Preprocessing the Text . Accessing Text from the Web. Removal of Stopwords. Counter vectorization 33 TF-IDF Score 33 Text classifier,……135 Introduction to Deep Learning ........................... 35 How Deep Is“Deep”? What Are neural Networks Basic structure of neural networks Types of Neural Networks ……45 Feedforward neural Networks Convolutional neural networks 46 Recurrent neural networks……4 Encoder-Decoder networks 49 Recursive neural networks Multilayer Perceptrons 50 Stochastic Gradient descent. Backpropagation. memmnonmnnmnemnemnenmemnmnmmmmnn57 Deep Learning Libraries 60 Thean0,………………,…,160 Theano Installation ,61 TABLE OF CONTENTS Theano Examples .63 TensorFlow …64 Data Flow graphs .. TensorFlow installation ensorFlow Keras 69 Next Steps.a. 74 Chapter 2: Word Vector Representations mmammmmmmmmmmmmmm 75 Introduction to Word embedding Neural Language model Word2veC…,…….81 Skip -Gram Model 82 Model Components: Architecture Model components: Hidden Layer.m.m..mmmnnmememnnnmmmnmnnn 84 Model components: Output Layer ,86 cB0 W Mode…87 Subsampling Frequent Words Negative Sampling 91 Word2vec Code 92 Skip-Gram Code 97 CBOW Code Next Steps.m.maaenmamaaamaant 118 Chapter 3: Unfolding Recurrent Neural Networks mmaaamaamann 119 Recurrent neural What is recurrence?…121 Differences between feedforward and recurrent neural networks, 121 TABLE OF CONTENTS Recurrent Neural network basics 123 Natural Language processing and recurrent Neural Networks. 126 RNNS Mechanism Training rnns. ..mmmmmmmmmmmmmmmmmmmmmmmmmmmm.134 Meta Meaning of Hidden State of rNNmaamannnmm. 137 Tuning rNNs…,,.,.,.,.,.,.,.,.,.,.,,,,138 Long Short- Term Memory Networks……..,.,,…138 Sequence-to-Sequence Models .mm...... 145 Advanced Sequence-to-Sequence Models. nnnmnmnn 152 Sequence-to-Sequence Use Case.mnnnnteaettnnnen. 157 Next Steps…… 168 Chapter 4: Developing a chatbot ammann uu169 Introduction to chatbot mmu. 169 Origin of Chatbots 170 But How Does a Chatbot Work, Anyway?am... 171 Why Are Chatbots Such a Big Opportunity Building a Chatbot Can Sound Intimidating. Is It Actually?........173 Conversational bot.. 175 Chatbot:AutomaticTextGeneration.…191 Next Steps…29 Chapter 5: Research Paper Implementation: Sentiment C| assification… n231 Self-Attentive Sentence Embedding. Proposed Approach 234 Visualization Research Findings TABLE OF CONTENTS Implementing Sentiment Classification .mammmnammmmmammnmamama 246 Sentiment Classification Code 248 Mode| Results….61 ensor board Scope for Improvement. Next Steps…,,,,,, 267 Index…u ua269 About the authors Palash Goyal is a senior data scientist and currently works with the applications of data science and deep learning in the online marketing domain He studied mathematics and computing at the indian Institute of Technology (IIT) Guwahati and proceeded to work in a fast-paced upscale environment He has wide experience in E-commerce and travel, insurance and banking industries Passionate about mathematics and finance Palash manages his portfolio of multiple cryptocurrencies and the latest Initial Coin Offerings(ICOs)in his spare time, using deep learning and reinforcement learning techniques for price prediction and portfolio management. He keeps in touch with the latest trends in the data science field and shares theseonhispersonalbloghttp://madoverdata.comandminesarticles related to smart farming in free time

试读 127P Deep Learning for Natural Language Processing
立即下载 低至0.43元/次 身份认证VIP会员低至7折
    关注 私信 TA的资源
    Deep Learning for Natural Language Processing 35积分/C币 立即下载
    Deep Learning for Natural Language Processing第1页
    Deep Learning for Natural Language Processing第2页
    Deep Learning for Natural Language Processing第3页
    Deep Learning for Natural Language Processing第4页
    Deep Learning for Natural Language Processing第5页
    Deep Learning for Natural Language Processing第6页
    Deep Learning for Natural Language Processing第7页
    Deep Learning for Natural Language Processing第8页
    Deep Learning for Natural Language Processing第9页
    Deep Learning for Natural Language Processing第10页
    Deep Learning for Natural Language Processing第11页
    Deep Learning for Natural Language Processing第12页
    Deep Learning for Natural Language Processing第13页
    Deep Learning for Natural Language Processing第14页
    Deep Learning for Natural Language Processing第15页
    Deep Learning for Natural Language Processing第16页
    Deep Learning for Natural Language Processing第17页
    Deep Learning for Natural Language Processing第18页
    Deep Learning for Natural Language Processing第19页
    Deep Learning for Natural Language Processing第20页


    35积分/C币 立即下载 >