一. 搭建实验环境:
ubuntu系统可以直接下载安装deb包即可,需要安装的deb包有Srilm, GIZA++, mkcls以及从 http://www.statmt.org/wmt08/scripts.tgz 上获得的一些脚本文件。如果不是ubuntu系统的话,需要下载这些工具的源代码进行编译安装。
下面简述使用源代码编译的方法搭建环境中的步骤,直接使用deb安装的可以跳过:
1. 安装Srilm:
下载Srilm源码文件,解压。http://www.speech.sri.com/projects/srilm/download.html
首先,检查Srilm的依赖包,这些依赖包包括:
1 ) A template-capable ANSI-C/C++ compiler, gcc version 3.4.3 or higher.
2 ) GNU make, to control compilation and installation.
3 ) GNU gawk, required for many of the utility scripts.
4 ) GNU gzip to unpack the distribution, and to allow SRILM programs to handle “.Z” and “.gz” compressed datafiles (highly recommended).
5 ) bzip2 to handle “.bz2″ compressed files (optional).
6 ) p7zip to handle “7-zip” compressed files (optional).
7 ) The Tcl embeddable scripting language library (only required for some of the test execu tables).
8 ) csh Unix shell
如果以上工具没有全部安装的话, srilm 编译肯定无法通过。使用 which 命令查找以上工具是否安装,例如:
which make, 若得到的输出为 /usr/bin/make ,表明系统已经安装好了 GNU make 。没有的话需要apt-get install ***(相应的包)。
其次,修改Makefile和common/Makefile.machine.i686文件:
1 )修改 Makefile 文件
找到以下两行:
# SRILM = /home/speech/stolcke/project/srilm/devel ,另起一行输入 srilm 的安装路径, SRILM = ($PWD) 。
Ubuntu环境下搭建Moses机器翻译系统详解

本文详细记录了在Ubuntu系统上搭建Moses机器翻译系统的全过程,包括安装Srilm、GIZA++、mkcls和Moses的步骤,以及如何进行实验验证和测试。在安装过程中,涉及到了依赖项的检查、配置文件修改和编译测试。
最低0.47元/天 解锁文章
6584

被折叠的 条评论
为什么被折叠?



