没有合适的资源?快使用搜索试试~ 我知道了~
首页Speech and Language Processing 斯坦福大学教程pdf
资源详情
资源评论
资源推荐
Speech and Language Processing
An Introduction to Natural Language Processing,
Computational Linguistics, and Speech Recognition
Third Edition draft
Daniel Jurafsky
Stanford University
James H. Martin
University of Colorado at Boulder
Copyright
c
2017
Draft of August 28, 2017. Comments and typos welcome!
Summary of Contents
1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2 Regular Expressions, Text Normalization, Edit Distance . . . . . . . . . 10
3 Finite State Transducers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4 Language Modeling with N-grams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5 Spelling Correction and the Noisy Channel . . . . . . . . . . . . . . . . . . . . . 61
6 Naive Bayes and Sentiment Classification . . . . . . . . . . . . . . . . . . . . . . . 74
7 Logistic Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
8 Neural Networks and Neural Language Models . . . . . . . . . . . . . . . . . 102
9 Hidden Markov Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
10 Part-of-Speech Tagging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
11 Formal Grammars of English . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
12 Syntactic Parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
13 Statistical Parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
14 Dependency Parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
15 Vector Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
16 Semantics with Dense Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
17 Computing with Word Senses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
18 Lexicons for Sentiment and Affect Extraction . . . . . . . . . . . . . . . . . . . 326
19 The Representation of Sentence Meaning . . . . . . . . . . . . . . . . . . . . . . . 346
20 Computational Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
21 Information Extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
22 Semantic Role Labeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
23 Coreference Resolution and Entity Linking . . . . . . . . . . . . . . . . . . . . . 396
24 Discourse Coherence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
25 Machine Translation and Seq2Seq Models . . . . . . . . . . . . . . . . . . . . . . 398
26 Summarization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
27 Question Answering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
28 Dialog Systems and Chatbots. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
29 Advanced Dialog Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
30 Speech Recognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
31 Speech Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
Bibliography. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
Subject Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
2
Contents
1 Introduction 9
2 Regular Expressions, Text Normalization, Edit Distance 10
2.1 Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2 Words and Corpora . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3 Text Normalization . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.4 Minimum Edit Distance . . . . . . . . . . . . . . . . . . . . . . . 26
2.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Bibliographical and Historical Notes . . . . . . . . . . . . . . . . . . . . 31
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3 Finite State Transducers 34
4 Language Modeling with N-grams 35
4.1 N-Grams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.2 Evaluating Language Models . . . . . . . . . . . . . . . . . . . . 41
4.3 Generalization and Zeros . . . . . . . . . . . . . . . . . . . . . . 43
4.4 Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.5 Kneser-Ney Smoothing . . . . . . . . . . . . . . . . . . . . . . . 51
4.6 The Web and Stupid Backoff . . . . . . . . . . . . . . . . . . . . 53
4.7 Advanced: Perplexity’s Relation to Entropy . . . . . . . . . . . . 54
4.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Bibliographical and Historical Notes . . . . . . . . . . . . . . . . . . . . 58
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5 Spelling Correction and the Noisy Channel 61
5.1 The Noisy Channel Model . . . . . . . . . . . . . . . . . . . . . . 62
5.2 Real-word spelling errors . . . . . . . . . . . . . . . . . . . . . . 67
5.3 Noisy Channel Model: The State of the Art . . . . . . . . . . . . . 69
Bibliographical and Historical Notes . . . . . . . . . . . . . . . . . . . . 72
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
6 Naive Bayes and Sentiment Classification 74
6.1 Naive Bayes Classifiers . . . . . . . . . . . . . . . . . . . . . . . 76
6.2 Training the Naive Bayes Classifier . . . . . . . . . . . . . . . . . 78
6.3 Worked example . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
6.4 Optimizing for Sentiment Analysis . . . . . . . . . . . . . . . . . 81
6.5 Naive Bayes as a Language Model . . . . . . . . . . . . . . . . . 82
6.6 Evaluation: Precision, Recall, F-measure . . . . . . . . . . . . . . 83
6.7 More than two classes . . . . . . . . . . . . . . . . . . . . . . . . 85
6.8 Test sets and Cross-validation . . . . . . . . . . . . . . . . . . . . 86
6.9 Statistical Significance Testing . . . . . . . . . . . . . . . . . . . 87
6.10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Bibliographical and Historical Notes . . . . . . . . . . . . . . . . . . . . 89
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
7 Logistic Regression 92
7.1 Features in Multinomial Logistic Regression . . . . . . . . . . . . 93
7.2 Classification in Multinomial Logistic Regression . . . . . . . . . 95
3
4 CONTENTS
7.3 Learning Logistic Regression . . . . . . . . . . . . . . . . . . . . 96
7.4 Regularization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
7.5 Feature Selection . . . . . . . . . . . . . . . . . . . . . . . . . . 99
7.6 Choosing a classifier and features . . . . . . . . . . . . . . . . . . 100
7.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Bibliographical and Historical Notes . . . . . . . . . . . . . . . . . . . . 101
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
8 Neural Networks and Neural Language Models 102
8.1 Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
8.2 The XOR problem . . . . . . . . . . . . . . . . . . . . . . . . . . 105
8.3 Feed-Forward Neural Networks . . . . . . . . . . . . . . . . . . . 108
8.4 Training Neural Nets . . . . . . . . . . . . . . . . . . . . . . . . 111
8.5 Neural Language Models . . . . . . . . . . . . . . . . . . . . . . 115
8.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Bibliographical and Historical Notes . . . . . . . . . . . . . . . . . . . . 120
9 Hidden Markov Models 122
9.1 Markov Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
9.2 The Hidden Markov Model . . . . . . . . . . . . . . . . . . . . . 124
9.3 Likelihood Computation: The Forward Algorithm . . . . . . . . . 127
9.4 Decoding: The Viterbi Algorithm . . . . . . . . . . . . . . . . . . 131
9.5 HMM Training: The Forward-Backward Algorithm . . . . . . . . 134
9.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Bibliographical and Historical Notes . . . . . . . . . . . . . . . . . . . . 140
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
10 Part-of-Speech Tagging 142
10.1 (Mostly) English Word Classes . . . . . . . . . . . . . . . . . . . 143
10.2 The Penn Treebank Part-of-Speech Tagset . . . . . . . . . . . . . 145
10.3 Part-of-Speech Tagging . . . . . . . . . . . . . . . . . . . . . . . 147
10.4 HMM Part-of-Speech Tagging . . . . . . . . . . . . . . . . . . . 149
10.5 Maximum Entropy Markov Models . . . . . . . . . . . . . . . . . 157
10.6 Bidirectionality . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
10.7 Part-of-Speech Tagging for Other Languages . . . . . . . . . . . . 162
10.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Bibliographical and Historical Notes . . . . . . . . . . . . . . . . . . . . 164
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
11 Formal Grammars of English 168
11.1 Constituency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
11.2 Context-Free Grammars . . . . . . . . . . . . . . . . . . . . . . . 169
11.3 Some Grammar Rules for English . . . . . . . . . . . . . . . . . . 174
11.4 Treebanks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
11.5 Grammar Equivalence and Normal Form . . . . . . . . . . . . . . 187
11.6 Lexicalized Grammars . . . . . . . . . . . . . . . . . . . . . . . . 188
11.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Bibliographical and Historical Notes . . . . . . . . . . . . . . . . . . . . 194
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
12 Syntactic Parsing 197
12.1 Ambiguity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
CONTENTS 5
12.2 CKY Parsing: A Dynamic Programming Approach . . . . . . . . 199
12.3 Partial Parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
12.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Bibliographical and Historical Notes . . . . . . . . . . . . . . . . . . . . 210
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
13 Statistical Parsing 212
13.1 Probabilistic Context-Free Grammars . . . . . . . . . . . . . . . . 213
13.2 Probabilistic CKY Parsing of PCFGs . . . . . . . . . . . . . . . . 217
13.3 Ways to Learn PCFG Rule Probabilities . . . . . . . . . . . . . . 218
13.4 Problems with PCFGs . . . . . . . . . . . . . . . . . . . . . . . . 220
13.5 Improving PCFGs by Splitting Non-Terminals . . . . . . . . . . . 223
13.6 Probabilistic Lexicalized CFGs . . . . . . . . . . . . . . . . . . . 225
13.7 Probabilistic CCG Parsing . . . . . . . . . . . . . . . . . . . . . . 230
13.8 Evaluating Parsers . . . . . . . . . . . . . . . . . . . . . . . . . . 238
13.9 Human Parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
13.10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Bibliographical and Historical Notes . . . . . . . . . . . . . . . . . . . . 242
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
14 Dependency Parsing 245
14.1 Dependency Relations . . . . . . . . . . . . . . . . . . . . . . . . 246
14.2 Dependency Formalisms . . . . . . . . . . . . . . . . . . . . . . . 248
14.3 Dependency Treebanks . . . . . . . . . . . . . . . . . . . . . . . 249
14.4 Transition-Based Dependency Parsing . . . . . . . . . . . . . . . 250
14.5 Graph-Based Dependency Parsing . . . . . . . . . . . . . . . . . 261
14.6 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
14.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Bibliographical and Historical Notes . . . . . . . . . . . . . . . . . . . . 268
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
15 Vector Semantics 270
15.1 Words and Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . 271
15.2 Weighing terms: Pointwise Mutual Information (PMI) . . . . . . . 275
15.3 Measuring similarity: the cosine . . . . . . . . . . . . . . . . . . 279
15.4 Using syntax to define a word’s context . . . . . . . . . . . . . . . 282
15.5 Evaluating Vector Models . . . . . . . . . . . . . . . . . . . . . . 283
15.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Bibliographical and Historical Notes . . . . . . . . . . . . . . . . . . . . 284
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
16 Semantics with Dense Vectors 286
16.1 Dense Vectors via SVD . . . . . . . . . . . . . . . . . . . . . . . 286
16.2 Embeddings from prediction: Skip-gram and CBOW . . . . . . . 290
16.3 Properties of embeddings . . . . . . . . . . . . . . . . . . . . . . 295
16.4 Brown Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . 295
16.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Bibliographical and Historical Notes . . . . . . . . . . . . . . . . . . . . 298
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
17 Computing with Word Senses 300
17.1 Word Senses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
剩余498页未读,继续阅读
Lnrd_L
- 粉丝: 5
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
- SPC统计方法基础知识.pptx
- MW全能培训汽轮机调节保安系统PPT教学课件.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1