Skip to content

Commit

Permalink
对话系统
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Sep 9, 2020
1 parent 43d5fe2 commit 300dc07
Show file tree
Hide file tree
Showing 23 changed files with 545 additions and 24 deletions.
7 changes: 0 additions & 7 deletions DialogueSystem_study/DSTC.md

This file was deleted.

34 changes: 34 additions & 0 deletions DialogueSystem_study/DSTC/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 【关于 状态追踪(DST)】那些你不知道的事

> 笔者:杨夕
>
> 项目地址:https://github.com/km1994/nlp_paper_study
>
> 个人介绍:大佬们好,我叫杨夕,该项目主要是本人在研读顶会论文和复现经典论文过程中,所见、所思、所想、所闻,可能存在一些理解错误,希望大佬们多多指正。
>
> 致谢:感谢 [cstghitpku](https://www.zhihu.com/people/cangshengtage) 大佬 所写的文章 【一文看懂任务型对话系统中的状态追踪(DST)】(https://zhuanlan.zhihu.com/p/51476362),在学习该 文章时,边学习边总结重要信息。如有侵权,请通知本人删除博文!
## 一、目录

- [【关于 状态追踪(DST)】那些你不知道的事](#关于-状态追踪dst那些你不知道的事)
- [一、目录](#一目录)
- [二、内容](#二内容)
- [什么是 DST中的状态建模和实例说明 ?](#什么是-dst中的状态建模和实例说明-)
- [参考](#参考)



## 二、内容

### 什么是 DST中的状态建模和实例说明 ?

何谓对话状态?其实状态St是一种包含0时刻到t时刻的对话历史、用户目标、意图和槽值对的数据结构,这种数据结构可以供DPL阶段学习策略(比如定机票时,是询问出发地还是确定订单?)并完成NLG阶段的回复。






## 参考

1. [一文看懂任务型对话系统中的状态追踪(DST)](https://zhuanlan.zhihu.com/p/51476362)
Binary file added DialogueSystem_study/NLG/img/20200906153603.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DialogueSystem_study/NLG/img/20200906154001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DialogueSystem_study/NLG/img/20200906154551.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions DialogueSystem_study/NLG/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# 【关于 NLG】那些你不知道的事

> 笔者:杨夕
>
> 项目地址:https://github.com/km1994/nlp_paper_study
>
> 个人介绍:大佬们好,我叫杨夕,该项目主要是本人在研读顶会论文和复现经典论文过程中,所见、所思、所想、所闻,可能存在一些理解错误,希望大佬们多多指正。
>
> 致谢:感谢 [cstghitpku](https://www.zhihu.com/people/cangshengtage) 大佬 所写的文章 【总结|对话系统中的自然语言生成技术(NLG)】(https://zhuanlan.zhihu.com/p/49197552),在学习该 文章时,边学习边总结重要信息。如有侵权,请通知本人删除博文!
## 一、目录


- [【关于 上下文LU】那些你不知道的事](#关于-上下文lu那些你不知道的事)
- [一、目录](#一目录)
- [二、内容](#二内容)
- [什么是上下文LU?](#什么是上下文lu)

- [四、参考](#四参考)

## 二、内容

### 什么是 NLG ?

自然语言生成(NLG)是一种语言技术,其主要目的是构建能够“写”的软件系统的技术,即能够用汉语、英语等其他人类语言生成解释、摘要、叙述等。具体来说就是计算机的“编写语言”,它将结构化数据转换为文本,以人类语言表达。即能够根据一些关键信息及其在机器内部的表达形式,经过一个规划过程,来自动生成一段高质量的自然语言文本。NLG用于Email、手机短信,它可以为您自动创建答复;NLG用于图标说明时,可以根据公司数据自动生成图标说明。前段时间在一个有趣的用例中,美联社利用自然语言生成成功的从公司收益报表中生成了报告。这意味着他们不再需要人类消耗他们的时间和精力去解决这些问题。更重要的是,NLG一旦被完美设置就会自动生成数以千计的报告。

### NLG 的应用领域?

- 应用领域
- 摘要生成
- VQA(视觉问答)
- 翻译
- 写诗词
- 写作文
- 写新闻
- NBA等赛事报道
- 对话系统

### 对话系统划分?

- 划分
- 闲聊型
- 任务型
- 知识问答型
- 推荐型

### 不同对话系统中 NLG 的特点?

- 闲聊型对话中的NLG:**根据上下文进行意图识别、情感分析等,然后生成开放性回复**
- 任务型对话中的NLG:在NLU(领域分类和意图识别、槽填充)、DST、DPL的基础上,根据学习到的策略来生成对话回复,一般回复包括澄清需求、引导用户、询问、确认、对话结束语等。
- 知识问答型对话中的NLG:根据问句类型识别与分类、信息检索或文本匹配而生成用户需要的知识(知识、实体、片段等),这类回复相比单纯的信息检索一般用户体验会更好,因为一般信息检索还需要用户根据搜索结果自己找所需信息。
- 推荐型对话系统中的NLG:根据用户的爱好来进行兴趣匹配以及候选推荐内容排序,然后生成给用户推荐的内容。

### NLG 发展史?

![](img/20200906153603.png)

### NLG 有哪些技术?

### 传统方法【基于模版的NLG、基于树的NLG】

- 基于模版的NLG
- 介绍: 定义规则和模板,用于映射 自然语言;
- 问题:需要定义 大量 规则 和 模板

![](img/20200906154001.png)

### 深度学习方法


### 方法对比

![](img/20200906154551.png)


## 四、参考

1. [总结|对话系统中的自然语言生成技术(NLG)](https://zhuanlan.zhihu.com/p/49197552)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 84 additions & 4 deletions DialogueSystem_study/contextLU/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,22 @@
## 一、目录

1. [什么是上下文LU?](#什么是上下文LU?)
2. [什么是结构化LU?](#什么是结构化LU?)

- [【关于 上下文LU】那些你不知道的事](#关于-上下文lu那些你不知道的事)
- [一、目录](#一目录)
- [二、内容](#二内容)
- [什么是上下文LU?](#什么是上下文lu)
- [上下文LU 的发展史?](#上下文lu-的发展史)
- [上下文LU 方法介绍](#上下文lu-方法介绍)
- [Context Sensitive Spoken Language Understanding using Role Dependent LSTM layers(Hori et al, 2015)](#context-sensitive-spoken-language-understanding-using-role-dependent-lstm-layershori-et-al-2015)
- [End-to-End Memory Networks with Knowledge Carryover for Multi-Turn Spoken Language Understanding(Chen et al., 2016)](#end-to-end-memory-networks-with-knowledge-carryover-for-multi-turn-spoken-language-understandingchen-et-al-2016)
- [Sequential Dialogue Context Modeling for Spoken Language Understanding(Bapna et.al., SIGDIAL 2017)](#sequential-dialogue-context-modeling-for-spoken-language-understandingbapna-etal-sigdial-2017)
- [什么是结构化LU?](#什么是结构化lu)
- [结构化LU 的发展史?](#结构化lu-的发展史)
- [结构化LU 方法介绍](#结构化lu-方法介绍)
- [Knowledge as a Teacher: Knowledge-Guided Structural Attention Networks(Chen et al., 2016)](#knowledge-as-a-teacher-knowledge-guided-structural-attention-networkschen-et-al-2016)
- [SLU各方法的对比](#slu各方法的对比)
- [四、参考](#四参考)

## 二、内容

Expand All @@ -27,15 +40,82 @@

![](img/20200904222146.png)


### 上下文LU 的发展史?

![](img/20200904213257.png)

### 上下文LU 方法介绍

#### [Context Sensitive Spoken Language Understanding using Role Dependent LSTM layers(Hori et al, 2015)](https://www.merl.com/publications/docs/TR2015-134.pdf)

- 介绍:
- 基于Seq2Seq模型对上下文建模,一次输入一个词,每句结束时输出标签;
- 具有对话者角色相关的LSTM层,并使用角色状态控制门来决定角色是不是active,而且角色状态随时间而线性传播,agent和client的角色也被加以区分
- 优点:对上下文比较敏感,能解决多轮对话的歧义问题

![](img/20200906144532.png)

#### [End-to-End Memory Networks with Knowledge Carryover for Multi-Turn Spoken Language Understanding(Chen et al., 2016)](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/06/IS16_ContextualSLU.pdf)

- 类型:
- 基于端到端的记忆网络携带Knowledge来做多轮对话中的上下文理解,将RNN和Memory Networks结合起来应用于SLU模块;
- 思路:
- 在作slot tagging时加入上下文知识, 然后以一种潜在的方式进行对话状态的追踪;
- 思路:
- 记忆表示:为了存储前面对话轮中的知识,通过RNN将前面对话轮中的每个话语嵌入到连续的空间中,将每个话语转换成一个记忆向量;
- 知识注意力分布:在嵌入空间中,通过取内积然后softmax来计算当前输入和每个记忆向量间的匹配,该结果可以被看作是为了理解当前输入而建模知识传递的注意力分布;
- 知识编码表示:为了对来自历史的知识进行编码,历史向量是对由注意力分布加权的记忆嵌入的总和;
- 序列标注:提供携带的知识来提高序列标注的效果。

![](img/20200906144949.png)

#### [Sequential Dialogue Context Modeling for Spoken Language Understanding(Bapna et.al., SIGDIAL 2017)](https://www.aclweb.org/anthology/W17-5514/)

- 介绍:
- 使用RNN探索新的建模对话上下文的方法,提出了序列对话编码网络,它允许按时间顺序对来自对话历史的上下文编码。之前轮和当前轮的encodings被输入一个共享所有存储器权重的前馈网络。并将序列对话编码网络的性能与仅使用先前的上下文的模型、在memory网络中编码失去对话顺序的上下文的模型进行比较;
- 优点:在多域对话数据集上的实验表明,序列对话编码网络能减少歧义。

![](img/20200906145823.png)

![](img/20200906145823.png)

![](img/20200906145850.png)

![](img/20200906145915.png)

![](img/20200906150004.png)

![](img/20200906150015.png)


### 什么是结构化LU?


### 结构化LU 的发展史?

![](img/20200904213405.png)

### 结构化LU 方法介绍

#### [Knowledge as a Teacher: Knowledge-Guided Structural Attention Networks(Chen et al., 2016)](https://arxiv.org/abs/1609.03286)

- 介绍:提出了K-SAN:用先验知识当作引导,句子结构知识当作menory来存储。这是由先验知识引导的结构化注意力网络,其实就是RNN+attention+先验知识,但是跟RNN不同的是:该模型充分利用自然语言丰富的、结构化的信息而不再是线性扁平链。
- 优势
- 可从少量数据中获取重要的子结构,增强模型的泛化能力;
- 针对给定句子,可自动找出对其语义标签至关重要的显著子结构,从而缓解测试集中的unseen data,进一步提升NLU的效果。
- 实验结果:并在ATIS数据上表明 K-SAN 可以使用注意力机制有效地从子结构中提取出显著的知识,达到SOTA的效果。

![](img/20200906150548.png)

![](img/20200906150641.png)

![](img/20200906150716.png)

### SLU各方法的对比

![](img/20200906150843.png)


## 四、参考

1. ![总结|对话系统中的口语理解技术(SLU)(三)](https://zhuanlan.zhihu.com/p/50704090)
1. [总结|对话系统中的口语理解技术(SLU)(三)](https://zhuanlan.zhihu.com/p/50704090)
Loading

0 comments on commit 300dc07

Please sign in to comment.