老师要求看看Moses里都有什么参数,调整了参数又会对翻译结果有什么影响,先将找到的参数列出来

首先是权重:

[weight]
WordPenalty0=
LM=
Distortion0=
PhraseDictionaryMemory0=

调整方法是可以通过moses.ini手动调(其实我觉得挺好。。。),或者用命令,在另一篇博文里有(过一段摘过来)

-----------------------------------

为了加速翻译的话可以Tuning for Speed,方法有减少搜索空间(可能会导致不可能寻找到最优翻译解)

为了减少搜索空间,可以减少每个短语的翻译选项,通过限制Translation Table Size   ,命令 -ttable-limit 0\1 </> 已经废弃,无法使用 ,

 % echo 'das ist ein kleines haus' | moses -f phrase-model/moses.ini  -v 

想要使用的话,需要在moses.ini里注明 table-limit = ? 例如:

---------------------------------------------

[feature]
KENLM name=LM factor=0 order=3 num-features=1 path=lm/europarl.srilm.gz
Distortion
WordPenalty
UnknownWordPenalty
PhraseDictionaryMemory input-factor=0 output-factor=0 path=phrase-model/phrase-table num-features=1 table-limit=10

而且感动的是,这个方法是Hieu亲自回复给我的,流下泪水,恨不得投身于机器翻译事业创造价值。

--------------------------------------------------------------------------------

也可以减少Hypothesis Stack Size的大小,利用 -s

-s 可以改变Hypothesis Stack Size的大小,默认为1000

最后是-beam-threshold (b): threshold for threshold pruning

可以用 -b 0调节

最后的最后还有一个:

Limit on Distortion (Reordering)

The basic reordering model implemented in the decoder is fairly weak. Reordering cost is measured by the number of words skipped when foreign phrases are picked out of order.

Total reordering cost is computed by D(e,f) = - Σi (d_i) where d for each phrase i is defined as d = abs( last word position of previously translated phrase + 1 - first word position of newly translated phrase ).

This is illustrated by the following graph:

This reordering model is suitable for local reorderings: they are discouraged, but may occur with sufficient support from the language model. But large-scale reorderings are often arbitrary and effect translation performance negatively.

By limiting reordering, we can not only speed up the decoder, often translation performance is increased. Reordering can be limited to a maximum number of words skipped (maximum d) with the switch -distortion-limit, or short -dl.

Setting this parameter to 0 means monotone translation (no reordering). If you want to allow unlimited reordering, use the value -1.

Moses 里的参数(未完成)的更多相关文章

  1. groovy闭包科里化参数

    科里化闭包:带有预先绑定形参的闭包.在预先绑定一个形参之后,调用闭包时就不必为这个形参提供实参了.有助于去掉方法调用中的冗余重复. 使用curry方法科里化任意多个参数 使用rcurry方法科里化后面 ...

  2. ASP.NET MVC WebApi 返回数据类型序列化控制(json,xml) 用javascript在客户端删除某一个cookie键值对 input点击链接另一个页面,各种操作。 C# 往线程里传参数的方法总结 TCP/IP 协议 用C#+Selenium+ChromeDriver 生成我的咕咚跑步路线地图 (转)值得学习百度开源70+项目

    ASP.NET MVC WebApi 返回数据类型序列化控制(json,xml)   我们都知道在使用WebApi的时候Controller会自动将Action的返回值自动进行各种序列化处理(序列化为 ...

  3. jquery绑定事件时如何向事件函数里传参数

    jquery绑定事件时如何向事件函数里传参数 jquery绑定事件时如何向事件函数里传参数 举例子说明: 步骤1: var button=$('<button type="button ...

  4. 关于在header里增加参数的方式

    在使用一个API的时候,文档里写的返回值类型是json,可是试了下返回的明明是xml,还小小的鄙视了一把. 可是解析xml,好麻烦的.最好是json可以直接decode . 意外看到文档下面有一句 J ...

  5. nginx 默认会把header里的参数去掉下划线

    做token验证的时候遇到问题:在本地可以获取前端header传的参数,但是部署到服务器获取的就是null(服务器地址用nginx做了代理) 原因: nginx代理默认会把header的参数的 &qu ...

  6. jquery的一个小扩展,读取URL里的参数

    /* *扩展jquery的功能: *读取url中参数的功能,方法的参数是要获取的URL里键; *使用前要先导入jquery.js文件. * */ (function ($) { $.getUrlPar ...

  7. 使用js获取浏览器地址栏里的参数

    用JS获取地址栏参数的方法(超级简单) 方法一:采用正则表达式获取地址栏参数:( 强烈推荐,既实用又方便!) function GetQueryString(name) { var reg = new ...

  8. jsp页面,使用Struts2标签,传递和获取Action类里的参数,注意事项。<s:a action><s:iterator><s:param>ognl表达式

    在编写SSH2项目的时候,除了使用<s:form>表单标签向Action类跳转并传递参数之外,很更多时候还需要用到<s:a action="XXX.action" ...

  9. ORACLE连接字符串里每个参数的具体意思

    1.数据库名(db_name):数据库名是存储在控制文件中的数据库的名称.它代表的是数据库也就是所有构成数据库的物理文件的总称.要修改这个名称,只要重建控制文件就行了.2.实例名:实例名指的是用于响应 ...

随机推荐

  1. Indian Scientists Design Device to Collect Solar Energy 印度科学家设计太阳能收集设备

      Indian scientists have designed a new device they hope will solve one of the biggest problems with ...

  2. Crystal Report 处理当前系统时间

    Changed the print date format to HH/yy/MM/mm/SS/dd  (For Example:2014/01/23 16:30:45= 161430014523) ...

  3. CI 自动提交表单

    //coontrol $this->load->view ( '/' . $this->index_lang ['FOLDER'] . '/eprepag_form.php', $p ...

  4. Ubuntu12.04安装java6

    按照android官方文档 http://source.android.com 下载编译android源代码,jdk安装失败,尝试一下方法成功(2013-11-20) 下面我就把在Ubuntu12.0 ...

  5. CSS常用布局整理(二)

    1-2-1单列变宽布局 side列定宽300px,content列变宽,尺寸是100%-300px.核心的问题就是浮动列的宽度应该等于“100% - 300px”,而CSS显然不支持这种带有减法运算的 ...

  6. node.js 快速体验

    对于一个从事js的工作人员,怎么能不知道node.js呢! 一.安装node.js 在window上安装,http://nodejs.org上的windows installer 下载安装,在安装过程 ...

  7. leetcode 9

    判断一个数是否为回文数,不利用额外的空间. 思路:将数反转后进行比较. 注意:反转之后数越界的判断,若越界,则不是回文数:负数不是回文数: 代码如下: class Solution { public: ...

  8. Unieap3.5-前台js判断表单必录

    //用户信息字段检查 var custFrm=unieap.byId('custFrm'); var isValid=custFrm.validate(true); if(!isValid){ ret ...

  9. 二、搭建struts2的开发环境

    二.搭建struts2的开发环境 下载地址:http://struts.apache.org 解压后的目录结构: apps:框架本身提供一些案例(学习) docs:框架本身提供的文档(指南和API). ...

  10. 1.Mariadb(mysql)基本操作

    1.:安装与初始化 1)安装 yum install -y mariadb\* 2)初始化 systemctl restart mariadb systemctl enable  mariadb my ...