APP下载

变体上下文窗口下的词向量准确性研究

2019-04-04胡正杨志勇

现代电子技术 2019年6期
关键词:深度学习

胡正 杨志勇

关键词: 词向量; 词嵌入; 上下文窗口; 自然语言处理; 神经网络; 深度学习

中图分类号: TN912.34?34; TP391.1             文献标识码: A                  文章编号: 1004?373X(2019)06?0146?03

Abstract: The word vector accuracy affects the operation of natural language processing tasks considerably. Word vectors are generated by the means of word embedding. In word embedding methods, the target words and their contexts are treated as inputs of the training. As a result, context determination has an important influence on word embedding. Therefore, the influence of variant context windows on word embedding accuracy is studied by using the word2vec word embedding method in this paper. A series of experiments were carried out according to the context windows with variant widths, offsets and weights. The experimental results show that, the variations of the context windows do not have a significant effect on the overall accuracy of training results, but have a significant effect on various specific words, so it is concluded that quite many words have their own demands in suitability of context windows, so it is difficult for a unified context window to implement the optimal training for all words.

Keywords: word vector; word embedding; context window; natural language processing; neural network; deep learning

0  引  言

近年来,深度学习在自然语言处理领域取得了诸多进展。在这些自然语言处理任务中,都将词向量作为其基础。词嵌入(Word Embedding)是一类语言建模技术,通过词嵌入可将词汇表中的单词和短语映射到n维词向量上(维度一般远小于词汇表)。2000年Bengio等人采用词嵌入并结合机器学习取得了较为突出的研究成果[1]。将词向量作为输入,可以很好地实现语法分析[2]、语义分析[3]、命名实体识别[4]等任务。词嵌入的实现方法有若干种,包括用神经网络产生[5?6]、对词共生矩阵降维[7?9]、通过概率模型计算[10]以及显式上下文表征[11]等。其共同点都是依据目标单词与上下文单词的出现概率或次数来构建词向量的。

其中word2vec是目前被广泛应用的基于神经网络的词嵌入方法,其特点是借由神经网络隐含层来发现数据特征,即产生词向量各个维度中的数据,这是一种在非监督学习中常用的特征取得方式。word2vec包含两个可选算法:Skip?gram和CBOW[5,12],所得到的詞向量不仅可以表征单词之间的相似性,亦能表征单词对之间的关系、对应关系[5]。如“man,woman”和“king,queen”,其词向量的关系可表示为:[Vecking-Vecman≈Vecqueen-Vecwoman,]即进行[Vecking-Vecman+Vecwoman]的词向量运算后,其结果最为接近的词向量是[Vecqueen]。

这种向量运算(称其为类比运算)可以在单词的类比关系、对应关系上得到很好的验证[13],一般来说其结果的正确率[11,14]可以达到40%~60%。类比运算是否正确体现了词向量表征语义是否准确。……

登录APP查看全文

猜你喜欢

深度学习
从合坐走向合学:浅议新学习模式的构建
面向大数据远程开放实验平台构建研究
基于自动智能分类器的图书馆乱架图书检测
搭建深度学习的三级阶梯
有体验的学习才是有意义的学习
电子商务中基于深度学习的虚假交易识别研究
利用网络技术促进学生深度学习的几大策略
MOOC与翻转课堂融合的深度学习场域建构
大数据技术在反恐怖主义中的应用展望
深度学习算法应用于岩石图像处理的可行性研究