1.人类语言的声音:语音和语音学
- 语音是声音流–毫无争议的“物理”
- 语音学假设一小部分或几组独特的类别单元:音素或独特特征
- 也许是普遍的类型学,但特定语言的实现
- 类别感知的最佳证据来自语音学
- 音素内差异缩小;音素间放大

形态:词的一部分
- 传统上,我们把语素作为最小的语义单元
- [[un [[fortun(e)] ROOT ate] STEM] STEM ly] WORD
- 深度学习:形态学研究很少;
一次尝试递归神经网络是(Luong,Socher,&Manning 2013)

<一种处理较大词汇量的可能方法-最看不见的单词是新的形态形式(或数字)>
形态学
- 一个简单的替代方法是使用字符n-gram
- Wickelphones(Rumelhart&McClelland 1986)
- 微软的DSSM(Huang,He,Gao,Deng,Acero和Hect 2013)
- 有关使用卷积层的想法
- 可以更轻松地提供语素的许多好处吗?

书写系统中的单词
写作系统在表达单词的方式上有所不同-或不
- 没有分词 例:美国关岛国际机场及其办公室均接获
- 单词(主要)分为:This is a sentence with words
-
批评家?
- 分开的 Je vous ai apporté des bonbons
- 已加入 ف+ قال+ نا+ ھا = فقلناھا = so+said+we+it
-
化合物?
- 分开的 life insurance company employee
- 已加入 Lebensversicherungsgesellschaftsangestellter
-
单词级别下的模型
- 需要处理 large,openvocabulary
-
丰富的形态:nejneobhospodařovávatelnějšímu
(“to the worst farmable one”) -
音译:Christopher Kryštof
-
非正式拼写:
-

字符级别下的模型
1.单词嵌入可以由字符嵌入组成
- 为未知单词生成嵌入
- 相似的拼写共享相似的嵌入
- 解决OOV问题
2.可以将连接的语言当作字符来处理两种方法都已证明非常成功!
- 令人惊讶的是-传统上,音素/字母不是语义单位-但是DL模型组成了组
文字下方:书写系统
大多数深度学习NLP的工作都是从书面形式的语言开始的-它是易于处理的发现数据
但是人类语言写作系统不是一回事!
音位(也许有字) | jiyawu ngabulu | Wambaya |
僵化音素 | thorough failure | English |
音节/摩拉 | ᑐᖑᔪᐊᖓᔪᖅ | Inuktitut |
表意文字(音节符号) | 去年太空船二号坠毁 | Chinese |
结合以上 | インド洋の島 | Japanese |
2. 纯字符级模型
- Wesawone很好的例子,用于句子分类的字符级模型
- 非常深的卷积网络用于文本分类
- Conneau,Schwenk,Lecun,Barrault,EACL 2017
- 通过深度卷积堆栈获得强大结果
纯字符级NMT模型
-最初表现不理想•(Vilar等,2007; Neubig等,2013)
- 仅解码器
- (钟俊英,赵庆gh,Yoshua Bengio。arXiv
2016)。 - 有希望的结果
- (Wang Ling,Isabel Trancoso,Chris Dyer,Alan Black,arXiv 2015)
- (Thang Luong,Christopher Manning,ACL 2016)
- (Marta R.Costa-Jussà,JoséA. R. Fonollosa,ACL 2016)
英语-捷克语WMT 2015成绩
- LuongandManning测试了基准基线纯字符级seq2seq(LSTM)NMT系统
- 针对关键字级别的基准进行了有效处理
- Butitwasssllooooww
- 3个星期的训练...在运行时不是那么快

英语-捷克语WMT 2015示例


无需显式细分的全字符级神经机器翻译
Jason Lee,Kyunghyun Cho,Thomas Hoffmann。 2017.编码器如下; 解码器是字符级GRU

在LSTM seq2seq模型中具有深度的更强字符结果
回顾基于字符的神经机器翻译的能力和压缩。 2018.Cherry,Foster,Bapna,Firat,Macherey,Google AI

3. 子词模型:两种趋势
- 与词级模型相同的体系结构:
- 但是使用较小的单位:“单词”
- [Sennrich,Haddow,Birch,ACL’16a],[Chung,Cho,Bengio,ACL’16]。
- 混合架构:
- 主模型有文字; 角色的其他东西
- [Costa-Jussà&Fonollosa,ACL’16],[Luong&Manning,ACL’16]。
字节对编码
- 最初是压缩算法:
- 最频繁的字节对一个新字节。

