为文本摘要网络Pointer-Generator Networks制作中文复述训练数据

这里首先向大家推荐一篇论文https://arxiv.org/abs/1704.04368。这篇论文介绍了一个文本摘要网络,具体是怎样的,这里不作详细介绍。向大家推荐知乎上一篇介绍它的文章https://zhuanlan.zhihu.com/p/27272224,其余请自行了解阅读论文。

下面是pointer-generator的开源项目地址:https://github.com/abisee/pointer-generator。我们现在要用它做中文复述的工作,那么首先来看一下它是如何处理英文文本摘要的。

Github网页上给了测试集输出结果,我们拿出第一篇看下效果:

这是文章原文(article):

washington ( cnn ) president barack obama says he is `` absolutely committed to making sure '' israel maintains
 a military advantage over iran . his comments to the new york times , published on sunday , come amid 
criticism from israeli prime minister benjamin netanyahu of the deal that the united states and five other world
 powers struck with iran . tehran agreed to halt the country 's nuclear ambitions , and in exchange , western 
powers would drop sanctions that have hurt the iran 's economy . obama said he understands and respects 
netanyahu 's stance that israel is particularly vulnerable and does n't `` have the luxury of testing these 
propositions '' in the deal . `` but what i would say to them is that not only am i absolutely committed to making
 sure they maintain their qualitative military edge , and that they can deter any potential future attacks , but 
what i 'm willing to do is to make the kinds of commitments that would give everybody in the neighborhood ,
 including iran , a clarity that if israel were to be attacked by any state , that we would stand by them , '' obama 
said . that , he said , should be `` sufficient to take advantage of this once-in-a-lifetime opportunity to see 
whether or not we can at least take the nuclear issue off the table , '' he said . the framework negotiators 
announced last week would see iran reduce its centrifuges from
  • 3
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 60
    评论
对于 form-generator 添加动态数据,你可以通过以下步骤来实现: 1. 首先,在 form-generator 的配置项中,添加一个属性来存储动态数据。例如,你可以在 data 对象中定义一个属性,比如 `dynamicData`。 2. 在需要加载动态数据的地方,通过 API 请求或其他方式获取数据,并将数据赋值给 `dynamicData`。 3. 在 form-generator 的配置项中,使用 `dynamicData` 来动态生成表单的选项或其他相关内容。 4. 如果需要在表单中提交动态数据,你可以在提交表单时,将 `dynamicData` 的值一同提交到后端进行处理。 下面是一个示例代码: ```vue <template> <form-generator :form-config="config" @submit="submitForm"></form-generator> </template> <script> export default { data() { return { dynamicData: [], config: { fields: [ { type: 'select', label: '动态选项', model: 'dynamicField', options: 'dynamicData', }, ], }, }; }, mounted() { // 通过 API 请求获取动态数据 // 并将数据赋值给 dynamicData this.dynamicData = ['Option 1', 'Option 2', 'Option 3']; }, methods: { submitForm(formData) { // 处理表单提交逻辑,包括动态数据的处理 console.log('Form data:', formData); }, }, }; </script> ``` 在上面的示例中,我们通过在 `data` 中定义 `dynamicData` 属性来存储动态数据。在 `mounted` 钩子函数中,我们可以通过 API 请求或其他方式获取数据并将其赋值给 `dynamicData`。然后,在 form-generator 的配置项中,我们使用 `dynamicData` 来动态生成表单的选项。 请根据你的具体需求来调整代码,并确保将动态数据与 form-generator 配置项正确关联。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 60
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值