Muutke küpsiste eelistusi

Natural Language Processing in Action: Understanding, analyzing, and generating text with Python [Pehme köide]

  • Formaat: Paperback / softback, 544 pages, kõrgus x laius x paksus: 231x185x30 mm, kaal: 940 g, Illustrations
  • Ilmumisaeg: 13-Jun-2019
  • Kirjastus: Manning Publications
  • ISBN-10: 1617294632
  • ISBN-13: 9781617294631
  • Formaat: Paperback / softback, 544 pages, kõrgus x laius x paksus: 231x185x30 mm, kaal: 940 g, Illustrations
  • Ilmumisaeg: 13-Jun-2019
  • Kirjastus: Manning Publications
  • ISBN-10: 1617294632
  • ISBN-13: 9781617294631
Description

Modern NLP techniques based on machine learning radically improve the ability of software to recognize patterns, use context to infer meaning, and accurately discern intent from poorly-structured text. In Natural Language Processing in Action, readers explore carefully chosen examples and expand their machine's knowledge which they can then apply to a range of challenges.

 

Key Features

Easy-to-follow

Clear examples

Hands-on-guide

 

Audience

A basic understanding of machine learning and some experience with a modern programming language such as Python, Java, C++, or

JavaScript will be helpful.

 

About the technology

Natural Language Processing (NLP) is the discipline of teaching computers to read more like people, and readers can see examples of it in everything from chatbots to the speech-recognition software on their phone.

 

Hobson Lane has more than 15 years of experience building autonomous systems that make important decisions on behalf of humans.

Hannes Hapke is an Electrical Engineer turned Data Scientist with experience in deep learning.

