爱丁堡大学神经机器翻译系统 nematus 使用笔记

本文是关于爱丁堡大学的Nematus神经机器翻译系统的使用笔记,详细介绍了从安装依赖到数据处理、模型训练、翻译及性能评估的全过程。在实验中遇到了多个source dictionaries、数据预处理问题、模型下载与运行等难点,并提供了相应的解决办法。
摘要由CSDN通过智能技术生成

*博客地址:http://blog.csdn.net/wangxinginnlp/article/details/64921476

*由于没有step by step instruction,被代码搞晕了些,写个说明文档以备后用。[要注意,红色字都是坑]


代码准备:

nematus https://github.com/rsennrich/nematus

subword-nmt  https://github.com/rsennrich/subword-nmt


数据准备:

nematus中自带了1000句对英德双语语料(En-De)


实验环境:

nematus里面写了需要配置:

Nematus requires the following packages:

  • Python >= 2.7
  • numpy
  • Theano >= 0.7 (and its dependencies).

we recommend executing the following command in a Python virtual environment: pip install numpy numexpr cython tables theano

the following packages are optional, but highly recommended

  • CUDA >= 7 (only GPU training is sufficiently fast)
  • cuDNN >= 4 (speeds up training substantially)

you can run Nematus locally. To install it, execute python setup.py install


实验疑点:

1.  为什么有多个source dictionaries?支持Linguistic Input Features,每个Feauture一个dictionary?

nematus支持传入多个source dictionaries

nmt.py中接收source dictionary代码:

train = TextIterator(datasets[0], datasets[1],
                         dictionaries[:-1], dictionaries[-1],

  ....)

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值