Stanford CS224n: Natural Language Processing with Deep Learning 课程笔记

Stanford CS224n: Natural Language Processing with Deep Learning 
课程主页:http://web.stanford.edu/class/cs224n/

已完成的课程作业代码:https://github.com/xingjian-f/Standford-cs224n-assignments

一些笔记:

lec1 
1 什么是自然语言处理? 
让机器能够“理解”自然语言,从而能够做一些有意义的任务。 
2 人类语言有什么特点? 
语言不是大自然的产物,是人造的,所以处理它和处理视觉、声音会有很多不同。 
语言是离散的。但人类传递语言的载体,图像、语音是连续的。不同的载体对应的语言含义却是不变的。 
3 自然语言处理为什么很难? 
nlp的难点在于歧义性和,需要推理性(人类说话有时不是完整的表达,而需要听者的推理) 
4 (词汇形态学,语法,语义,篇章)各个层级的表示形式? 
向量

lec2 
1 怎样表示一个词的含义? 
(1)使用分类学的方法,例如WordNet。离散表示,one-hot。 
(2)分布式表示

lec3 
1 Word2Vec 和 Glove 训练后,都得到了两组词向量,这两组要怎么用呢? 
经验主义,把它们叠加。不过最好先自己试一试各种情况。

2 怎么评估词向量? 
词的相似度,类比性,之类的测试集,或者作为下游任务的输入,评估下游任务的好坏。 
后者更“实际”,但评估消耗时间更长。

lec8 
1 RNN中为什么梯度消失或爆炸会带来问题? 
爆炸导致导数无法评估,clip解决。 
消失导致“远”一点的参数几乎不更新,对角线初始化,relu,LSTM,GRU解决。

2 神经翻译模型中使用RNN有哪些trick? 
1 encoder 和 decoder 的参数不共享。 
2 decoder中,把上一个隐层,encoder最后一层,上一个输出结果都最为当前隐层的输入。 
3 多层RNN。 
4 双向RNN。 
(以上都是想办法增加参数) 
5 GRU 和 LSTM

lec11 
1 LSTM 和 RNN记忆力的比较 
RNN最多记8-10步,LSTM可以到100步。(实验性结论)

2 使用LSTM的trick 
1 把forget gate 的 bias 初始化到1 
2 只在垂直方向上使用dropout 
3 ensemble,使用8-10个网络,然后平均它们的预测结果,一般有少量的提升!

3 什么是 scheduled sampling? 
RNN下一步的输入中,随机的给ground truth 或 预测结果。

4 什么是BLEU? 
共有n-gram数目(n经常取4),并惩罚预测长度小于真实长度。作为机器翻译的评价指标,开始时和人类评分很match,现在已经被玩坏了。所以google等宣称达到人类水平的翻译结果,其实和真实人类的水平还有很多差距。

lec12 
1 NLP中CNN有什么用?怎么用? 
CNN可以比RNN更能捕获短语向量,没有RNN的梯度消失问题,GPU更友好。 
可以用不同size的卷积来捕获不同长度的短语向量。 
pooling层,尤其是max-over-time pooling, 可以得到这个卷积提取到的某个激活值最大的特征,(即找到了某个短语)。 
使用两套预训练词向量,一套参与训练,一套不参与。 
(character based model,经验主义,一般效果会提升,但训练时间更长,因为输入长度变的更长了。似乎中文很适合?我在中文文本分类任务中,也发现char based 效果比 word based效果要好一些。)

2 NLP任务中不同模型的比较 
1 Bag of Vectors:对于简单的分类任务来说,是很好的base line。多加几层效果会更好! 
2 Window Model:对于不需要宽的视野的分类任务来说,比较好。 
3 CNNs:分类任务上效果好,但很难给出直观解释,在GPU上容易并行。 
4 RNNs:对于分类任务不是最好的,比CNN慢,可以做序列tagging he classification。

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Python Natural Language Processing by Jalaj Thanaki English | 31 July 2017 | ISBN: 1787121429 | ASIN: B072B8YWCJ | 486 Pages | AZW3 | 11.02 MB Key Features Implement Machine Learning and Deep Learning techniques for efficient natural language processing Get started with NLTK and implement NLP in your applications with ease Understand and interpret human languages with the power of text analysis via Python Book Description This book starts off by laying the foundation for Natural Language Processing and why Python is one of the best options to build an NLP-based expert system with advantages such as Community support, availability of frameworks and so on. Later it gives you a better understanding of available free forms of corpus and different types of dataset. After this, you will know how to choose a dataset for natural language processing applications and find the right NLP techniques to process sentences in datasets and understand their structure. You will also learn how to tokenize different parts of sentences and ways to analyze them. During the course of the book, you will explore the semantic as well as syntactic analysis of text. You will understand how to solve various ambiguities in processing human language and will come across various scenarios while performing text analysis. You will learn the very basics of getting the environment ready for natural language processing, move on to the initial setup, and then quickly understand sentences and language parts. You will learn the power of Machine Learning and Deep Learning to extract information from text data. By the end of the book, you will have a clear understanding of natural language processing and will have worked on multiple examples that implement NLP in the real world. What you will learn Focus on Python programming paradigms, which are used to develop NLP applications Understand corpus analysis and different types of data attribute. Learn NLP using Python libraries such as NLTK, Polyglot,
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值