<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>我爱自然语言处理 &#187; 翻译模型</title>
	<atom:link href="http://www.52nlp.cn/category/translation-model/feed" rel="self" type="application/rss+xml" />
	<link>http://www.52nlp.cn</link>
	<description>I Love Natural Language Processing</description>
	<lastBuildDate>Wed, 01 Feb 2012 01:50:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>ME for Machine Translation</title>
		<link>http://www.52nlp.cn/me-for-machine-translation</link>
		<comments>http://www.52nlp.cn/me-for-machine-translation#comments</comments>
		<pubDate>Sun, 10 Apr 2011 15:54:17 +0000</pubDate>
		<dc:creator>samever</dc:creator>
				<category><![CDATA[机器翻译]]></category>
		<category><![CDATA[翻译模型]]></category>
		<category><![CDATA[Franz Josef Och]]></category>
		<category><![CDATA[och]]></category>
		<category><![CDATA[统计机器翻译]]></category>

		<guid isPermaLink="false">http://www.52nlp.cn/?p=3903</guid>
		<description><![CDATA[利用周末时间细读了Och和Ney在02年ACL上发表的一篇关于Machine Translation的文章，做个笔记。 Discriminative training and maximum entropy models for statistical macine translation 1. ME 模型是在噪声信道模型的基础上改进而来的。 2. Source-Channel Model 被称为“Fundamental Equation of Statistical MT”，即，机器翻译的基本方程式。 3. 噪声信道模型存在的几个问题： （1）噪声信道模型中，当翻译模型和语言模型只有在语料上的实际值等于理论值的时候，翻译结果才能达到最优；如果有一种更好的能将LM和TM进行结合的方法，那么翻译效果会有很大的提升。 （2）噪声信道模型不能通过直接扩展可对MT产生帮助性作用的特征和信息来扩展统计MT 系统。 （3）噪声信道模型的翻译模型具有可对称性特点。p(f&#124;e)与p(e&#124;f)在模型中可产生相当的作用，都可以与语言模型一起在信道模型中产生作用。虽然在噪声信道理论框架中难以对这种现象进行分析解释，不过产生的翻译效果却极具有可比性。在实际的统计翻译中，可以通过比较其作用好坏，按需选择来使用。 ME Translation Model 由于噪声信道模型能够融入的信息较为有限，Och 等人提出了采用ME 来进行统计翻译的方法，这主要是由于ME 具有可将多种信息进行有效结合从而为翻译提供支撑的特点。ME 方法是对噪声信道模型的改进。在该理论中，可以将N个信息同时考虑在MT 的过程之中，每一个信息被视为一个特征（或者叫做特征函数function），每个特征对应一个参数a，翻译概率的计算就跟这些特征函数和参数有关。（详细计算公式见论文第3页） 实际上，噪声信道模型的MT方法是包含在ME 方法框架之内的，当特征1： &#8230; <a href="http://www.52nlp.cn/me-for-machine-translation">继续阅读 <span class="meta-nav">&#8594;</span></a>
相关文章:<ol>
<li><a href='http://www.52nlp.cn/the-issue-of-parallel-in-moses-model-training' rel='bookmark' title='Moses中模型训练的并行化问题'>Moses中模型训练的并行化问题</a></li>
<li><a href='http://www.52nlp.cn/statistical-machine-translation-classic-literature' rel='bookmark' title='统计机器翻译中的几篇经典文献'>统计机器翻译中的几篇经典文献</a></li>
<li><a href='http://www.52nlp.cn/the-foresight-of-smt-classic-brown90' rel='bookmark' title='SMT经典再回首之Brown90:远见卓识'>SMT经典再回首之Brown90:远见卓识</a></li>
<li><a href='http://www.52nlp.cn/one-problem-on-moses-training-scripts' rel='bookmark' title='Moses训练脚本的一个问题'>Moses训练脚本的一个问题</a></li>
<li><a href='http://www.52nlp.cn/statistical-machine-translation-heroe-franz-josef-och' rel='bookmark' title='统计机器翻译英雄谱一：Franz Josef Och'>统计机器翻译英雄谱一：Franz Josef Och</a></li>
<li><a href='http://www.52nlp.cn/about-acl-anthology-network' rel='bookmark' title='ACL Anthology 姊妹篇：ACL Anthology Network'>ACL Anthology 姊妹篇：ACL Anthology Network</a></li>
<li><a href='http://www.52nlp.cn/%e6%9b%bf%e5%af%bc%e5%b8%88%e6%8b%9b%e5%ad%a6%e7%94%9f-ph-d-research-assistant-in-machine-learning-and-nlp' rel='bookmark' title='招生：Ph.D research assistant in machine learning and NLP'>招生：Ph.D research assistant in machine learning and NLP</a></li>
<li><a href='http://www.52nlp.cn/statistical-machine-translation-tutorial-reading' rel='bookmark' title='统计机器翻译文献阅读指南'>统计机器翻译文献阅读指南</a></li>
<li><a href='http://www.52nlp.cn/natural-language-processing-and-computational-linguistics-books-summary-five-machine-translation' rel='bookmark' title='自然语言处理与计算语言学书籍汇总之五：机器翻译'>自然语言处理与计算语言学书籍汇总之五：机器翻译</a></li>
<li><a href='http://www.52nlp.cn/statistical-machine-translation-and-speech-recognition-of-smt-classic-brown90' rel='bookmark' title='SMT经典再回首之Brown90:统计机器翻译与语音识别'>SMT经典再回首之Brown90:统计机器翻译与语音识别</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>利用周末时间细读了Och和Ney在02年ACL上发表的一篇关于Machine Translation的文章，做个笔记。</p>
<p>Discriminative training and maximum entropy models for statistical macine translation</p>
<p>1. ME 模型是在噪声信道模型的基础上改进而来的。</p>
<p>2. Source-Channel Model 被称为“Fundamental Equation of Statistical MT”，即，机器翻译的基本方程式。</p>
<p>3. 噪声信道模型存在的几个问题：</p>
<p>（1）噪声信道模型中，当翻译模型和语言模型只有在语料上的实际值等于理论值的时候，翻译结果才能达到最优；如果有一种更好的能将LM和TM进行结合的方法，那么翻译效果会有很大的提升。</p>
<p>（2）噪声信道模型不能通过直接扩展可对MT产生帮助性作用的特征和信息来扩展统计MT 系统。</p>
<p>（3）噪声信道模型的翻译模型具有可对称性特点。p(f|e)与p(e|f)在模型中可产生相当的作用，都可以与语言模型一起在信道模型中产生作用。虽然在噪声信道理论框架中难以对这种现象进行分析解释，不过产生的翻译效果却极具有可比性。在实际的统计翻译中，可以通过比较其作用好坏，按需选择来使用。</p>
<p>ME Translation Model</p>
<p>由于噪声信道模型能够融入的信息较为有限，Och 等人提出了采用ME 来进行统计翻译的方法，这主要是由于ME 具有可将多种信息进行有效结合从而为翻译提供支撑的特点。ME 方法是对噪声信道模型的改进。在该理论中，可以将N个信息同时考虑在MT 的过程之中，每一个信息被视为一个特征（或者叫做特征函数function），每个特征对应一个参数a，翻译概率的计算就跟这些特征函数和参数有关。（详细计算公式见论文第3页）</p>
<p>实际上，噪声信道模型的MT方法是包含在ME 方法框架之内的，当特征1：</p>
<p>h1(e,f) = log p (e)</p>
<p>特征2：</p>
<p>h2(e,f) = log p (f|e)</p>
<p>并取参数a1=a2=1的时候，ME 表现出来的框架其实就是噪声信道。</p>
<p>Alignment Model and Maximum Approximation</p>
<p>另外，在翻译的过程中还有一个很重要的因子&#8212;&#8212;对齐。不管是噪声信道还是ME，在翻译过程中都需要计算源语言到目标语言的对齐，这个贯彻翻译概率计算过程的始末。</p>
<p>Och等在当年的系统中采用的是Alignment Templates的方法。即，只有源语言短语、目标语言短语的短语表，i.e.，短语表。</p>
<p>Training （a参数的训练）</p>
<p>文中采用的是GIS 算法（Darroch and Ratcliff，1972）。</p>
<p>相关文章:<ol>
<li><a href='http://www.52nlp.cn/the-issue-of-parallel-in-moses-model-training' rel='bookmark' title='Moses中模型训练的并行化问题'>Moses中模型训练的并行化问题</a></li>
<li><a href='http://www.52nlp.cn/statistical-machine-translation-classic-literature' rel='bookmark' title='统计机器翻译中的几篇经典文献'>统计机器翻译中的几篇经典文献</a></li>
<li><a href='http://www.52nlp.cn/the-foresight-of-smt-classic-brown90' rel='bookmark' title='SMT经典再回首之Brown90:远见卓识'>SMT经典再回首之Brown90:远见卓识</a></li>
<li><a href='http://www.52nlp.cn/one-problem-on-moses-training-scripts' rel='bookmark' title='Moses训练脚本的一个问题'>Moses训练脚本的一个问题</a></li>
<li><a href='http://www.52nlp.cn/statistical-machine-translation-heroe-franz-josef-och' rel='bookmark' title='统计机器翻译英雄谱一：Franz Josef Och'>统计机器翻译英雄谱一：Franz Josef Och</a></li>
<li><a href='http://www.52nlp.cn/about-acl-anthology-network' rel='bookmark' title='ACL Anthology 姊妹篇：ACL Anthology Network'>ACL Anthology 姊妹篇：ACL Anthology Network</a></li>
<li><a href='http://www.52nlp.cn/%e6%9b%bf%e5%af%bc%e5%b8%88%e6%8b%9b%e5%ad%a6%e7%94%9f-ph-d-research-assistant-in-machine-learning-and-nlp' rel='bookmark' title='招生：Ph.D research assistant in machine learning and NLP'>招生：Ph.D research assistant in machine learning and NLP</a></li>
<li><a href='http://www.52nlp.cn/statistical-machine-translation-tutorial-reading' rel='bookmark' title='统计机器翻译文献阅读指南'>统计机器翻译文献阅读指南</a></li>
<li><a href='http://www.52nlp.cn/natural-language-processing-and-computational-linguistics-books-summary-five-machine-translation' rel='bookmark' title='自然语言处理与计算语言学书籍汇总之五：机器翻译'>自然语言处理与计算语言学书籍汇总之五：机器翻译</a></li>
<li><a href='http://www.52nlp.cn/statistical-machine-translation-and-speech-recognition-of-smt-classic-brown90' rel='bookmark' title='SMT经典再回首之Brown90:统计机器翻译与语音识别'>SMT经典再回首之Brown90:统计机器翻译与语音识别</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.52nlp.cn/me-for-machine-translation/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Moses中模型训练的并行化问题</title>
		<link>http://www.52nlp.cn/the-issue-of-parallel-in-moses-model-training</link>
		<comments>http://www.52nlp.cn/the-issue-of-parallel-in-moses-model-training#comments</comments>
		<pubDate>Sat, 14 Feb 2009 00:00:33 +0000</pubDate>
		<dc:creator>52nlp</dc:creator>
				<category><![CDATA[机器翻译]]></category>
		<category><![CDATA[翻译模型]]></category>
		<category><![CDATA[GIZA++]]></category>
		<category><![CDATA[mapreduce]]></category>
		<category><![CDATA[mgiza++]]></category>
		<category><![CDATA[Moses]]></category>
		<category><![CDATA[pgiza++]]></category>
		<category><![CDATA[SRILM]]></category>
		<category><![CDATA[统计机器翻译]]></category>

		<guid isPermaLink="false">http://www.52nlp.cn/?p=809</guid>
		<description><![CDATA[　　众所周知，在Moses中除了语言模型的训练是利用srilm的ngram-count模块单独训练外，其它模型的训练都是利用train-factored-phrase-model.perl模型训练脚本进行一站式训练，包括翻译模型，重排序模型和生成模型等，这些模型的训练只要设置好相应的选项，中间过程无需人工干预，在整个训练过程结束后，就可以生成解码器所需的所有文件，极为方便。 　　训练脚本包括以下9个步骤，有些步骤是根据用户的设置进行的，没有的就跳过，但是最基本的翻译模型训练是肯定的： 　　(1) 准备语料（prepare corpus） 　　(2) 运行Giza++(run GIZA) 　　(3) 词语对齐（align words） 　　(4) 词典概率评分，既利用MLE计算词语的翻译概率（learn lexical translation） 　　(5) 短语抽取（extract phrases） 　　(6) 短语评分，既生成phrase-table,也就是翻译模型（score phrases） 　　(7) 训练重排序模型（learn reordering model） 　　(8) 训练生成模型（learn generation model） 　　(9)创建解码器所需的相应配置文件（create decoder config file） 　　这9个步骤中，最最耗时的就算运行Giza++了，在moses的参考文档中指出： 　　GIZA++ is a freely available implementation &#8230; <a href="http://www.52nlp.cn/the-issue-of-parallel-in-moses-model-training">继续阅读 <span class="meta-nav">&#8594;</span></a>
相关文章:<ol>
<li><a href='http://www.52nlp.cn/me-for-machine-translation' rel='bookmark' title='ME for Machine Translation'>ME for Machine Translation</a></li>
<li><a href='http://www.52nlp.cn/ubuntu-moses-platform-build-process-record' rel='bookmark' title='Ubuntu8.10下moses测试平台搭建全记录'>Ubuntu8.10下moses测试平台搭建全记录</a></li>
<li><a href='http://www.52nlp.cn/moses-introduction' rel='bookmark' title='Moses相关介绍'>Moses相关介绍</a></li>
<li><a href='http://www.52nlp.cn/one-problem-on-moses-training-scripts' rel='bookmark' title='Moses训练脚本的一个问题'>Moses训练脚本的一个问题</a></li>
<li><a href='http://www.52nlp.cn/language-model-training-tools-srilm-details' rel='bookmark' title='语言模型训练工具SRILM详解'>语言模型训练工具SRILM详解</a></li>
<li><a href='http://www.52nlp.cn/statistical-machine-translation-classic-literature' rel='bookmark' title='统计机器翻译中的几篇经典文献'>统计机器翻译中的几篇经典文献</a></li>
<li><a href='http://www.52nlp.cn/euromatrix-and-spirit-of-openness' rel='bookmark' title='EuroMatrix与开放精神'>EuroMatrix与开放精神</a></li>
<li><a href='http://www.52nlp.cn/statistical-machine-translation-and-resources-building-thinking' rel='bookmark' title='统计机器翻译与资源建设思考'>统计机器翻译与资源建设思考</a></li>
<li><a href='http://www.52nlp.cn/cwmt2009-follow-up' rel='bookmark' title='第五届全国机器翻译研讨会后续'>第五届全国机器翻译研讨会后续</a></li>
<li><a href='http://www.52nlp.cn/%e8%af%97%e6%ad%8c%e7%bf%bb%e8%af%91%e4%b8%8e%e7%bb%9f%e8%ae%a1%e6%9c%ba%e5%99%a8%e7%bf%bb%e8%af%91' rel='bookmark' title='诗歌翻译与统计机器翻译'>诗歌翻译与统计机器翻译</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>　　众所周知，在Moses中除了语言模型的训练是利用srilm的ngram-count模块单独训练外，其它模型的训练都是利用train-factored-phrase-model.perl模型训练脚本进行一站式训练<span id="more-809"></span>，包括翻译模型，重排序模型和生成模型等，这些模型的训练只要设置好相应的选项，中间过程无需人工干预，在整个训练过程结束后，就可以生成解码器所需的所有文件，极为方便。<br />
　　训练脚本包括以下9个步骤，有些步骤是根据用户的设置进行的，没有的就跳过，但是最基本的翻译模型训练是肯定的：<br />
　　(1) 准备语料（prepare corpus）<br />
　　(2) 运行Giza++(run GIZA)<br />
　　(3) 词语对齐（align words）<br />
　　(4) 词典概率评分，既利用MLE计算词语的翻译概率（learn lexical translation）<br />
　　(5) 短语抽取（extract phrases）<br />
　　(6) 短语评分，既生成phrase-table,也就是翻译模型（score phrases）<br />
　　(7) 训练重排序模型（learn reordering model）<br />
　　(8) 训练生成模型（learn generation model）<br />
　　(9)创建解码器所需的相应配置文件（create decoder config file）<br />
　　这9个步骤中，最最耗时的就算运行Giza++了，在moses的参考文档中指出：<br />
　　GIZA++ is a freely available implementation of the IBM Models. We need it as a initial step to establish word alignments. Our word　alignments are taken from the intersection of bidirectional runs of GIZA++ plus some additional alignment points from the union of the two runs.<br />
　　<strong>Running GIZA++ is the most time consuming step in the training process. It also requires a lot of memory (1-2 GB RAM is common for large parallel corpora).   </strong><br />
　　Giza++是从双语句对的两个方向进行迭代学习的，模型训练的绝大多数时间都被这两个方向的迭代训练占去了，所以，Moses提供了第一种简单的解决办法：<strong>并行训练（Training in parallel):</strong><br />
　　在训练时加上 –parallel选项，这样训练脚本将被fork，Giza++的两个方向的训练将作为独立的进程。这是一台多处理器机器上的最好选择。<br />
　　Using the &#8211;parallel option will fork the script and run the two directions of GIZA as independent processes. This is the best choice on a multi-processor machine.<br />
　　如果你想在单处理器上使用并行运行两个Giza,可以使用下面的方法（我觉得单处理器上没必要使用这个方法，即使使用了效果也应该和正常的方法一样，时间节省效果不明显）：<br />
　　First you start training the usual way with the additional switches &#8211;last-step 2 &#8211;direction 1, which runs the data perparation and one direction of GIZA++ training．When the GIZA++ step started, start a second training run with the switches &#8211;first-step 2 &#8211;direction 2. This runs the second GIZA++ run in parallel, and then continues the rest of the model training. (Beware of race conditions! The second GIZA might finish earlier than the first one to training step 3 might start too early!)<br />
　　Moses本身提供的方法可以有效利用2核处理器，但是对于更多核的处理器机器，譬如我的机器是4核cpu的，通过观察发现，训练过程中任何时刻，只有两个处理器的使用率是百分百，其他两个cpu基本闲置。对于闲置的cpu,不用似乎是一种浪费，不过这个问题已经有了解决: <strong>Mgiza++</strong>。<br />
　　MGiza++是在Giza++基础上扩充的一中多线程Giza++工具，描述如下：<br />
　　Multi Thread GIZA++ is an extension to GIZA++ word aligning tool. It can perform much faster training than origin GIZA++ if you have more than one CPUs, in addition it fixed some bugs in GIZA, and the final aligning perplexity is generally lower than original GIZA++.<br />
　　在使用MGiza++时，可以根据自己的机器指定使用几个处理器，非常方便，需要说明的是，MGzia++的作者是一位中国人，他同时提供了Giza++并行化的另一个工具：<strong>PGIZA++</strong> 。Pgiza++是运行在分布式机器上的Giza++工具，使用了MapReduce技术的框架：<br />
　　PGIZA++ is another version that can run on cluters. PGIZA++ based on schedulers of the cluster, here we have script for maui, Condor and simply ssh remote procedure call.<br />
　　关于MGiza++，PGiza++两个工具的主页：<br />
　　　　http://www.cs.cmu.edu/~qing/<br />
　　参考的三篇文献，这些在Google上很容易搜到：<br />
　　1、Parallelizing the Training Procedure of Statistical Phrase-based Machine Translation<br />
　　2、Parallel Implementations of Word Alignment Tool<br />
　　3、Fast, Easy, and Cheap: Construction of Statistical Machine Translation Models with MapReduce</p>
<p>注：原创文章，转载请注明出处“<a href="http://www.52nlp.cn">我爱自然语言处理</a>”：<a href="http://www.52nlp.cn">www.52nlp.cn</a></p>
<p>本文链接地址：<br />
<a href="http://www.52nlp.cn/the-issue-of-parallel-in-moses-model-training/">http://www.52nlp.cn/the-issue-of-parallel-in-moses-model-training/</a></p>
<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-4332174469367599";
/* 336x280, 创建于 09-2-7 */
google_ad_slot = "5707022987";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
<p>相关文章:<ol>
<li><a href='http://www.52nlp.cn/me-for-machine-translation' rel='bookmark' title='ME for Machine Translation'>ME for Machine Translation</a></li>
<li><a href='http://www.52nlp.cn/ubuntu-moses-platform-build-process-record' rel='bookmark' title='Ubuntu8.10下moses测试平台搭建全记录'>Ubuntu8.10下moses测试平台搭建全记录</a></li>
<li><a href='http://www.52nlp.cn/moses-introduction' rel='bookmark' title='Moses相关介绍'>Moses相关介绍</a></li>
<li><a href='http://www.52nlp.cn/one-problem-on-moses-training-scripts' rel='bookmark' title='Moses训练脚本的一个问题'>Moses训练脚本的一个问题</a></li>
<li><a href='http://www.52nlp.cn/language-model-training-tools-srilm-details' rel='bookmark' title='语言模型训练工具SRILM详解'>语言模型训练工具SRILM详解</a></li>
<li><a href='http://www.52nlp.cn/statistical-machine-translation-classic-literature' rel='bookmark' title='统计机器翻译中的几篇经典文献'>统计机器翻译中的几篇经典文献</a></li>
<li><a href='http://www.52nlp.cn/euromatrix-and-spirit-of-openness' rel='bookmark' title='EuroMatrix与开放精神'>EuroMatrix与开放精神</a></li>
<li><a href='http://www.52nlp.cn/statistical-machine-translation-and-resources-building-thinking' rel='bookmark' title='统计机器翻译与资源建设思考'>统计机器翻译与资源建设思考</a></li>
<li><a href='http://www.52nlp.cn/cwmt2009-follow-up' rel='bookmark' title='第五届全国机器翻译研讨会后续'>第五届全国机器翻译研讨会后续</a></li>
<li><a href='http://www.52nlp.cn/%e8%af%97%e6%ad%8c%e7%bf%bb%e8%af%91%e4%b8%8e%e7%bb%9f%e8%ae%a1%e6%9c%ba%e5%99%a8%e7%bf%bb%e8%af%91' rel='bookmark' title='诗歌翻译与统计机器翻译'>诗歌翻译与统计机器翻译</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.52nlp.cn/the-issue-of-parallel-in-moses-model-training/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>

