没有合适的资源?快使用搜索试试~ 我知道了~
首页Jacob Eisenstein -natural language processing notes
资源详情
资源评论
资源推荐

Natural Language Processing1
Jacob Eisenstein2
October 3, 20183


Contents4
Contents 15
Preface i6
Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i7
How to use this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii8
1 Introduction 19
1.1 Natural language processing and its neighbors . . . . . . . . . . . . . . . . . 110
1.2 Three themes in natural language processing . . . . . . . . . . . . . . . . . . 611
1.2.1 Learning and knowledge . . . . . . . . . . . . . . . . . . . . . . . . . 612
1.2.2 Search and learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713
1.2.3 Relational, compositional, and distributional perspectives . . . . . . 914
I Learning 1115
2 Linear text classification 1316
2.1 Na
¨
ıve Bayes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1617
2.1.1 Types and tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1918
2.1.2 Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2019
2.1.3 Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2020
2.1.4 Smoothing and MAP estimation . . . . . . . . . . . . . . . . . . . . . 2221
2.1.5 Setting hyperparameters . . . . . . . . . . . . . . . . . . . . . . . . . . 2322
2.2 Discriminative learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2423
2.2.1 Perceptron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2524
2.2.2 Averaged perceptron . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2725
2.3 Loss functions and large-margin classification . . . . . . . . . . . . . . . . . 2826
2.3.1 Large margin classification . . . . . . . . . . . . . . . . . . . . . . . . 3027
2.3.2 Support vector machines . . . . . . . . . . . . . . . . . . . . . . . . . 3128
2.3.3 Slack variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3329
2.4 Logistic regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3430
1

2 CONTENTS
2.4.1 Regularization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3531
2.4.2 Gradients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3632
2.5 Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3733
2.5.1 Batch optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3734
2.5.2 Online optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3835
2.6 *Additional topics in classification . . . . . . . . . . . . . . . . . . . . . . . . 4036
2.6.1 Feature selection by regularization . . . . . . . . . . . . . . . . . . . . 4037
2.6.2 Other views of logistic regression . . . . . . . . . . . . . . . . . . . . . 4138
2.7 Summary of learning algorithms . . . . . . . . . . . . . . . . . . . . . . . . . 4239
3 Nonlinear classification 4740
3.1 Feedforward neural networks . . . . . . . . . . . . . . . . . . . . . . . . . . . 4841
3.2 Designing neural networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5042
3.2.1 Activation functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5043
3.2.2 Network structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5144
3.2.3 Outputs and loss functions . . . . . . . . . . . . . . . . . . . . . . . . 5245
3.2.4 Inputs and lookup layers . . . . . . . . . . . . . . . . . . . . . . . . . 5346
3.3 Learning neural networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5347
3.3.1 Backpropagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5548
3.3.2 Regularization and dropout . . . . . . . . . . . . . . . . . . . . . . . . 5749
3.3.3 *Learning theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5850
3.3.4 Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5951
3.4 Convolutional neural networks . . . . . . . . . . . . . . . . . . . . . . . . . . 6152
4 Linguistic applications of classification 6953
4.1 Sentiment and opinion analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 6954
4.1.1 Related problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7155
4.1.2 Alternative approaches to sentiment analysis . . . . . . . . . . . . . . 7256
4.2 Word sense disambiguation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7357
4.2.1 How many word senses? . . . . . . . . . . . . . . . . . . . . . . . . . 7458
4.2.2 Word sense disambiguation as classification . . . . . . . . . . . . . . 7559
4.3 Design decisions for text classification . . . . . . . . . . . . . . . . . . . . . . 7660
4.3.1 What is a word? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7661
4.3.2 How many words? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7962
4.3.3 Count or binary? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8063
4.4 Evaluating classifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8164
4.4.1 Precision, recall, and F -MEASURE . . . . . . . . . . . . . . . . . . . . 8165
4.4.2 Threshold-free metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . 8366
4.4.3 Classifier comparison and statistical significance . . . . . . . . . . . . 8367
4.4.4 *Multiple comparisons . . . . . . . . . . . . . . . . . . . . . . . . . . . 8768
4.5 Building datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8869
Jacob Eisenstein. Draft of October 3, 2018.

CONTENTS 3
4.5.1 Metadata as labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8870
4.5.2 Labeling data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8871
5 Learning without supervision 9572
5.1 Unsupervised learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9573
5.1.1 K-means clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9674
5.1.2 Expectation-Maximization (EM) . . . . . . . . . . . . . . . . . . . . . 9875
5.1.3 EM as an optimization algorithm . . . . . . . . . . . . . . . . . . . . . 10276
5.1.4 How many clusters? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10377
5.2 Applications of expectation-maximization . . . . . . . . . . . . . . . . . . . . 10478
5.2.1 Word sense induction . . . . . . . . . . . . . . . . . . . . . . . . . . . 10479
5.2.2 Semi-supervised learning . . . . . . . . . . . . . . . . . . . . . . . . . 10580
5.2.3 Multi-component modeling . . . . . . . . . . . . . . . . . . . . . . . . 10681
5.3 Semi-supervised learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10782
5.3.1 Multi-view learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10883
5.3.2 Graph-based algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . 10984
5.4 Domain adaptation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11085
5.4.1 Supervised domain adaptation . . . . . . . . . . . . . . . . . . . . . . 11186
5.4.2 Unsupervised domain adaptation . . . . . . . . . . . . . . . . . . . . 11287
5.5 *Other approaches to learning with latent variables . . . . . . . . . . . . . . 11488
5.5.1 Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11489
5.5.2 Spectral learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11690
II Sequences and trees 12391
6 Language models 12592
6.1 N-gram language models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12693
6.2 Smoothing and discounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12994
6.2.1 Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12995
6.2.2 Discounting and backoff . . . . . . . . . . . . . . . . . . . . . . . . . . 13096
6.2.3 *Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13197
6.2.4 *Kneser-Ney smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . 13398
6.3 Recurrent neural network language models . . . . . . . . . . . . . . . . . . . 13499
6.3.1 Backpropagation through time . . . . . . . . . . . . . . . . . . . . . . 136100
6.3.2 Hyperparameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137101
6.3.3 Gated recurrent neural networks . . . . . . . . . . . . . . . . . . . . . 137102
6.4 Evaluating language models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139103
6.4.1 Held-out likelihood . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139104
6.4.2 Perplexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140105
6.5 Out-of-vocabulary words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141106
Under contract with MIT Press, shared under CC-BY-NC-ND license.
剩余589页未读,继续阅读















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0