Rico Sennrich,Barry Haddow和Alexandra Birch。 具有子词单位的稀有词的神经机器翻译。 ACL 2016。
https://arxiv.org/abs/1508.07909 https://github.com/rsennrich/subword-nmt https://github.com/EdinburghNLP/nematus
- 分词算法:
- 虽然是自底向上的聚类
- 以数据中所有(Unicode)字符的字母组合词表开头
- 最常见的ngram对一个新的ngram
- 分词算法:
- 从字符词汇开始
-
最常见的ngram对一个新的ngram
↓
↓

↓

↓

- 达到目标词汇量大小并在您到达时停止
- 确定性最长的单词分段
- 使用某些先前的标记器(通常是用于MT的Moses标记器)识别的单词进行细分
- 自动决定vocabforsystem
- 不再以传统方式强烈“用词”
https://github.com/rsennrich/nematus
- 不再以传统方式强烈“用词”
字词/句子模型
- GoogleNMT(GNMT)使用以下版本
- V1:字词模型
- V2:句子模型
- Ratherthancharn-gramcount,使用贪婪近似来最大化语言模型的对数可能性以选择片段
- 添加最大程度减少困惑的n-gram
- 单词模型对内单词进行标记
- 句子模型来自原始文本
- 空格保留为特殊标记(_)并正常分组
- 您可以通过连接片段并将它们重新编码为空格来结束事物
- https://github.com/google/sentencepiece
- https://arxiv.org/pdf/1804.10959.pdf
- BERT使用字词模型的变体
- (相对)常用词在词汇表中:
- 1910年代,费尔法克斯
- 其他单词是由单词构成的:
- hypatia = h ## yp ## ati ## a
如果您以其他方式使用BERT
基于模型,您必须处理
- hypatia = h ## yp ## ati ## a
4. 字符级以构建词级学习词级表示形式
语音标记(Dos Santos和Zadrozny 2014)
- 卷积字符以生成单词嵌入
- 修复了用于PoS标记的词嵌入窗口

基于字符的LSTM构建单词表示

基于字符的LSTM

技术方法

字符感知神经语言模型
Yoon Kim,Yacine Jernite,David Sontag,Alexander M.Rush,2015年
更为复杂/复杂的方法
- 推导适用于多种语言的强大而强大的语言模型。
- 编码子词相关性:事件,事件,事件...
- 解决现有模型的稀有字问题。
- 以更少的参数获得可比的表现力。
卷积层
- 在字符级输入上进行卷积。
- 随时间变化的最大池化(有效地选择n-gram)。

公路网(Srivastava et al.2015)
- 模拟n-gram交互。
- 在保留原始信息的同时进行转换。
- 功能类似于LSTM存储单元。

长短期记忆网络

- 分层Softmax,用于处理大量输出词汇。
- 通过截断的反向传播进行训练。
定量结果

定性见解


外卖
- 论文质疑使用词嵌入作为神经语言建模输入的必要性。
- 字符上方的CNN +高速公路网络可以提取丰富的语义和结构信息。
- 关键思想:您可以构成“构建基块”以获得细微而强大的模型!
混合NMT
- 两全其美的架构:
- 主要在单词级别进行翻译
- 仅在需要时进入角色级别
- 对复制机制进行了超过2种BLEU改进,以尝试填写稀有词

2级解码
- 单词级光束搜索

- 单词级光束搜索
- 字符级光束搜索<unk>

英语和捷克语的结果
- 训练WMT’15数据(1200万个句子对)
- newstest2015

样本英语-捷克语翻译


- Char-based:错误的名字翻译

-
Word-based:不正确的对齐
-
Char-based&hybrid:diagnózen的正确翻译
-
基于单词:身份复制失败

- hybrid:正确,11-year-old – jedenáctiletá
- 错误:Shani Bartová
5. 单词嵌入的字符

词嵌入和词形态的联合模型
(Cao and Rei 2016)
- 与w2v相同的目标,但使用字符
- 双向LSTM计算嵌入
- 模型尝试捕获形态
- 模型可以推断出词根
FastText embeddings
使用子词信息Bojanowski,Grave,Joulin和Mikolov丰富词向量。 公平。 2016。
https://arxiv.org/pdf/1607.04606.pdf
https://fasttext.cc
- 目标:高效的类似于word2vec的单词表示库,但更适合具有多种形态的稀有单词和语言
- w2v跳过语法模型的扩展,包含字符n-gram
- 用边界符号和整个单词表示的单词表示为charcharn-gram:
- where = <wh,whe,her,ere,re>,<where>
- 请注意,<her>或<her与她不同
- 前缀,后缀和整个单词都很特殊
- 请注意,<her>或<her与她不同
- 代表这些表示的词。
上下文分数中的单词为:-
- 细节:不是共享所有n-gram的表示,而是使用“哈希技巧”来固定向量个数
-
单词相似性数据集得分(相关性)

- 稀有词的差别收益

网友评论