Moses 安装

  1. 安装步骤
  1. 安装一些必备包

sudo apt-get install build-essentialgit-core pkg-config automake libtool wget zlib1g-dev python-dev libbz2-dev

  1. clone moses code

git clone https://github.com/moses-smt/mosesdecoder.git

cd mosesdecoder

  1. 安装最新版本的Boost, cmph, irslm, xmlrpc-c

默认将把上述软件Boost, cmph, irslm, xmlrpc-c安装到mosesdecoder/opt目录

make -fcontrib/Makefiles/install-dependencies.gmake

  1. 编译 moses

使用compile.sh 编译,常见参数是:

--prefix=/destination/path --install-scripts,指明安装路径

--with-mm ,enable suffix array-based phrase tables

例如:

./compile.sh  --prefix=/mnt/share --install-scripts--with-mm

如果compile.sh 有问题或者需要更多参数编译,可以使用bjam命令

例如

 ./bjam--with-boost=~/workspace/temp/boost_1_55_0 -j8

 

 

  1.  额外的配置

2.1 Word Alignment

由于word alignment软件没有包含在自动build和安装脚本内,需要手动安装。常用word alignment工具有giza++, mgiza, Fast Align

此处选择mgiza. 安装方法如下:

  1. install

   git clone https://github.com/moses-smt/mgiza.git

   cd mgiza/mgizapp

   cmake .

   make

   make install

 

  1. compile giza

manual-compile/compile.sh

 

  1. Copy mgiza bnary & script merge_aliangment.py to moses folder

  exportBINDIR=~/workspace/bin/training-tools

  cp bin/* $BINDIR/mgizapp

  cpscripts/merge_alignment.py $BINDIR

 

  1. Use mgiza with train-model.perl

MGIZA works with the training script train-model.perl. You indicateits use (opposed to regular GIZA++) with the switch -mgiza. The switch-mgiza-cpus NUMBER allows you to specify the number of CPUs.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值