Cole Howard is a carpenter and writer turned Deep Learning expert.
Foreword xiii
Preface xv
Acknowledgments xxi
About this book xxiv
About the authors xxvii
About the cover illustration xxix
Part 1 Wordy machines
1(152)
1 Packets ofthought (NLP overview)
3(27)
1.1 Natural language vs. programming language
4(1)
1.2 The magic
4(4)
Machines that converse
5(1)
The math
6(2)
1.3 Practical applications
8(1)
1.4 Language through a computer's "eyes"
9(10)
The language of locks
10(1)
Regular expressions
11(1)
A simple chatbot
12(4)
Another way
16(3)
1.5 A brief overflight of hyperspace
19(2)
1.6 Word order and grammar
21(1)
1.7 A chatbot natural language pipeline
22(3)
1.8 Processing in depth
25(2)
1.9 Natural language IQ
27(3)
2 Build your vocabulary (word tokenization)
30(40)
2.1 Challenges (a preview of stemming)
32(1)
2.2 Building your vocabulary with a tokenizer
33(29)
Dot product
41(1)
Measuring bag-of-words overlap
42(1)
A token improvement
43(5)
Extending your vocabulary with n-grams
48(6)
Normalizing your vocabulary
54(8)
2.3 Sentiment
62(8)
VADER---A rule-based sentiment analyzer
64(1)
Naive Bayes
65(5)
3 Math with words (TF-IDF vectors)
70(27)
3.1 Bag of words
71(5)
3.2 Vectorizing
76(7)
Vector spaces
79(4)
3.3 ZipfsLaw
83(3)
3.4 Topic modeling
86(11)
Return of Zipf
89(1)
Relevance ranking
90(3)
Tools
93(1)
Alternatives
93(2)
Okapi BM25
95(1)
What's next
95(2)
4 Finding meaning in word counts (semantic analysis)
97(56)
4.1 From word counts to topic scores
98(13)
TF-IDF vectors and lemmatization
99(1)
Topic vectors
99(2)
Thought experiment
101(4)
An algorithm for scoring topics
105(2)
An LDA classifier
107(4)
4.2 Latent semantic analysis
111(5)
Your thought experiment made real
113(3)
4.3 Singular value decomposition
116(7)
U---left singular vectors
118(1)
S---singular values
119(1)
VT---right singular vectors
120(1)
SVD matrix orientation
120(1)
Truncating the topics
121(2)
4.4 Principal component analysis
123(11)
PCA on 3D vectors
125(1)
Stop horsing around and get back to NLP
126(2)
Using PCA for SMS message semantic analysis
128(2)
Using truncated SVD for SMS message semantic analysis
130(1)
How well does LSA work for spam classification ?
131(3)
4.5 Latent Dirichlet allocation (LDiA)
134(9)
The LDiA idea
135(2)
LDiA topic model for SMS messages
137(3)
LDiA + LDA = spam classifier
140(2)
A fairer comparison: 32 LDiA topics
142(1)
4.6 Distance and similarity
143(3)
4.7 Steering with feedback
146(2)
Linear discriminant analysis
147(1)
4.8 Topic vector power
148(5)
Semantic search
150(2)
Improvements
152(1)
Part 2 Deeper learning (neural networks)
153(184)
5 Baby steps with neural networks (perceptrons and backpropagation)
155(26)
5.1 Neural networks, the ingredient list
156(25)
Perceptron
157(1)
A numericalperceptron
157(1)
Detour through bias
158(14)
Let's go skiing---the error surface
172(1)
Off the chair lift, onto the slope
173(1)
Let's shake things up a bit
174(1)
Keras: neural networks in Python
175(4)
Onward and deepward
179(1)
Normalization: input with style
179(2)
6 Reasoning with word vectors (Word2vec)
181(37)
6.1 Semantic queries and analogies
182(2)
Analogy questions
183(1)
6.2 Word vectors
184(34)
Vector-oriented reasoning
187(4)
How to compute Word2vec representations
191(9)
How to use the gensim.word2vec module
200(2)
How to generate your own word vector representations
202(3)
Word2vec vs. GloVe (Global Vectors)
205(1)
fastText
205(1)
Word2vec vs. LSA
206(1)
Visualizing word relationships
207(7)
Unnatural words
214(1)
Document similarity with Doc2vec
215(3)
7 Getting words in order with convolutional neural networks' (CNNs)
218(29)
7.1 Learning meaning
220(1)
7.2 Toolkit
221(1)
7.3 Convolutional neural nets
222(6)
Building blocks
223(1)
Step size (stride)
224(1)
Filter composition
224(2)
Padding
226(2)
Learning
228(1)
7.4 Narrow windows indeed
228(19)
Implementation in Keras: prepping the data
230(5)
Convolutional neural network architecture
235(1)
Pooling
236(2)
Dropout
238(1)
The cherry on the sundae
239(2)
Let's get to learning (training)
241(2)
Using the model in a pipeline
243(1)
Where do you go from here?
244(3)
8 Loopy (recurrent) neural networks (RNNs)
247(27)
8.1 Remembering with recurrent networks
250(14)
Backpropagation through time
255(2)
When do we update what?
257(2)
Recap
259(1)
There's always a catch
259(1)
Recurrent neural net with Keras
260(4)
8.2 Putting things together
264(2)
8.3 Let's get to learning our past selves
266(1)
8.4 Hyperparameters
267(2)
8.5 Predicting
269(5)
Statefulness
270(1)
Two-way street
271(1)
What is this thing?
272(2)
9 Improving retention with long short-term memory networks
274(37)
9.1 LSTM
275(36)
Backpropagation through time
284(3)
Where does the rubber hit the road?
287(1)
Dirty data
288(3)
Back to the dirty data
291(1)
Words are hard. Letters are easier
292(6)
My turn to chat
298(2)
My turn to speak more clearly
300(8)
Learned how to say, but not yet what
308(1)
Other kinds of memory
308(1)
Going deeper
309(2)
10 Sequence-to-sequence models and attention
311(26)
10.1 Encoder-decoder architecture
312(6)
Decoding thought
313(2)
Look familiar?
315(1)
Sequence-to-sequence conversation
316(1)
LSTM review
317(1)
10.2 Assembling a sequence-to-sequence pipeline
318(6)
Preparing your datasetfor the sequence-to-sequence training
318(2)
Sequence-to-sequence model in Keras
320(1)
Sequence encoder
320(2)
Thought decoder
322(1)
Assembling the sequence-to-sequence network
323(1)
10.3 Training the sequence-to-sequence network
324(2)
Generate output sequences
325(1)
10.4 Building a chatbot using sequence-to-sequence networks
326(6)
Preparing the corpus for your training
326(1)
Building your character dictionary
327(1)
Generate one-hot encoded training sets
328(1)
Train your sequence-to-sequence chatbot
329(1)
Assemble the model for sequence generation
330(1)
Predicting a sequence
330(1)
Generating a response
331(1)
Converse with your chatbot
331(1)
10.5 Enhancements
332(2)
Reduce training complexity with bucketing
332(1)
Paying attention
333(1)
10.6 In the real world
334(3)
Part 3 Getting real (real-world NLP challenges)
337(90)
11 Information extraction (named entity extraction and question answering)
339(26)
11.1 Named entities and relations
339(4)
A knowledge base
340(3)
Information extraction
343(1)
11.2 Regular patterns
343(3)
Regular expressions
344(1)
Information extraction as ML feature extraction
345(1)
11.3 Information worth extracting
346(6)
Extracting GPS locations
347(1)
Extracting dates
347(5)
11.4 Extracting relationships (relations)
352(11)
Part-of-speech (POS) tagging
353(4)
Entity name normalization
357(1)
Relation normalization and extraction
358(1)
Word patterns
358(1)
Segmentation
359(1)
Why won't split(`.!?') work?
360(1)
Sentence segmentation with regular expressions
361(2)
11.5 In the real world
363(2)
12 Getting chatty (dialog engines)
365(38)
12.1 Language skill
366(7)
Modem approaches
367(6)
A hybrid approach
373(1)
12.2 Pattern-matching approach
373(9)
A pattern-matching chatbot with AIML
375(6)
A network view of pattern matching
381(1)
12.3 Grounding
382(2)
12.4 Retrieval (search)
384(7)
The context challenge
384(2)
Example retrieval-based chatbot
386(3)
A search-based chatbot
389(2)
12.5 Generative models
391(4)
Chat about NLPIA
392(2)
Pros and cons of each approach
394(1)
12.6 Four-wheel drive
395(1)
The Will to succeed
395(1)
12.7 Design process
396(3)
12.8 Trickery
399(2)
Ask questions with predictable answers
399(1)
Be entertaining
399(1)
When all else fails, search
400(1)
Being popular
400(1)
Be a connector
400(1)
Getting emotional
400(1)
12.9 In the real world
401(2)
13 Scaling up (optimization, parallelization, and batch processing)
403(24)
13.1 Too much of a good thing (data)
404(1)
13.2 Optimizing NLP algorithms
404(10)
Indexing
405(1)
Advanced indexing
406(2)
Advanced indexing with Annoy
408(4)
Why use approximate indexes at all?
412(1)
An indexing workaround: discretizing
413(1)
13.3 Constant RAM algorithms
414(2)
Gensim
414(1)
Graph computing
415(1)
13.4 Parallelizing your NLP computations
416(3)
Training NLP models on GPUs
416(1)
Renting vs. buying
417(1)
GPU rental options
418(1)
Tensor processing units
419(1)
13.5 Reducing the memory footprint during model training
419(3)
13.6 Gaining model insights with TensorBoard
422(5)
How to visualize word embeddings
423(4)
Appendix A Your NLP tools 427(7)
Appendix B Playful Python and regular expressions 434(6)
Appendix C Vectors and matrices (linear algebra fundamentals) 440(6)
Appendix D Machine learning tools and techniques 446(13)
Appendix E Setting up your A WS GPU 459(14)
Appendix F Locality sensitive hashing 473(8)
Resources 481(9)
Glossary 490(7)
Index 497
Hobson Lane has more than 15 years of experience building autonomous systems that make important decisions on behalf of humans.

Hannes Hapke is an Electrical Engineer turned Data Scientist with experience in deep learning.

Cole Howard is a carpenter and writer turned Deep Learning expert.