cnn怎么用在自然语言处理(NLP)中
2017-04-19 10:57
218 查看
来自 http://www.wildml.com/2015/11/understanding-convolutional-neural-networks-for-nlp/
SO, HOW DOES ANY OF THIS APPLY TO NLP?
Instead of image pixels, the input to most NLP tasks are sentences or documents represented as a matrix. Each row of the matrix corresponds to one token, typically a word, but it could be a character. That is, each row is vector that represents a word. Typically,these vectors are word embeddings (low-dimensional representations) like word2vec or GloVe,
but they could also be one-hot vectors that index the word into a vocabulary. For a 10 word sentence using a 100-dimensional embedding we would have a 10×100 matrix as our input. That’s our “image”.
In vision, our filters slide over local patches of an image, but in NLP we typically use filters that slide over full rows of the matrix (words). Thus, the “width” of our filters is usually the same as the width of the input matrix. The height, or region
size, may vary, but sliding windows over 2-5 words at a time is typical. Putting all the above together, a Convolutional Neural Network for NLP may look like this (take a few minutes and try understand this picture and how the dimensions are computed.
You can ignore the pooling for now, we’ll explain that later):
把每个单词用word embeddings 处理成向量,然后一个句子拼成一张图。下图中第二列的彩色图像为卷积核。下面模型用来解决一个分类问题。
相关文章推荐
- 卷积神经网络(CNN)应用于自然语言处理(NLP)
- CNN之于CV和NLP
- SPP-Net 是怎么让 CNN 实现输入任意尺寸图像的?
- [NLP自然语言处理]计算熵和KL距离,java实现汉字和英文单词的识别,UTF8变长字符读取
- 【转载】【JAVA自然语言处理NLP工具包】
- 自然语言处理(nlp)的主要范畴
- NLP(自然语言处理),我做下去的原则
- NLP系列(1)_从破译外星人文字浅谈自然语言处理基础
- 自然语言处理(nlp)的流程图
- 初学者如何查阅自然语言处理(NLP)领域学术资料
- 国内外自然语言处理(NLP)研究组
- 自然语言处理NLP——情感分析(Sentiment Analysis)简述
- 自然语言处理术语 NLP术语
- 自然语言处理(NLP)网上资源整理
- 自然语言处理的CNN模型中几种常见的池化方法
- 自然语言处理技术(NLP)在推荐系统中的应用
- 对自然语言处理nlp的一点感想
- 自然语言处理怎么最快入门?
- 自然语言处理(NLP)资源
- 【NLP】十分钟快览自然语言处理学习总结