NeuralTemplateGen-代码功能梳理

先说一下这个模型是干嘛的~

简介

基于Encoder-Decoder方式的文本生成模型已成为NLG的主流,但是它存在诸如 (1)不可解释、(2)很难进行讲点或内容的选择这些缺点。

本文主要是对decoder进行了改进,使用隐半马尔科夫HSMM模型作为解码器,这种模型可以学习得到模板,这些模板是可控的而且也具有解释性。

该模型可以自动完成 讲点选择及排序文本模板生成模板槽位填充 几个过程,最终得到一句完整的话。

从四个方面来介绍代码的功能。

一、数据及数据准备

1.1 开源数据集E2E

E2E是一个最大的餐饮领域的开源数据集。常用用于NM。就是一个连词成句的过程。

  • mr: (textual meaning representation)就是“词”,类似属性名及属性值
  • ref:生成的可阅读的句子

一个mr的例子

name[The Vaults], 
eatType[pub], 
priceRange[more than £30], 
customer rating[5 out of 5], 
near[Café Adriatic]

对应生成的句子

Near Café Adriatic is a five star rated, high priced pub called The Vaults.
The Vaults is a 5 stars pub with middle prices in Café Adriatic.
The Vaults Pub is close to Café Adriatic, it is five star rated and it has high prices
The Vaults is near Café Adriatic, it's a pub that ranges more than 30 and customers rate it 5 out of 5.
The Vaults is a five star, expensive public house situated close to Café Adriatic
There is an expe
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值