实验室换了新机器,重新安装了最新的ubuntu8.10,这样不得不重新搭建moses测试平台。拿自己写的<<Moses相关介绍>>作参考,感觉写得不够细,这里把安装的全过程记录下来,属于一个step-by-step的过程,希望对大家有用。

一、在用户52nlp目录下建立moses平台主目录mtworkdir:
  52nlp@52nlp-desktop:~$ mkdir mtworkdir
  52nlp@52nlp-desktop:~$ cd mtworkdir/

二、安装语言模型工具SRILM:
1、建立srilm目录:
  52nlp@52nlp-desktop:~/mtworkdir$ mkdir srilm
  52nlp@52nlp-desktop:~/mtworkdir$ cd srilm/
2.下载最新的的srilm包(目前最新版本为 srilm-1.5.7.tar.gz)
  52nlp@52nlp-desktop:~/mtworkdir/srilm$ wget   ’ftp://ftp.speech.sri.com/pub/people/stolcke/srilm/srilm-1.5.7.tar.gz’
  显示信息如下:
=> `srilm-1.5.7.tar.gz’
正在解析主机 ftp.speech.sri.com… 130.107.33.205
正在连接 ftp.speech.sri.com|130.107.33.205|:21… 已连接。
正在以 anonymous 登录 … 登录成功!
==> SYST … 完成。 ==> PWD … 完成。
==> TYPE I … 完成。 ==> CWD /pub/people/stolcke/srilm … 完成。
==> SIZE srilm-1.5.7.tar.gz … 完成。
==> PASV … 完成。 ==> RETR srilm-1.5.7.tar.gz … 完成。
长度:48526656 (46M) (非正式数据)
出现下载进度条,等待约一段时间之后,下载完毕
3.解压:tar -zxvf srilm-1.5.7.tar.gz
4.首先确认srilm依赖的这些工具是否已安装:
 A template-capable ANSI-C/C++ compiler, preferably gcc version 3.4.3 or higher.
 GNU make, to control compilation and installation.
 GNU gawk, required for many of the utility scripts.
 GNU gzip to unpack the distribution, and to allow SRILM programs to handle “.Z” and “.gz” compressed datafiles (highly recommended).
 bzip2 to handle “.bz2″ compressed files (optional).
 p7zip to handle “7-zip” compressed files (optional).
 The Tcl embeddable scripting language library (only required for some of the test executables).
 除了上面这些工具外,还需要装一个csh。Ubuntu8.10自带的软件不多,安装时用apt-get或新利得都行。
5. 修改MakeFile:
 在以上工具都安装完毕后,首先修改srilm/MakeFile:
   cp Makefile Makefile.bak(备份)
   vi Makefile
 修改或在第7行下面加上一行
 # SRILM = /home/speech/stolcke/project/srilm/devel (原)
 SRILM = $(PWD) (修改)
 再修改srilm/common/Makefile.machine.i686:
  cd common/
  cp Makefile.machine.i686 Makefile.machine.i686.bak
  vi Makefile.machine.i686
 将第15行 # Use the GNU C compiler下的三行修改如下:
  GCC_FLAGS = -mtune=pentium3 -Wreturn-type -Wimplicit
  CC = gcc $(GCC_FLAGS)
  CXX = g++ $(GCC_FLAGS) -DINSTANTIATE_TEMPLATES
 注:我的新机器的cpu是intel64位,所以尝试了一下64位的编译方法,不太成功,这里的方法对于64位机器也是可以的。
 将51行 # Tcl support (standard in Linux) 下的两行修改如下:
  TCL_INCLUDE = -I/usr/include/tcl8.5
  TCL_LIBRARY = -L/usr/lib/tcl8.5
 注:我装的是tcl8.5,如果是其他版本,请相应修改。
6.回到srilm目录下编译:
  cd ..
  make World
 顺利的话,srilm就编译通过了。如果出现问题,很可能就是相应的依赖工具没有装完全,请回到第4步检查。
7.进入srilm/test目录下进行测试:
 编译通过不等于编译成功,必须利用srilm提供的测试模块进行测试
 首先声明srilm编译成功后工具报所在的环境变量:
  export  PATH=$PATH:/home/52nlp/mtworkdir/srilm/bin/i686:
/home/52nlp/mtworkdir/srilm/bin
 然后进入test测试:
  cd test
  make all
 出现如下信息:
*** Running test class-ngram-simple ***
0.50user 0.11system 0:00.61elapsed 100%CPU  (0avgtext+0avgdata 0maxresident)k
0inputs+1288outputs (0major+4684minor)pagefaults 0swaps
class-ngram-simple: stdout output IDENTICAL.
class-ngram-simple: stderr output IDENTICAL.
….
 需要等待一段时间,如果出现多是IDENTICAL,很少的DIFFERS,就证明srilm编译成功了!

三、安装翻译模型训练工具Giza++,mkcls

1、 在mtworkdir目录下下载并解压Giza++:
  cd /home/52nlp/mtworkdir
  wget http://ling.umd.edu/~redpony/software/giza++.gcc41.tar.gz
  tar -zxvf giza++.gcc41.tar.gz
 解压后得到GIZA++-v2/目录
2、编译Giza++:
  cd GIZA++v2
  make
 以前这一步都比较顺利,没想到这一次出了问题:编译过程中提示stream.h文件无法找到,开始以为自己的编译环境没有配置完全,但是检查了几项必要的都安装了。在Google上搜这个问题,国内好像还没有人遇到过,最终在Google code giza-pp的issue上找到了的答案(http://code.google.com/p/giza-pp/issues/detail?id=7):
  Cannot compile with gcc 4.3 or greater
 Giza++不能被gcc,g++4.3或更高版本编译。这个问题也是最近被发现的,属于一个bug,而ubutu8.10默认安装的gcc,g++都是4.3版本,这个帖子里提出了几种解决方案,我用了最简单的一种:
 安装g++-4.1: sudo apt-get install g++-4.1
 修改GIZA++-v2里的Makefile:vi Makefile
 将第5行CXX=g++
 替换为:CXX=g++-4.1
 OK, 可以重新make了:
  make
  make snt2cooc.out
 一切顺利!
3、下载解压并编译mkcls:
  cd ..(重新进入mtworkdir目录)
  wget http://ling.umd.edu/~redpony/software/mkcls.gcc41.tar.gz
  tar -zxvf mkcls.gcc41.tar.gz
  cd mkcls-v2
  make
 这一步一般没啥问题。
4、建立bin目录,并将giza++,mkcls工具拷贝到bin目录下:
  cd ..
  mkdir -p bin
  cp GIZA++-v2/GIZA++ bin/
  cp GIZA++-v2/snt2cooc.out bin/
  cp mkcls-v2/mkcls bin/

四、安装解码器Moses及相关脚本
1、建立目录,通过svn下载moses:
  mkdir -p moses
  svn co  https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder
/trunk moses
 ubuntu8.10下需自行安装svn.
2、下载完成后编译:
  cd moses
  ./regenerate-makefiles.sh
  ./configure –with-srilm=/home/52nlp/mtworkdir/srilm
  make -j 4
  cd ..
 注:srilm指向绝对路径。
3、安装Moses训练脚本
 建立训练脚本目录:
  mkdir -p bin/moses-scripts
  修改makefile:
  vi moses/scripts/Makefile
  将第13、14行修改如下:
  TARGETDIR=/home/52nlp/mtworkdir/bin/moses-scripts
  BINDIR=/home/52nlp/mtworkdir/bin
 编译:
  cd moses/scripts/
  make release
  cd ../..
 使用时需要声明环境:
  export SCRIPTS_ROOTDIR=/home/52nlp/mtworkdir/bin/moses-scripts
/scripts-20090113-1019
4、安装Moses附加脚本及评测工具
 下载scripts.tgz并解压:
  wget http://www.statmt.org/wmt07/scripts.tgz
  tar -zxvf scripts.tgz
 这些脚本包括:
  Tokenizer scripts/tokenizer.perl
  Lowercaser scripts/lowercase.perl
  SGML-Wrapper scripts/wrap-xml.perl
 下载NIST,BLEU评测工具:
  wget ftp://jaguar.ncsl.nist.gov/mt/resources/mteval-v11b.pl

  完整的安装过程结束,这次安装中最大的问题是Giza++不能被gcc,g++4.3或更高版本编译,以后肯定会有很多人遇到这个问题,希望放在这里对大家有所帮助。

注:原创文章,转载请注明出处“我爱自然语言处理”:www.52nlp.cn

本文链接地址:
http://www.52nlp.cn/ubuntu-moses-platform-build-process-record/

相关文章:

  1. Ubuntu 64位系统下SRILM的配置详解
  2. Moses相关介绍
  3. 语言模型工具IRSTLM安装及试用手记
  4. Moses中模型训练的并行化问题
  5. Moses训练脚本的一个问题
  6. 安装Srilm的一点新变化
  7. Moses最新版本发布
  8. 语言模型训练工具SRILM详解
  9. Moses基本框架
  10. 神奇的约翰霍普金斯夏季研讨会

评论

94条回复 to “Ubuntu8.10下moses测试平台搭建全记录”

  1. xuchong on 一月 14th, 2009 16:15

    文章对我的帮助很大啊。不知道这位师兄是工大那个实验室的?希望以后能和师兄交流一下。

    [回复]

    admin 回复:

    呵呵,已经离开HIT快3年了!可以邮件交流!谢谢你的评论,第一个,终于等来了!

    [回复]

    sc 回复:

    这位师兄是不是工大博士毕业去了苏州大学当老师了呀,我猜的,呵呵。

    [回复]

    52nlp 回复:

    呵呵,猜错了,本科在工大。

    [回复]

  2. Hans on 三月 3rd, 2009 03:11

    前辈您好,我现在在学习自然语言处理,但是我在ununtu下配置摩西的时候总是在安装语言模型工具SRILM这不不能通过,在测试的时候都是DIFFERS.想求助您一下,如果方便能麻烦您个给我一个回复么?谢谢

    [回复]

  3. Hans on 三月 3rd, 2009 03:18

    /home/hans/mtworkdir/srilm/lm/src/Vocab.h:184: undefined reference to `LHash::find(unsigned int, bool&) const’
    ../../lib/i686/liboolm.a(Discount.o): In function `NgramCountsIter’:
    /home/hans/mtworkdir/srilm/lm/src/NgramStats.h:137: undefined reference to `TrieIter2::TrieIter2(Trie const&, unsigned int*, unsigned int, int (*)(unsigned int, unsigned int))’

    这些是错误信息

    [回复]

    admin 回复:

    我还没遇到过这样的问题,在Google上搜了一下,你看看这个解答:
    make sure the c++ compiler is invoked with
    -DINSTANTIATE_TEMPLATES

    If it is then there seems to be a strange problem with your linker or
    compiler installation that I cannot reproduce.

    http://www.speech.sri.com/projects/srilm/mail-archive/srilm-user/2006-October/11.html

    另外再检查一下srilm所依赖的几个工具在ubuntu上是否已经安装,这里对于后面安装是否成功影响比较大。

    [回复]

  4. shu on 四月 29th, 2009 16:21

    前辈您好,我在windows下配置和运行moses时遇到了两个问题,想跟您请教和交流下。
    一个是用moses网站上提供的A Simple Translation Model在命令行窗口中运行moses可以通过。但是换成自己的短语表就不行了,我对比发现简单翻译模型示例中的每一行最后的概率值是一个,而我的短语表中每一行最后的概率值是四个;
    另一个是想摆脱命令行窗口中运行的限制,在vs2005IDE下项目->属性->
    配置属性->调试中将本来在命令行参数窗口中可以运行通过的命令输入进去,在IDE中却运行不了了。不知道怎么回事,向您求助,谢谢!

    [回复]

    admin 回复:

    你好,关于第一个问题,如果是正常训练的翻译模型,一般都是5个概率值,不知道你的短语翻译模型是怎么得到的?
    要是4个值的话,需要修改一下配置文件moses.ini:
    1、将[ttable-file]下的“0 0 1 phrase-table”修改为“0 0 4 phrase-table”;
    2、将[weight-t]下的”1“修改为4行,每行分配值为”0.25“;
    估计这样就能通过了。
    第二个问题我还不熟,不好意思。

    [回复]

  5. FridayRain on 六月 8th, 2009 21:15

    相见恨晚,是我对这个站点的感觉。谢谢你所做的工作,使我以及更多的人在其中受益匪浅。我把老哥站点里的关于机器翻译的看完了,很好,既有细节深度,又有综述的广度。加油!!!

    [回复]

    admin 回复:

    谢谢你的支持!欢迎常来看看!

    [回复]

  6. flysocket on 六月 24th, 2009 14:47

    很有收获,

    请教关于giza的使用问题。

    下载giza,用g++4.1编译,然后make , 没有出什么问题。

    我在运行giza的时候,比如:./GIZA++ --v等一下子就报错:

    *** stack smashing detected ***: ./GIZA++ terminated
    ======= Backtrace: =========
    [0x81762ae]
    [0x8176262]
    [0x8069de1]
    [0x806af04]
    [0x8072aaa]
    [0x8146031]
    [0x8048151]
    ======= Memory map: ========
    08048000-081f6000 r-xp 00000000 07:00 411484 /home/administrator/桌面/giza-pp/GIZA++-v2/GIZA++
    081f6000-081f8000 rw-p 001ae000 07:00 411484 /home/administrator/桌面/giza-pp/GIZA++-v2/GIZA++
    081f8000-081ff000 rw-p 081f8000 00:00 0
    0919c000-09210000 rw-p 0919c000 00:00 0 [heap]
    b8071000-b8072000 r-xp b8071000 00:00 0 [vdso]
    bfa5d000-bfa72000 rw-p bffeb000 00:00 0 [stack]

    请问这是什么问题,麻烦指点一下,不甚感谢。

    [回复]

  7. admin on 六月 24th, 2009 15:50

    你好,这个问题似乎与http://code.google.com/p/giza-pp/issues/detail?id=11#c0上的这个问题很象,不过它开始的错误是:*** buffer overflow detected ***: ../giza-pp/GIZA++-v2/GIZA++ terminated。
    不知道你的操作系统环境是什么,建议除了使用g++4.1编译外,最好安装gcc4.1这个版本再编译试试,原因如下:
    The error is caused by the lines:
    char time_stmp[17];
    sprintf(time_stmp, “%02d-%02d-%02d.%02d%02d%02d.”, local->tm_year,
    (local->tm_mon + 1), local->tm_mday, local->tm_hour,
    local->tm_min, local->tm_sec);
    Probably by installing older GCC, you got older version of C library, which does not perform such check.
    另外,虽然目前Google code上有最新的giza-pp-v1.0.3.tar.gz可以下载,并且编译时没有任何问题,但是如果使用g++4.3及以上版本编译,运行时仍会出现上面这类问题,解决的办法还是这篇文章中提到的方法:
    安装g++-4.1: sudo apt-get install g++-4.1
     修改GIZA++-v2里的Makefile:vi Makefile
     将第5行CXX=g++
     替换为:CXX=g++-4.1
    这样使用时才不会出现上面这类问题。

    [回复]

  8. xuanyan on 七月 8th, 2009 09:28

    您好,我现在已经在linux下将moses编译好,而且也能运行了,但我想把自己的语言模型和调序模型加进Moses里,那我需要去改Moses里面的代码吗?还是只是把moses里面的配置文件moses.ini修改一下?请麻烦指点一下,谢谢!

    [回复]

    admin 回复:

    这个应该是修改配置文件,不用修改moses的代码

    [回复]

  9. xuanyan on 七月 11th, 2009 10:12

    您好:
    还有一个问题向您请教,就是我的语言模型并不是基于n-gram的,跟n-gram有些区别,是解决长距离依赖的!调序模型也是跟moses本身生成的调序模型有区别,那moses可以应用这两种模型去解码吗?moses具体解码时对所用到的语言模型和调序模型没有什么要求吗?尤其是算法不同时!这种情况也只是修改配置文件吗?不用去修改它里面的代码吗?真的还得麻烦您指点一下,谢谢!

    [回复]

    admin 回复:

    这种情况可能要修改代码了,如果用的模型与moses默认的有区别,可以考虑在对数线性模型下以特征函数的方式加入,moses 的manual里第5.4节专门讲了如何在moses里加入特征函数的方式:Adding Feature Functions。你可以看看,这个要修改代码了。

    [回复]

  10. peri on 八月 12th, 2009 16:45

    您好。想请教您一个问题,刘群老师有一篇EMNLP的文章“Maximum Entropy based Rule Selection Model for Syntax-based Statistical Machine Translation”,他也是用log-linear模型实现的,我现在想问的是,如果把他的研究结果作为一个特征放到moses里是否可行,如果可行的话,是不是就用moses的manual.pdf中介绍的一个“Add feature”就可以了?还是要修改训练过程,重新训练?或者把这个feature作为moses现有的reordering特征的一个子类呢?
    或者您还有更好的方案?
    希望得到您的回复,基础不好,现在研究的有点晕了:)

    [回复]

    admin 回复:

    你好,我看了一下这篇文章的摘要,觉得这篇文章的目标是Syntax-based Statistical Machine Translation,刘老师他们用的是树到串的对齐模板模型,Moses是传统的基于短语的统计机器翻译系统,和这篇文章的对象不同,所有我觉得把他的研究成果作为一个特征放到Moses里似乎不太合适。
    不过你可以看看刘老师的学生熊德意在06年COLING-ACL联合会议上发表的这篇文章:Maximum Entropy Based Phrase Reordering Model for Statistical Machine Translation,如果你能实现这篇文章里提到的基于最大熵方法得到的reorder模型,就可以尝试按Moses的manual.pdf中介绍的“Add feature”的方法加人特征了,不过这个reorder模型似乎和Moses现有的reorder模型不同,你可以仔细研究一下。

    [回复]

  11. peri on 八月 14th, 2009 10:14

    您好,谢谢回复。请问是否方便给我发个邮件呢?有问题,还要向您请教呢。

    [回复]

  12. crisy on 十二月 2nd, 2009 12:19

    你好,我运行./regenerate-makefiles.sh这一步后,显示的是
    Calling…
    Calling…
    Calling…

    You should now be able to configure and build:

    ./configure –with-srilm=/path/to/srilm

    make -j 4

    Calling 后面没有您那么多的输出,直接是…,这是不是表示没有成功?
    另外,MOSES的版本不同情况下,./rengenerate-makefiles.sh 并不是都能运行,我刚开始用最新版本2009-4-13,出现的问题是运行许可被拒绝,其他除了08-7-11版本外的,我也试了,也同样出现不能运行./rengenerate-makefiles.sh,是不是我的MOSES包有问题,非常期待您的回复~~~!!

    [回复]

    52nlp 回复:

    好久没有碰moses,都有点忘了。晚上我在ubuntu9.04里重新安装了一下,运行./regenerate-makefiles.sh后应该显示的是:
    Calling /usr/bin/aclocal…
    Calling /usr/bin/autoconf…
    Calling /usr/bin/automake…
    如果没有显示,估计是automake和autoconf没有安装的缘故。
    ./rengenerate-makefiles.sh 被拒绝的缘故,肯定和moses没有关系,我今晚装的就是4.13版本的。你可以在运行脚本之前将其设置为可执行试一下:
    chmod 755 rengenerate-makefiles.sh

    [回复]

  13. crisy on 十二月 3rd, 2009 11:00

    您好,呵呵,感谢您的指导,确实是因为没有装automake,现在已经可以运行了,但是有出现了新的问题,希望继续可以得到您的指导,感谢!
    在运行到make -j4,的时候出现的错误,两处都是这样的问题,如下:
    提示编译错误
    In file included from /usr/include/c++/4.4/cstdlib:68,
    from Util.h:34,
    from AlignmentElement.h:26,
    from AlignmentPhrase.h:25,
    from AlignmentPhrase.cpp:21:
    /usr/include/stdlib.h:351: error: expected ‘;’ before ‘*’ token
    /usr/include/stdlib.h:352: error: expected ‘;’ before ‘*’ token
    /usr/include/stdlib.h:353: error: expected ‘;’ before ‘*’ token
    /usr/include/stdlib.h:357: error: expected ‘;’ before ‘*’ token
    /usr/include/stdlib.h:361: error: ‘int32_t’ has not been declared
    stdlib.h是系统的只读文件,不可以修改,期待您的再次指导

    [回复]

    52nlp 回复:

    不用客气,也不要称您了,呵呵!
    这个问题我没有遇到过,不过查了一下,发现有人似乎遇到了和你相同的问题,你可以看看这个网页:
    http://www.mail-archive.com/moses-support@mit.edu/msg01482.html
    下面这个是解答:
    http://www.mail-archive.com/moses-support@mit.edu/msg01483.html
    我这边直接访问不了,是通过快照看的,建议的解决方案如下:
    to compile moses in gcc 4.4, you have to compile with the switch
    -std=c++0x
    i’ve tested it on my fedora 11 and it works.

    Since moses uses automake, you should add this flag to the 3 Makefile.am
    files in
    moses/src
    moses-cmd/src
    misc
    eg.
    AM_CPPFLAGS=….. -std=c++0x
    如果不行的话,可以试着装一个低版本的gcc再试试。

    [回复]

  14. crisy on 十二月 7th, 2009 21:04

    你好,呵呵,不说您了,前两天机子出了点问题,重新安装了,按照你说的方法加了-std=c++0x,是可以编译了,但是又出现了新的问题,我本来想安装低版本的gcc试试看可以解决不,但是发现安装gcc4.2运行到./configure –with-srilm=/home/crisy/mtp/srilm的时候,提示找不到G++
    所以还是重新安装成GCC4.4了,下面是在4.4时运行两遍后提示的错误:
    make all-recursive
    make[1]: 正在进入目录 `/home/crisy/mtp/trunk’
    Making all in moses/src
    make[2]: 正在进入目录 `/home/crisy/mtp/trunk/moses/src’
    make all-am
    make[3]: 正在进入目录 `/home/crisy/mtp/trunk/moses/src’
    make[3]: 没有什么可以做的为 `all-am’。
    make[3]:正在离开目录 `/home/crisy/mtp/trunk/moses/src’
    make[2]:正在离开目录 `/home/crisy/mtp/trunk/moses/src’
    Making all in moses-cmd/src
    make[2]: 正在进入目录 `/home/crisy/mtp/trunk/moses-cmd/src’
    g++ -g -O2 -L/home/crisy/mtp/srilm/lib/i686 -o moses Main.o mbr.o IOWrapper.o TranslationAnalysis.o -L../../moses/src -lmoses -loolm -ldstruct -lmisc -lz
    /usr/bin/ld: cannot find -loolm
    collect2: ld returned 1 exit status
    make[2]: *** [moses] 错误 1
    make[2]:正在离开目录 `/home/crisy/mtp/trunk/moses-cmd/src’
    make[1]: *** [all-recursive] 错误 1
    make[1]:正在离开目录 `/home/crisy/mtp/trunk’
    make: *** [all] 错误 2
    希望可以得到回复,感谢~~!

    [回复]

    52nlp 回复:

    我搜了一下,不知道你的机器是不是64位的,下面这个情况和你的是相似的:http://www.mail-archive.com/moses-support@mit.edu/msg01214.html
    解决方法在:http://www.mail-archive.com/moses-support@mit.edu/msg01215.html
    似乎是通过修改moses的’configure’文件,将下面这一行(4291行):
    # MY_ARCH=`${with_srilm}/sbin/machine-type`
    替换为:
    MY_ARCH=”i686-m64″

    另外一个也很相似:http://www.mail-archive.com/moses-support@mit.edu/msg00117.html
    不过提供的建议是“it looks to me like you’ve not properly specified the path to the SRILM”
    我估计前一个解决方法可能管用,可以试试看。

    [回复]

  15. crisy on 十二月 8th, 2009 16:17

    非常感谢,问题已经解决,搭建成功了,终于可以进一步做研究了,呵呵,这个论坛真好,我会常来看看,学学,有很多我研究需要搞清楚的概念和问题,谢谢你的帮忙~!

    [回复]

    52nlp 回复:

    不客气,欢迎常来看看!

    [回复]

  16. kisonlee on 十二月 18th, 2009 11:33

    请教下,我的CPU是T8100,应该支持64位,但是使用的是UBUNTU 32位系统,GCC是4.4版,按照你的说法,SRILM始终编译不过去,提示内容如下:
    mkdir include lib bin
    mkdir: 无法创建目录 “include”: 文件已经存在
    mkdir: 无法创建目录 “lib”: 文件已经存在
    mkdir: 无法创建目录 “bin”: 文件已经存在
    make: [dirs] 错误 1 (忽略)
    make init
    make[1]: 正在进入目录 `/home/lixiang/mtworkdir/srilm’
    for subdir in misc dstruct lm flm lattice utils; do \
    (cd $subdir/src; make SRILM=/home/lixiang/mtworkdir/srilm MACHINE_TYPE=i686 OPTION= MAKE_PIC= init) || exit 1; \
    done
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/misc/src’
    cd ..; /home/lixiang/mtworkdir/srilm/sbin/make-standard-directories
    make ../obj/i686/STAMP ../bin/i686/STAMP
    make[3]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/misc/src’
    make[3]: “../obj/i686/STAMP”是最新的。
    make[3]: “../bin/i686/STAMP”是最新的。
    make[3]:正在离开目录 `/home/lixiang/mtworkdir/srilm/misc/src’
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/misc/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/dstruct/src’
    cd ..; /home/lixiang/mtworkdir/srilm/sbin/make-standard-directories
    make ../obj/i686/STAMP ../bin/i686/STAMP
    make[3]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/dstruct/src’
    make[3]: “../obj/i686/STAMP”是最新的。
    make[3]: “../bin/i686/STAMP”是最新的。
    make[3]:正在离开目录 `/home/lixiang/mtworkdir/srilm/dstruct/src’
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/dstruct/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/lm/src’
    cd ..; /home/lixiang/mtworkdir/srilm/sbin/make-standard-directories
    make ../obj/i686/STAMP ../bin/i686/STAMP
    make[3]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/lm/src’
    make[3]: “../obj/i686/STAMP”是最新的。
    make[3]: “../bin/i686/STAMP”是最新的。
    make[3]:正在离开目录 `/home/lixiang/mtworkdir/srilm/lm/src’
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/lm/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/flm/src’
    cd ..; /home/lixiang/mtworkdir/srilm/sbin/make-standard-directories
    make ../obj/i686/STAMP ../bin/i686/STAMP
    make[3]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/flm/src’
    make[3]: “../obj/i686/STAMP”是最新的。
    make[3]: “../bin/i686/STAMP”是最新的。
    make[3]:正在离开目录 `/home/lixiang/mtworkdir/srilm/flm/src’
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/flm/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/lattice/src’
    cd ..; /home/lixiang/mtworkdir/srilm/sbin/make-standard-directories
    make ../obj/i686/STAMP ../bin/i686/STAMP
    make[3]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/lattice/src’
    make[3]: “../obj/i686/STAMP”是最新的。
    make[3]: “../bin/i686/STAMP”是最新的。
    make[3]:正在离开目录 `/home/lixiang/mtworkdir/srilm/lattice/src’
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/lattice/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/utils/src’
    cd ..; /home/lixiang/mtworkdir/srilm/sbin/make-standard-directories
    make ../obj/i686/STAMP ../bin/i686/STAMP
    make[3]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/utils/src’
    make[3]: “../obj/i686/STAMP”是最新的。
    make[3]: “../bin/i686/STAMP”是最新的。
    make[3]:正在离开目录 `/home/lixiang/mtworkdir/srilm/utils/src’
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/utils/src’
    make[1]:正在离开目录 `/home/lixiang/mtworkdir/srilm’
    make release-headers
    make[1]: 正在进入目录 `/home/lixiang/mtworkdir/srilm’
    for subdir in misc dstruct lm flm lattice utils; do \
    (cd $subdir/src; make SRILM=/home/lixiang/mtworkdir/srilm MACHINE_TYPE=i686 OPTION= MAKE_PIC= release-headers) || exit 1; \
    done
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/misc/src’
    make[2]: 没有什么可以做的为 `release-headers’。
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/misc/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/dstruct/src’
    make[2]: 没有什么可以做的为 `release-headers’。
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/dstruct/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/lm/src’
    make[2]: 没有什么可以做的为 `release-headers’。
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/lm/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/flm/src’
    make[2]: 没有什么可以做的为 `release-headers’。
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/flm/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/lattice/src’
    make[2]: 没有什么可以做的为 `release-headers’。
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/lattice/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/utils/src’
    make[2]: 没有什么可以做的为 `release-headers’。
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/utils/src’
    make[1]:正在离开目录 `/home/lixiang/mtworkdir/srilm’
    make depend
    make[1]: 正在进入目录 `/home/lixiang/mtworkdir/srilm’
    for subdir in misc dstruct lm flm lattice utils; do \
    (cd $subdir/src; make SRILM=/home/lixiang/mtworkdir/srilm MACHINE_TYPE=i686 OPTION= MAKE_PIC= depend) || exit 1; \
    done
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/misc/src’
    rm -f Dependencies.i686
    gcc -mtune=pentium3 -Wreturn-type -Wimplicit -D_FILE_OFFSET_BITS=64 -I /usr/include/tcl8.5 -I. -I../../include -MM ./option.c ./zio.c ./fcheck.c ./fake-rand48.c ./version.c ./ztest.c | sed -e “s&^\([^ ]\)&../obj/i686″‘$(OBJ_OPTION)’”/\1&g” -e “s&\.o&.o&g” >> Dependencies.i686
    g++ -mtune=pentium3 -Wreturn-type -Wimplicit -DINSTANTIATE_TEMPLATES -D_FILE_OFFSET_BITS=64 -I /usr/include/tcl8.5 -I. -I../../include -MM ./Debug.cc ./File.cc ./tclmain.cc ./testFile.cc | sed -e “s&^\([^ ]\)&../obj/i686″‘$(OBJ_OPTION)’”/\1&g” -e “s&\.o&.o&g” >> Dependencies.i686
    /home/lixiang/mtworkdir/srilm/sbin/generate-program-dependencies ../bin/i686 ../obj/i686 “” ztest testFile | sed -e “s&\.o&.o&g” >> Dependencies.i686
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/misc/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/dstruct/src’
    rm -f Dependencies.i686
    gcc -mtune=pentium3 -Wreturn-type -Wimplicit -D_FILE_OFFSET_BITS=64 -I /usr/include/tcl8.5 -I. -I../../include -MM ./qsort.c | sed -e “s&^\([^ ]\)&../obj/i686″‘$(OBJ_OPTION)’”/\1&g” -e “s&\.o&.o&g” >> Dependencies.i686
    g++ -mtune=pentium3 -Wreturn-type -Wimplicit -DINSTANTIATE_TEMPLATES -D_FILE_OFFSET_BITS=64 -I /usr/include/tcl8.5 -I. -I../../include -MM ./MemStats.cc ./LHashTrie.cc ./SArrayTrie.cc ./Array.cc ./IntervalHeap.cc ./Map.cc ./SArray.cc ./LHash.cc ./Map2.cc ./Trie.cc ./CachedMem.cc ./testArray.cc ./testMap.cc ./benchHash.cc ./testHash.cc ./testSizes.cc ./testCachedMem.cc ./testMap2.cc ./testTrie.cc | sed -e “s&^\([^ ]\)&../obj/i686″‘$(OBJ_OPTION)’”/\1&g” -e “s&\.o&.o&g” >> Dependencies.i686
    /home/lixiang/mtworkdir/srilm/sbin/generate-program-dependencies ../bin/i686 ../obj/i686 “” testArray testMap benchHash testHash testSizes testCachedMem testMap2 testTrie | sed -e “s&\.o&.o&g” >> Dependencies.i686
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/dstruct/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/lm/src’
    rm -f Dependencies.i686
    gcc -mtune=pentium3 -Wreturn-type -Wimplicit -D_FILE_OFFSET_BITS=64 -I /usr/include/tcl8.5 -I. -I../../include -MM ./matherr.c | sed -e “s&^\([^ ]\)&../obj/i686″‘$(OBJ_OPTION)’”/\1&g” -e “s&\.o&.o&g” >> Dependencies.i686
    g++ -mtune=pentium3 -Wreturn-type -Wimplicit -DINSTANTIATE_TEMPLATES -D_FILE_OFFSET_BITS=64 -I /usr/include/tcl8.5 -I. -I../../include -MM ./Prob.cc ./Counts.cc ./XCount.cc ./Vocab.cc ./VocabMap.cc ./VocabMultiMap.cc ./VocabDistance.cc ./SubVocab.cc ./MultiwordVocab.cc ./TextStats.cc ./LM.cc ./LMClient.cc ./LMStats.cc ./RefList.cc ./Bleu.cc ./NBest.cc ./NBestSet.cc ./NgramLM.cc ./NgramStatsInt.cc ./NgramStatsShort.cc ./NgramStatsLong.cc ./NgramStatsLongLong.cc ./NgramStatsFloat.cc ./NgramStatsDouble.cc ./NgramStatsXCount.cc ./NgramCountLM.cc ./Discount.cc ./ClassNgram.cc ./SimpleClassNgram.cc ./DFNgram.cc ./SkipNgram.cc ./HiddenNgram.cc ./HiddenSNgram.cc ./VarNgram.cc ./DecipherNgram.cc ./TaggedVocab.cc ./TaggedNgram.cc ./TaggedNgramStats.cc ./StopNgram.cc ./StopNgramStats.cc ./MultiwordLM.cc ./BayesMix.cc ./LoglinearMix.cc ./AdaptiveMix.cc ./AdaptiveMarginals.cc ./CacheLM.cc ./DynamicLM.cc ./HMMofNgrams.cc ./WordAlign.cc ./WordLattice.cc ./WordMesh.cc ./simpleTrigram.cc ./NgramStats.cc ./Trellis.cc ./testBinaryCounts.cc ./testHash.cc ./testProb.cc ./testXCount.cc ./testParseFloat.cc ./testVocabDistance.cc ./testNgram.cc ./testNgramAlloc.cc ./testMultiReadLM.cc ./hoeffding.cc ./tolower.cc ./testLattice.cc ./testError.cc ./testNBest.cc ./testMix.cc ./testTaggedVocab.cc ./testVocab.cc ./ngram.cc ./ngram-count.cc ./ngram-merge.cc ./ngram-class.cc ./disambig.cc ./anti-ngram.cc ./nbest-lattice.cc ./nbest-mix.cc ./nbest-optimize.cc ./nbest-pron-score.cc ./segment.cc ./segment-nbest.cc ./hidden-ngram.cc ./multi-ngram.cc | sed -e “s&^\([^ ]\)&../obj/i686″‘$(OBJ_OPTION)’”/\1&g” -e “s&\.o&.o&g” >> Dependencies.i686
    /home/lixiang/mtworkdir/srilm/sbin/generate-program-dependencies ../bin/i686 ../obj/i686 “” testBinaryCounts testHash testProb testXCount testParseFloat testVocabDistance testNgram testNgramAlloc testMultiReadLM hoeffding tolower testLattice testError testNBest testMix testTaggedVocab testVocab ngram ngram-count ngram-merge ngram-class disambig anti-ngram nbest-lattice nbest-mix nbest-optimize nbest-pron-score segment segment-nbest hidden-ngram multi-ngram | sed -e “s&\.o&.o&g” >> Dependencies.i686
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/lm/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/flm/src’
    rm -f Dependencies.i686
    g++ -mtune=pentium3 -Wreturn-type -Wimplicit -DINSTANTIATE_TEMPLATES -D_FILE_OFFSET_BITS=64 -I /usr/include/tcl8.5 -I. -I../../include -MM ./FDiscount.cc ./FNgramStats.cc ./FNgramStatsInt.cc ./FNgramSpecs.cc ./FNgramSpecsInt.cc ./FactoredVocab.cc ./FNgramLM.cc ./ProductVocab.cc ./ProductNgram.cc ./wmatrix.cc ./pngram.cc ./fngram-count.cc ./fngram.cc | sed -e “s&^\([^ ]\)&../obj/i686″‘$(OBJ_OPTION)’”/\1&g” -e “s&\.o&.o&g” >> Dependencies.i686
    /home/lixiang/mtworkdir/srilm/sbin/generate-program-dependencies ../bin/i686 ../obj/i686 “” pngram fngram-count fngram | sed -e “s&\.o&.o&g” >> Dependencies.i686
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/flm/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/lattice/src’
    rm -f Dependencies.i686
    g++ -mtune=pentium3 -Wreturn-type -Wimplicit -DINSTANTIATE_TEMPLATES -D_FILE_OFFSET_BITS=64 -I /usr/include/tcl8.5 -I. -I../../include -MM ./Lattice.cc ./LatticeAlign.cc ./LatticeExpand.cc ./LatticeIndex.cc ./LatticeNBest.cc ./LatticeNgrams.cc ./LatticeReduce.cc ./HTKLattice.cc ./LatticeLM.cc ./LatticeDecode.cc ./testLattice.cc ./lattice-tool.cc | sed -e “s&^\([^ ]\)&../obj/i686″‘$(OBJ_OPTION)’”/\1&g” -e “s&\.o&.o&g” >> Dependencies.i686
    /home/lixiang/mtworkdir/srilm/sbin/generate-program-dependencies ../bin/i686 ../obj/i686 “” testLattice lattice-tool | sed -e “s&\.o&.o&g” >> Dependencies.i686
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/lattice/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/utils/src’
    rm -f Dependencies.i686
    /home/lixiang/mtworkdir/srilm/sbin/generate-program-dependencies ../bin/i686 ../obj/i686 “” | sed -e “s&\.o&.o&g” >> Dependencies.i686
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/utils/src’
    make[1]:正在离开目录 `/home/lixiang/mtworkdir/srilm’
    make release-libraries
    make[1]: 正在进入目录 `/home/lixiang/mtworkdir/srilm’
    for subdir in misc dstruct lm flm lattice utils; do \
    (cd $subdir/src; make SRILM=/home/lixiang/mtworkdir/srilm MACHINE_TYPE=i686 OPTION= MAKE_PIC= release-libraries) || exit 1; \
    done
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/misc/src’
    make[2]: 没有什么可以做的为 `release-libraries’。
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/misc/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/dstruct/src’
    make[2]: 没有什么可以做的为 `release-libraries’。
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/dstruct/src’
    make[2]: 正在进入目录 `/home/lixiang/mtworkdir/srilm/lm/src’
    g++ -mtune=pentium3 -Wreturn-type -Wimplicit -DINSTANTIATE_TEMPLATES -D_FILE_OFFSET_BITS=64 -I /usr/include/tcl8.5 -I. -I../../include -c -g -O3 -o ../obj/i686/NgramLM.o NgramLM.cc
    In file included from Ngram.h:14,
    from NgramLM.cc:36:
    /usr/include/stdio.h:754: error: declaration of C function ‘int fseek(FILE*, __off64_t, int)’ conflicts with
    /usr/include/stdio.h:722: error: previous declaration ‘int fseek(FILE*, long int, int)’ here
    /usr/include/stdio.h:757: error: declaration of C function ‘__off64_t ftell(FILE*)’ conflicts with
    /usr/include/stdio.h:727: error: previous declaration ‘long int ftell(FILE*)’ here
    make[2]: *** [../obj/i686/NgramLM.o] 错误 1
    make[2]:正在离开目录 `/home/lixiang/mtworkdir/srilm/lm/src’
    make[1]: *** [release-libraries] 错误 1
    make[1]:正在离开目录 `/home/lixiang/mtworkdir/srilm’
    make: *** [World] 错误 2

    [回复]

    52nlp 回复:

    这个人的问题和你的似乎是一样的:
    http://www.speech.sri.com/pipermail/srilm-user/2009q4/000794.html
    下一条信息既是他自己给出的解答:
    “I fixed the problem (I had originally set MACHINE_TYPE to i686. I changed it
    to i686-gcc4. ) and managed to compile the whole thing. However I got
    ‘DIFFERS’ for every run of the test suite. ”
    (http://www.speech.sri.com/pipermail/srilm-user/2009q4/000795.html)
    应该是在srilm/MakeFile中将此行“MACHINE_TYPE := $(shell $(SRILM)/sbin/machine-type)”修改为“MACHINE_TYPE := i686-gcc4”,如果test时几乎都出现’DIFFERS’,可以试试它的下一条回复里的办法:
    My guess it that $(SRILM)/bin/i686-gcc4 (where the binaries are
    installed) is not in your PATH, so the tests fail because the binaries
    are not found.

    To work around this you can

    make MACHINE_TYPE=i686-gcc4 try

    in the test directory.
    (http://www.speech.sri.com/pipermail/srilm-user/2009q4/000796.html)

    [回复]

  17. kisonlee on 十二月 18th, 2009 21:51

    请问我做SRILM中,测试结果基本都是DIFFERS,请问什么原因,谢谢

    [回复]

    52nlp 回复:

    如果按上面的方法编译通过的话,可以在test目录里试试:make MACHINE_TYPE=i686-gcc4
    SRILM测试结果基本都是DIFFERS的情况有时候并不是没有编译成功,而是没有找到编译后的可执行文件路径,你可以看看$(SRILM)/bin/及$(SRILM)/bin/i686-gcc4里有无ngram-count及ngram这两个关键的可执行文件,如果有了,基本就可以用了。

    [回复]

    kisonlee 回复:

    $(SRILM)/bin/里面没有,而$(SRILM)/bin/i686-gcc4里面有,请问什么原因,谢谢

    [回复]

    52nlp 回复:

    $(SRILM)/bin/和$(SRILM)/bin/i686-gcc4分别有一些可执行文件,而ngram和ngram-count就在$(SRILM)/bin/i686-gcc4下,昨天没说清楚,不好意思。

    kisonlee 回复:

    那这些都有啊,为什么还是一堆DIFFERS?谢谢,另外,能问下MAIL么,想多多请教,我是SMT的菜鸟,谢谢。

    [回复]

    52nlp 回复:

    测试时可试过这个命令:
    make MACHINE_TYPE=i686-gcc4
    或者在测试之前,改一下声明,例如将:
    export  PATH=$PATH:/home/52nlp/mtworkdir/srilm/bin/i686:/home/52nlp/mtworkdir/srilm/bin
    修改为:
    export  PATH=$PATH:/home/52nlp/mtworkdir/srilm/bin/i686-gcc4:/home/52nlp/mtworkdir/srilm/bin
    测试出错很大的原因是找不到这些可执行文件的路径,不过既然有了ngram和ngram-count,我估计已经编译成功了。
    Mail“关于”里有,52nlpcn at gmail.com。

    kisonlee 回复:

    谢谢,看到满眼的IDENTICA,心花怒放哈,太感谢了。能问你的MSN么?

    [回复]

    52nlp 回复:

    不客气,msn同email。

    kisonlee 回复:

    可是有的地方还是DIFFERS,是啥原因?

    [回复]

    52nlp 回复:

    具体原因我说不上来,不过是允许有少量的DIFFERS,毕竟我们用到的就那么几个,应该没啥问题了。

  18. crisy on 十二月 28th, 2009 10:33

    我又回来了,研究室重装双系统,结果Moses也要重装,又遇到问题了,回来讨教下,嘿嘿,问题如下:
    In file included from InputFileStream.cpp:23:
    gzfilebuf.h:5:18: error: zlib.h: 没有该文件或目录
    In file included from InputFileStream.cpp:23:
    gzfilebuf.h:76: error: ‘gzFile’ does not name a type
    In file included from InputFileStream.cpp:23:
    gzfilebuf.h: In constructor ‘gzfilebuf::gzfilebuf(const char*)’:
    gzfilebuf.h:11: error: ‘_gzf’ was not declared in this scope
    gzfilebuf.h:11: error: ‘gzopen’ was not declared in this scope
    gzfilebuf.h: In destructor ‘virtual gzfilebuf::~gzfilebuf()’:
    gzfilebuf.h:16: error: ‘_gzf’ was not declared in this scope
    gzfilebuf.h:16: error: ‘gzclose’ was not declared in this scope
    gzfilebuf.h: At global scope:
    gzfilebuf.h:18: warning: unused parameter ‘c’
    gzfilebuf.h:24: warning: unused parameter ‘s’
    gzfilebuf.h:24: warning: unused parameter ‘num’
    In file included from InputFileStream.cpp:23:
    gzfilebuf.h:29: warning: unused parameter ‘sp’
    gzfilebuf.h:29: warning: unused parameter ‘which’
    gzfilebuf.h: In member function ‘virtual int gzfilebuf::underflow()’:
    gzfilebuf.h:55: error: ‘_gzf’ was not declared in this scope
    gzfilebuf.h:55: error: ‘gzread’ was not declared in this scope
    gzfilebuf.h: In member function ‘virtual std::streamsize gzfilebuf::xsgetn(char*, std::streamsize)’:
    gzfilebuf.h:72: error: ‘_gzf’ was not declared in this scope
    gzfilebuf.h:72: error: ‘gzread’ was not declared in this scope
    make[3]: *** [InputFileStream.o] 错误 1
    问题跟以前的不太一样,我现在用的是gcc4.4之前的问题加-std=c++0x,也已经加过了,现在又不知道问题处在哪儿了?请求帮助~~!

    [回复]

  19. Crisy on 十二月 28th, 2009 10:45

    呵呵,谢谢,问题解决了,在上次你发给我的Moses-support Error网站上面找到答案了,没有安装zlib-devel rpm。
    感谢~~!:)

    [回复]

    52nlp 回复:

    呵呵,解决就好,一般情况下很多问题别人可能已经遇到和解决过,多用Google!

    [回复]

  20. kisonlee on 一月 5th, 2010 15:54

    在make release 后出现/bin/sh: ./check-dependencies.pl: not found,可是该文件在scripts中啊,看下邮件列表中的,似乎也不能解决问题,或者是我没有看懂解决的办法,谢谢。

    [回复]

    52nlp 回复:

    试试下面这个方法看看:
    I changed the line “@./check-dependencies.pl …” to “perl check-dependencies.pl …” in makefile, result is it worked.

    [回复]

  21. kingstarlcq on 一月 29th, 2010 11:26

    我编译srilm时候最后报这样的错误(ubuntu9.10)
    tclmain.cc:8:17: error: tcl.h: No such file or directory
    我google一下,也对照了你修改 ../common/makefile.machine.i686 文件
    改成:
    TCL_INCLUDE = -I/usr/include/tcl8.4
    TCL_LIBRARY = -L/usr/lib/tcl8.4 -ltcl
    也试过tcl8.5
    不过都报上面的错误,你的tcl应该就是指tclsh吧
    tclsh我装了的
    也试过 sudo apt-get install tcl
    系统报已经安装最新版了
    我实在不知道为什么还是报头文件有问题

    [回复]

  22. kingstarlcq on 一月 29th, 2010 11:27

    我is /usr/lib/tcl*
    系统说没这样的文件

    [回复]

    52nlp 回复:

    如果tcl8.4已经有了,再试着装一个tcl8.4-dev,这个好像是库文件,装完之后看看/usr/include里是否有tcl8.4文件夹,/usr/lib里是否有tclsh8.4。同样,你可以把tcl8.5和tcl8.5-dev装了试试。

    [回复]

  23. tornado on 二月 16th, 2010 20:11

    我和那位kisonlee一样,只是我的$(SRILM)/bin/i686-gcc4下没有ngram和ngram-count可执行文件这种情况要怎么弄啊。

    [回复]

    52nlp 回复:

    没有ngram和ngram-count编译肯定有问题,再查查看,尤其是那些必需的程序都要先装好。

    [回复]

    tornado 回复:

    上面说的要装的我都装了
    zhao@zhao-desktop:~$ sudo apt-get install gcc
    [sudo] password for zhao:
    正在读取软件包列表… 完成
    正在分析软件包的依赖关系树
    正在读取状态信息… 完成
    gcc 已经是最新的版本了。
    共升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 63 个软件未被升级。
    zhao@zhao-desktop:~$ sudo apt-get install gawk
    正在读取软件包列表… 完成
    正在分析软件包的依赖关系树
    正在读取状态信息… 完成
    gawk 已经是最新的版本了。
    共升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 63 个软件未被升级。
    zhao@zhao-desktop:~$ sudo apt-get install gzip
    正在读取软件包列表… 完成
    正在分析软件包的依赖关系树
    正在读取状态信息… 完成
    gzip 已经是最新的版本了。
    共升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 63 个软件未被升级。
    zhao@zhao-desktop:~$ sudo apt-get install bzip2
    正在读取软件包列表… 完成
    正在分析软件包的依赖关系树
    正在读取状态信息… 完成
    bzip2 已经是最新的版本了。
    共升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 63 个软件未被升级。
    zhao@zhao-desktop:~$ sudo apt-get install p7zip
    正在读取软件包列表… 完成
    正在分析软件包的依赖关系树
    正在读取状态信息… 完成
    p7zip 已经是最新的版本了。
    共升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 63 个软件未被升级。
    zhao@zhao-desktop:~$ sudo apt-get install tcl8.5
    正在读取软件包列表… 完成
    正在分析软件包的依赖关系树
    正在读取状态信息… 完成
    tcl8.5 已经是最新的版本了。
    共升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 63 个软件未被升级。
    zhao@zhao-desktop:~$ sudo apt-get install tcl8.5-dev
    正在读取软件包列表… 完成
    正在分析软件包的依赖关系树
    正在读取状态信息… 完成
    tcl8.5-dev 已经是最新的版本了。
    共升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 63 个软件未被升级。
    zhao@zhao-desktop:~$ sudo apt-get install csh
    正在读取软件包列表… 完成
    正在分析软件包的依赖关系树
    正在读取状态信息… 完成
    csh 已经是最新的版本了。
    共升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 63 个软件未被升级。

    我比较菜 在make World的时候有下面这些错误,不知道有没有关系,如果有关系的话怎么改?谢谢
    tools/srilm/lib/i686-gcc4/libmisc.a -L/usr/lib/tcl8.5 -lm 2>&1 | c++filt
    g++: /home/zhao/tools/srilm/lib/i686-gcc4/libmisc.a: 没有该文件或目录
    /home/zhao/tools/srilm/sbin/decipher-install 0555 ../bin/i686-gcc4/segment /home/zhao/tools/srilm/bin/i686-gcc4
    ERROR: File to be installed (../bin/i686-gcc4/segment) does not exist.
    ERROR: File to be installed (../bin/i686-gcc4/segment) is not a plain file.
    Usage: decipher-install …
    mode: file permission mode, in octal
    file1 … fileN: files to be installed
    directory: where the files should be installed

    files = ../bin/i686-gcc4/segment
    directory = /home/zhao/tools/srilm/bin/i686-gcc4
    mode = 0555

    make[2]: [/home/zhao/tools/srilm/bin/i686-gcc4/segment] 错误 1 (忽略)
    g++ -mtune=pentium3 -Wreturn-type -Wimplicit -Wformat -DINSTANTIATE_TEMPLATES -I/user/include/tcl8.5 -I. -I/home/zhao/tools/srilm/include -u matherr -L/home/zhao/tools/srilm/lib/i686-gcc4 -g -O3 -o ../bin/i686-gcc4/segment-nbest ../obj/i686-gcc4/segment-nbest.o ../obj/i686-gcc4/liboolm.a -lm -ldl /home/zhao/tools/srilm/lib/i686-gcc4/libflm.a /home/zhao/tools/srilm/lib/i686-gcc4/libdstruct.a /home/zhao/tools/srilm/lib/i686-gcc4/libmisc.a -L/usr/lib/tcl8.5 -lm 2>&1 | c++filt
    g++: /home/zhao/tools/srilm/lib/i686-gcc4/libmisc.a: 没有该文件或目录
    /home/zhao/tools/srilm/sbin/decipher-install 0555 ../bin/i686-gcc4/segment-nbest /home/zhao/tools/srilm/bin/i686-gcc4
    ERROR: File to be installed (../bin/i686-gcc4/segment-nbest) does not exist.
    ERROR: File to be installed (../bin/i686-gcc4/segment-nbest) is not a plain file.
    Usage: decipher-install …
    mode: file permission mode, in octal
    file1 … fileN: files to be installed
    directory: where the files should be installed

    files = ../bin/i686-gcc4/segment-nbest
    directory = /home/zhao/tools/srilm/bin/i686-gcc4
    mode = 0555

    make[2]: [/home/zhao/tools/srilm/bin/i686-gcc4/segment-nbest] 错误 1 (忽略)
    g++ -mtune=pentium3 -Wreturn-type -Wimplicit -Wformat -DINSTANTIATE_TEMPLATES -I/user/include/tcl8.5 -I. -I/home/zhao/tools/srilm/include -u matherr -L/home/zhao/tools/srilm/lib/i686-gcc4 -g -O3 -o ../bin/i686-gcc4/hidden-ngram ../obj/i686-gcc4/hidden-ngram.o ../obj/i686-gcc4/liboolm.a -lm -ldl /home/zhao/tools/srilm/lib/i686-gcc4/libflm.a /home/zhao/tools/srilm/lib/i686-gcc4/libdstruct.a /home/zhao/tools/srilm/lib/i686-gcc4/libmisc.a -L/usr/lib/tcl8.5 -lm 2>&1 | c++filt
    g++: /home/zhao/tools/srilm/lib/i686-gcc4/libmisc.a: 没有该文件或目录
    /home/zhao/tools/srilm/sbin/decipher-install 0555 ../bin/i686-gcc4/hidden-ngram /home/zhao/tools/srilm/bin/i686-gcc4
    ERROR: File to be installed (../bin/i686-gcc4/hidden-ngram) does not exist.
    ERROR: File to be installed (../bin/i686-gcc4/hidden-ngram) is not a plain file.
    Usage: decipher-install …
    mode: file permission mode, in octal
    file1 … fileN: files to be installed
    directory: where the files should be installed

    files = ../bin/i686-gcc4/hidden-ngram
    directory = /home/zhao/tools/srilm/bin/i686-gcc4
    mode = 0555

    make[2]: [/home/zhao/tools/srilm/bin/i686-gcc4/hidden-ngram] 错误 1 (忽略)
    g++ -mtune=pentium3 -Wreturn-type -Wimplicit -Wformat -DINSTANTIATE_TEMPLATES -I/user/include/tcl8.5 -I. -I/home/zhao/tools/srilm/include -u matherr -L/home/zhao/tools/srilm/lib/i686-gcc4 -g -O3 -o ../bin/i686-gcc4/multi-ngram ../obj/i686-gcc4/multi-ngram.o ../obj/i686-gcc4/liboolm.a -lm -ldl /home/zhao/tools/srilm/lib/i686-gcc4/libflm.a /home/zhao/tools/srilm/lib/i686-gcc4/libdstruct.a /home/zhao/tools/srilm/lib/i686-gcc4/libmisc.a -L/usr/lib/tcl8.5 -lm 2>&1 | c++filt
    g++: /home/zhao/tools/srilm/lib/i686-gcc4/libmisc.a: 没有该文件或目录
    /home/zhao/tools/srilm/sbin/decipher-install 0555 ../bin/i686-gcc4/multi-ngram /home/zhao/tools/srilm/bin/i686-gcc4
    ERROR: File to be installed (../bin/i686-gcc4/multi-ngram) does not exist.
    ERROR: File to be installed (../bin/i686-gcc4/multi-ngram) is not a plain file.
    Usage: decipher-install …
    mode: file permission mode, in octal
    file1 … fileN: files to be installed
    directory: where the files should be installed

    files = ../bin/i686-gcc4/multi-ngram
    directory = /home/zhao/tools/srilm/bin/i686-gcc4
    mode = 0555

    make[2]: [/home/zhao/tools/srilm/bin/i686-gcc4/multi-ngram] 错误 1 (忽略)
    make[2]:正在离开目录 `/home/zhao/tools/srilm/lm/src’
    make[2]: 正在进入目录 `/home/zhao/tools/srilm/flm/src’
    g++ -mtune=pentium3 -Wreturn-type -Wimplicit -Wformat -DINSTANTIATE_TEMPLATES -I/user/include/tcl8.5 -I. -I/home/zhao/tools/srilm/include -u matherr -L/home/zhao/tools/srilm/lib/i686-gcc4 -g -O3 -o ../bin/i686-gcc4/fngram-count ../obj/i686-gcc4/fngram-count.o ../obj/i686-gcc4/libflm.a -lm -ldl /home/zhao/tools/srilm/lib/i686-gcc4/liboolm.a /home/zhao/tools/srilm/lib/i686-gcc4/libdstruct.a /home/zhao/tools/srilm/lib/i686-gcc4/libmisc.a -L/usr/lib/tcl8.5 -lm 2>&1 | c++filt
    g++: /home/zhao/tools/srilm/lib/i686-gcc4/libmisc.a: 没有该文件或目录
    /home/zhao/tools/srilm/sbin/decipher-install 0555 ../bin/i686-gcc4/fngram-count /home/zhao/tools/srilm/bin/i686-gcc4
    ERROR: File to be installed (../bin/i686-gcc4/fngram-count) does not exist.
    ERROR: File to be installed (../bin/i686-gcc4/fngram-count) is not a plain file.
    Usage: decipher-install …
    mode: file permission mode, in octal
    file1 … fileN: files to be installed
    directory: where the files should be installed

    files = ../bin/i686-gcc4/fngram-count
    directory = /home/zhao/tools/srilm/bin/i686-gcc4
    mode = 0555

    make[2]: [/home/zhao/tools/srilm/bin/i686-gcc4/fngram-count] 错误 1 (忽略)
    g++ -mtune=pentium3 -Wreturn-type -Wimplicit -Wformat -DINSTANTIATE_TEMPLATES -I/user/include/tcl8.5 -I. -I/home/zhao/tools/srilm/include -u matherr -L/home/zhao/tools/srilm/lib/i686-gcc4 -g -O3 -o ../bin/i686-gcc4/fngram ../obj/i686-gcc4/fngram.o ../obj/i686-gcc4/libflm.a -lm -ldl /home/zhao/tools/srilm/lib/i686-gcc4/liboolm.a /home/zhao/tools/srilm/lib/i686-gcc4/libdstruct.a /home/zhao/tools/srilm/lib/i686-gcc4/libmisc.a -L/usr/lib/tcl8.5 -lm 2>&1 | c++filt
    g++: /home/zhao/tools/srilm/lib/i686-gcc4/libmisc.a: 没有该文件或目录
    /home/zhao/tools/srilm/sbin/decipher-install 0555 ../bin/i686-gcc4/fngram /home/zhao/tools/srilm/bin/i686-gcc4
    ERROR: File to be installed (../bin/i686-gcc4/fngram) does not exist.
    ERROR: File to be installed (../bin/i686-gcc4/fngram) is not a plain file.
    Usage: decipher-install …
    mode: file permission mode, in octal
    file1 … fileN: files to be installed
    directory: where the files should be installed

    files = ../bin/i686-gcc4/fngram
    directory = /home/zhao/tools/srilm/bin/i686-gcc4
    mode = 0555

    make[2]: [/home/zhao/tools/srilm/bin/i686-gcc4/fngram] 错误 1 (忽略)
    make[2]:正在离开目录 `/home/zhao/tools/srilm/flm/src’
    make[2]: 正在进入目录 `/home/zhao/tools/srilm/lattice/src’
    make[2]: *** 没有规则可以创建“../bin/i686-gcc4/lattice-tool”需要的目标“/home/zhao/tools/srilm/lib/i686-gcc4/libmisc.a”。 停止。

    [回复]

    tornado 回复:

    终于装好了。原来是gcc和g++的安装路径不对,以前看网上的说明都说那个地方不用改,我就没改。。。当时也不知道是什么意思。现在知道了。。谢谢。

    52nlp 回复:

    不好意思,今天才回来。自己搞定就好了,这个过程也能体会到许多东西。

  24. yuejp on 五月 13th, 2010 01:57

    我在按照以上方法编译moses时,当执行make -j 4后遇到了以下问题:
    cd . && /bin/bash /root/mtworkdir/moses/missing –run autoheader
    rm -f stamp-h1
    touch config.h.in
    cd . && /bin/bash ./config.status config.h
    config.status: creating config.h
    config.status: config.h is unchanged
    make all-recursive
    make[1]: 正在进入目录 `/root/mtworkdir/moses’
    Making all in moses/src
    make[2]: 正在进入目录 `/root/mtworkdir/moses/moses/src’
    make all-am
    make[3]: 正在进入目录 `/root/mtworkdir/moses/moses/src’
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT AlignmentInfo.lo -MD -MP -MF .deps/AlignmentInfo.Tpo -c -o AlignmentInfo.lo AlignmentInfo.cpp
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT BitmapContainer.lo -MD -MP -MF .deps/BitmapContainer.Tpo -c -o BitmapContainer.lo BitmapContainer.cpp
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT TreeInput.lo -MD -MP -MF .deps/TreeInput.Tpo -c -o TreeInput.lo TreeInput.cpp
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT ChartRule.lo -MD -MP -MF .deps/ChartRule.Tpo -c -o ChartRule.lo ChartRule.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT TreeInput.lo -MD -MP -MF .deps/TreeInput.Tpo -c TreeInput.cpp -o TreeInput.o
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT BitmapContainer.lo -MD -MP -MF .deps/BitmapContainer.Tpo -c BitmapContainer.cpp -o BitmapContainer.o
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT ChartRule.lo -MD -MP -MF .deps/ChartRule.Tpo -c ChartRule.cpp -o ChartRule.o
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT AlignmentInfo.lo -MD -MP -MF .deps/AlignmentInfo.Tpo -c AlignmentInfo.cpp -o AlignmentInfo.o
    mv -f .deps/AlignmentInfo.Tpo .deps/AlignmentInfo.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT ChartRuleCollection.lo -MD -MP -MF .deps/ChartRuleCollection.Tpo -c -o ChartRuleCollection.lo ChartRuleCollection.cpp
    TreeInput.cpp: In member function ‘bool Moses::TreeInput::ProcessAndStripXMLTags(std::string&, std::vector<Moses::XMLParseOutput, std::allocator >&)’:
    TreeInput.cpp:48: 警告: 未使用的变量‘outputFactorOrder’
    TreeInput.cpp:49: 警告: 未使用的变量‘factorDelimiter’
    TreeInput.cpp: In member function ‘virtual int Moses::TreeInput::Read(std::istream&, const std::vector<unsigned int, std::allocator >&)’:
    TreeInput.cpp:205: 警告: 未使用的变量‘factorDelimiter’
    TreeInput.cpp: At global scope:
    TreeInput.cpp:267: 警告: 未使用的参数‘factorOrder’
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT ChartRuleCollection.lo -MD -MP -MF .deps/ChartRuleCollection.Tpo -c ChartRuleCollection.cpp -o ChartRuleCollection.o
    mv -f .deps/ChartRule.Tpo .deps/ChartRule.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT ConfusionNet.lo -MD -MP -MF .deps/ConfusionNet.Tpo -c -o ConfusionNet.lo ConfusionNet.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT ConfusionNet.lo -MD -MP -MF .deps/ConfusionNet.Tpo -c ConfusionNet.cpp -o ConfusionNet.o
    ConfusionNet.cpp:214: 警告: 未使用的参数‘factorsToPrint’
    mv -f .deps/ChartRuleCollection.Tpo .deps/ChartRuleCollection.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DecodeGraph.lo -MD -MP -MF .deps/DecodeGraph.Tpo -c -o DecodeGraph.lo DecodeGraph.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DecodeGraph.lo -MD -MP -MF .deps/DecodeGraph.Tpo -c DecodeGraph.cpp -o DecodeGraph.o
    mv -f .deps/TreeInput.Tpo .deps/TreeInput.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DecodeStep.lo -MD -MP -MF .deps/DecodeStep.Tpo -c -o DecodeStep.lo DecodeStep.cpp
    mv -f .deps/DecodeGraph.Tpo .deps/DecodeGraph.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DecodeStepGeneration.lo -MD -MP -MF .deps/DecodeStepGeneration.Tpo -c -o DecodeStepGeneration.lo DecodeStepGeneration.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DecodeStep.lo -MD -MP -MF .deps/DecodeStep.Tpo -c DecodeStep.cpp -o DecodeStep.o
    mv -f .deps/BitmapContainer.Tpo .deps/BitmapContainer.Plo
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DecodeStepGeneration.lo -MD -MP -MF .deps/DecodeStepGeneration.Tpo -c DecodeStepGeneration.cpp -o DecodeStepGeneration.o
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DecodeStepTranslation.lo -MD -MP -MF .deps/DecodeStepTranslation.Tpo -c -o DecodeStepTranslation.lo DecodeStepTranslation.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DecodeStepTranslation.lo -MD -MP -MF .deps/DecodeStepTranslation.Tpo -c DecodeStepTranslation.cpp -o DecodeStepTranslation.o
    mv -f .deps/ConfusionNet.Tpo .deps/ConfusionNet.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT Dictionary.lo -MD -MP -MF .deps/Dictionary.Tpo -c -o Dictionary.lo Dictionary.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT Dictionary.lo -MD -MP -MF .deps/Dictionary.Tpo -c Dictionary.cpp -o Dictionary.o
    mv -f .deps/DecodeStep.Tpo .deps/DecodeStep.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DotChart.lo -MD -MP -MF .deps/DotChart.Tpo -c -o DotChart.lo DotChart.cpp
    mv -f .deps/DecodeStepTranslation.Tpo .deps/DecodeStepTranslation.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DotChartOnDisk.lo -MD -MP -MF .deps/DotChartOnDisk.Tpo -c -o DotChartOnDisk.lo DotChartOnDisk.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DotChart.lo -MD -MP -MF .deps/DotChart.Tpo -c DotChart.cpp -o DotChart.o
    mv -f .deps/DecodeStepGeneration.Tpo .deps/DecodeStepGeneration.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DummyScoreProducers.lo -MD -MP -MF .deps/DummyScoreProducers.Tpo -c -o DummyScoreProducers.lo DummyScoreProducers.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DummyScoreProducers.lo -MD -MP -MF .deps/DummyScoreProducers.Tpo -c DummyScoreProducers.cpp -o DummyScoreProducers.o
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DotChartOnDisk.lo -MD -MP -MF .deps/DotChartOnDisk.Tpo -c DotChartOnDisk.cpp -o DotChartOnDisk.o
    mv -f .deps/Dictionary.Tpo .deps/Dictionary.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT file.lo -MD -MP -MF .deps/file.Tpo -c -o file.lo `test -f ‘DynSAInclude/file.cpp’ || echo ‘./’`DynSAInclude/file.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT file.lo -MD -MP -MF .deps/file.Tpo -c DynSAInclude/file.cpp -o file.o
    DotChart.cpp: In function ‘std::ostream& Moses::operator<<(std::ostream&, const Moses::ProcessedRule&)’:
    DotChart.cpp:45: 警告: 未使用的变量‘node’
    mv -f .deps/DummyScoreProducers.Tpo .deps/DummyScoreProducers.Plo
    In file included from ../../OnDiskPt/src/PhraseNode.h:13,
    from DotChartOnDisk.cpp:24:
    ../../OnDiskPt/src/Word.h: In constructor ‘OnDiskPt::Word::Word(size_t, bool)’:
    ../../OnDiskPt/src/Word.h:30: 警告: ‘OnDiskPt::Word::m_factors’将随后被初始化
    ../../OnDiskPt/src/Word.h:29: 警告: ‘bool OnDiskPt::Word::m_isNonTerminal’
    ../../OnDiskPt/src/Word.h:36: 警告: 当在这里初始化时
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT vocab.lo -MD -MP -MF .deps/vocab.Tpo -c -o vocab.lo `test -f 'DynSAInclude/vocab.cpp' || echo './'`DynSAInclude/vocab.cpp
    DotChartOnDisk.cpp: At global scope:
    DotChartOnDisk.cpp:60: 警告: 未使用的参数‘rule’
    mv -f .deps/DotChart.Tpo .deps/DotChart.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DynSuffixArray.lo -MD -MP -MF .deps/DynSuffixArray.Tpo -c -o DynSuffixArray.lo DynSuffixArray.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT vocab.lo -MD -MP -MF .deps/vocab.Tpo -c DynSAInclude/vocab.cpp -o vocab.o
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT DynSuffixArray.lo -MD -MP -MF .deps/DynSuffixArray.Tpo -c DynSuffixArray.cpp -o DynSuffixArray.o
    DynSAInclude/file.cpp:18: 警告: 未使用的参数‘checkExists’
    DynSuffixArray.cpp:172: 警告: 未使用的参数‘newSents’
    DynSuffixArray.cpp:172: 警告: 未使用的参数‘newIndex’
    In file included from DynSAInclude/vocab.cpp:2:
    DynSAInclude/vocab.h:58: 警告: 忽略函数返回类型的类型限定
    DynSAInclude/vocab.h:59: 警告: 忽略函数返回类型的类型限定
    DynSAInclude/vocab.cpp: In member function ‘wordID_t Moses::Vocab::GetWordID(const Moses::Word&)’:
    DynSAInclude/vocab.cpp:49: 警告: 建议显式地使用花括号以避免出现有歧义的‘else’
    mv -f .deps/DotChartOnDisk.Tpo .deps/DotChartOnDisk.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT BilingualDynSuffixArray.lo -MD -MP -MF .deps/BilingualDynSuffixArray.Tpo -c -o BilingualDynSuffixArray.lo BilingualDynSuffixArray.cpp
    mv -f .deps/file.Tpo .deps/file.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT Factor.lo -MD -MP -MF .deps/Factor.Tpo -c -o Factor.lo Factor.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT BilingualDynSuffixArray.lo -MD -MP -MF .deps/BilingualDynSuffixArray.Tpo -c BilingualDynSuffixArray.cpp -o BilingualDynSuffixArray.o
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT Factor.lo -MD -MP -MF .deps/Factor.Tpo -c Factor.cpp -o Factor.o
    Factor.cpp:28: 警告: 未使用的参数‘direction’
    Factor.cpp:28: 警告: 未使用的参数‘factorType’
    Factor.cpp:35: 警告: 未使用的参数‘direction’
    Factor.cpp:35: 警告: 未使用的参数‘factorType’
    mv -f .deps/Factor.Tpo .deps/Factor.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT FactorCollection.lo -MD -MP -MF .deps/FactorCollection.Tpo -c -o FactorCollection.lo FactorCollection.cpp
    In file included from BilingualDynSuffixArray.h:6,
    from BilingualDynSuffixArray.cpp:1:
    DynSAInclude/vocab.h:58: 警告: 忽略函数返回类型的类型限定
    DynSAInclude/vocab.h:59: 警告: 忽略函数返回类型的类型限定
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT FactorCollection.lo -MD -MP -MF .deps/FactorCollection.Tpo -c FactorCollection.cpp -o FactorCollection.o
    mv -f .deps/DynSuffixArray.Tpo .deps/DynSuffixArray.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT FactorTypeSet.lo -MD -MP -MF .deps/FactorTypeSet.Tpo -c -o FactorTypeSet.lo FactorTypeSet.cpp
    mv -f .deps/vocab.Tpo .deps/vocab.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT FeatureFunction.lo -MD -MP -MF .deps/FeatureFunction.Tpo -c -o FeatureFunction.lo FeatureFunction.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT FactorTypeSet.lo -MD -MP -MF .deps/FactorTypeSet.Tpo -c FactorTypeSet.cpp -o FactorTypeSet.o
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT FeatureFunction.lo -MD -MP -MF .deps/FeatureFunction.Tpo -c FeatureFunction.cpp -o FeatureFunction.o
    FeatureFunction.cpp:15: 警告: 未使用的参数‘cur_hypo’
    FeatureFunction.cpp:15: 警告: 未使用的参数‘accumulator’
    mv -f .deps/FeatureFunction.Tpo .deps/FeatureFunction.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT FFState.lo -MD -MP -MF .deps/FFState.Tpo -c -o FFState.lo FFState.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT FFState.lo -MD -MP -MF .deps/FFState.Tpo -c FFState.cpp -o FFState.o
    mv -f .deps/FactorTypeSet.Tpo .deps/FactorTypeSet.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT FloydWarshall.lo -MD -MP -MF .deps/FloydWarshall.Tpo -c -o FloydWarshall.lo FloydWarshall.cpp
    mv -f .deps/FFState.Tpo .deps/FFState.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT GenerationDictionary.lo -MD -MP -MF .deps/GenerationDictionary.Tpo -c -o GenerationDictionary.lo GenerationDictionary.cpp
    mv -f .deps/FactorCollection.Tpo .deps/FactorCollection.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT GlobalLexicalModel.lo -MD -MP -MF .deps/GlobalLexicalModel.Tpo -c -o GlobalLexicalModel.lo GlobalLexicalModel.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT GenerationDictionary.lo -MD -MP -MF .deps/GenerationDictionary.Tpo -c GenerationDictionary.cpp -o GenerationDictionary.o
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT FloydWarshall.lo -MD -MP -MF .deps/FloydWarshall.Tpo -c FloydWarshall.cpp -o FloydWarshall.o
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT GlobalLexicalModel.lo -MD -MP -MF .deps/GlobalLexicalModel.Tpo -c GlobalLexicalModel.cpp -o GlobalLexicalModel.o
    mv -f .deps/FloydWarshall.Tpo .deps/FloydWarshall.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT hash.lo -MD -MP -MF .deps/hash.Tpo -c -o hash.lo hash.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT hash.lo -MD -MP -MF .deps/hash.Tpo -c hash.cpp -o hash.o
    mv -f .deps/hash.Tpo .deps/hash.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT Hypothesis.lo -MD -MP -MF .deps/Hypothesis.Tpo -c -o Hypothesis.lo Hypothesis.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT Hypothesis.lo -MD -MP -MF .deps/Hypothesis.Tpo -c Hypothesis.cpp -o Hypothesis.o
    mv -f .deps/GenerationDictionary.Tpo .deps/GenerationDictionary.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT HypothesisStack.lo -MD -MP -MF .deps/HypothesisStack.Tpo -c -o HypothesisStack.lo HypothesisStack.cpp
    mv -f .deps/BilingualDynSuffixArray.Tpo .deps/BilingualDynSuffixArray.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT HypothesisStackCubePruning.lo -MD -MP -MF .deps/HypothesisStackCubePruning.Tpo -c -o HypothesisStackCubePruning.lo HypothesisStackCubePruning.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT HypothesisStack.lo -MD -MP -MF .deps/HypothesisStack.Tpo -c HypothesisStack.cpp -o HypothesisStack.o
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT HypothesisStackCubePruning.lo -MD -MP -MF .deps/HypothesisStackCubePruning.Tpo -c HypothesisStackCubePruning.cpp -o HypothesisStackCubePruning.o
    mv -f .deps/GlobalLexicalModel.Tpo .deps/GlobalLexicalModel.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT HypothesisStackNormal.lo -MD -MP -MF .deps/HypothesisStackNormal.Tpo -c -o HypothesisStackNormal.lo HypothesisStackNormal.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT HypothesisStackNormal.lo -MD -MP -MF .deps/HypothesisStackNormal.Tpo -c HypothesisStackNormal.cpp -o HypothesisStackNormal.o
    mv -f .deps/HypothesisStack.Tpo .deps/HypothesisStack.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT InputType.lo -MD -MP -MF .deps/InputType.Tpo -c -o InputType.lo InputType.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT InputType.lo -MD -MP -MF .deps/InputType.Tpo -c InputType.cpp -o InputType.o
    mv -f .deps/Hypothesis.Tpo .deps/Hypothesis.Plo
    /bin/bash ../../libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT InputFileStream.lo -MD -MP -MF .deps/InputFileStream.Tpo -c -o InputFileStream.lo InputFileStream.cpp
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DTRACE_ENABLE=1 -I/root/mtworkdir/srilm/include -g -O2 -MT InputFileStream.lo -MD -MP -MF .deps/InputFileStream.Tpo -c InputFileStream.cpp -o InputFileStream.o
    在包含自 InputFileStream.cpp:23 的文件中:
    gzfilebuf.h:5:18: 错误: zlib.h:没有该文件或目录
    In file included from InputFileStream.cpp:23:
    gzfilebuf.h:76: 错误: ‘gzFile’没有命名一个类型
    gzfilebuf.h: In constructor ‘gzfilebuf::gzfilebuf(const char*)’:
    gzfilebuf.h:11: 错误: ‘_gzf’在此作用域中尚未声明
    gzfilebuf.h:11: 错误: ‘gzopen’在此作用域中尚未声明
    gzfilebuf.h: In destructor ‘virtual gzfilebuf::~gzfilebuf()’:
    gzfilebuf.h:16: 错误: ‘_gzf’在此作用域中尚未声明
    gzfilebuf.h:16: 错误: ‘gzclose’在此作用域中尚未声明
    gzfilebuf.h: At global scope:
    gzfilebuf.h:18: 警告: 未使用的参数‘c’
    gzfilebuf.h:25: 警告: 未使用的参数‘s’
    gzfilebuf.h:25: 警告: 未使用的参数‘num’
    gzfilebuf.h:29: 警告: 未使用的参数‘sp’
    gzfilebuf.h:29: 警告: 未使用的参数‘which’
    gzfilebuf.h: In member function ‘virtual int gzfilebuf::underflow()’:
    gzfilebuf.h:55: 错误: ‘_gzf’在此作用域中尚未声明
    gzfilebuf.h:55: 错误: ‘gzread’在此作用域中尚未声明
    gzfilebuf.h: In member function ‘virtual std::streamsize gzfilebuf::xsgetn(char*, std::streamsize)’:
    gzfilebuf.h:72: 错误: ‘_gzf’在此作用域中尚未声明
    gzfilebuf.h:72: 错误: ‘gzread’在此作用域中尚未声明
    make[3]: *** [InputFileStream.lo] 错误 1
    make[3]: *** 正在等待未完成的任务….
    mv -f .deps/InputType.Tpo .deps/InputType.Plo
    mv -f .deps/HypothesisStackCubePruning.Tpo .deps/HypothesisStackCubePruning.Plo
    mv -f .deps/HypothesisStackNormal.Tpo .deps/HypothesisStackNormal.Plo
    make[3]:正在离开目录 `/root/mtworkdir/moses/moses/src'
    make[2]: *** [all] 错误 2
    make[2]:正在离开目录 `/root/mtworkdir/moses/moses/src'
    make[1]: *** [all-recursive] 错误 1
    make[1]:正在离开目录 `/root/mtworkdir/moses'
    make: *** [all] 错误 2

    不知道问题处在哪儿了?请求您帮帮我啊!

    [回复]

    52nlp 回复:

    第一个错误提示:
    gzfilebuf.h:5:18: 错误: zlib.h:没有该文件或目录

    没有zlib.h这个文件,试着装一下:zlib1g-dev

    [回复]

    yuejp 回复:

    好像可以啦,就是有不少警告信息,但已经没有错误信息啦,真的是太感谢您了!谢谢您的指点!!!

    [回复]

  25. yuejp on 五月 14th, 2010 00:28

    还要问您一下:部署完moses后进行短语抽取时要用以下命令:
    /home/user/MT/moses/scripts/target/scripts-20100105-1600/training/train-factored-phrase-model.perl

    -scripts-root-dir /home/user/moses/scripts/target/scripts-20100105-1600

    -root-dir /home/user/MT/moses/data/

    -corpus /home/user/MT/moses/data/train -e eng -f chn -max-phrase-length 10

    -alignment-factors 0-0

    -translation-factors 0-0

    -reordering msd-fe

    -reordering-factors 0-0

    -generation-factors 0-0

    -lm 0:5:/home/user/moses/data/train.chn.gz

    为什么在我的对应目录里找不到train-factored-phrase-model.perl呢?只要train-model.perl,您看这是什么原因呢?多谢啦!!

    [回复]

    52nlp 回复:

    如果安装正常的话,应该有这个的,再找找或者重新安装Moses的训练脚本。

    [回复]

  26. yuejp on 五月 16th, 2010 17:55

    最近在跑moses时,在用最小错误率调整moses参数时出现了这样一个问题:

    输入下面的命令:

    root@yuejp-laptop:~/smts/bin/moses-scripts/scripts-20100515-1530/training# /root/smts/bin/moses-scripts/scripts-20100515-1530/training/mert-moses.pl /root/smts/bin/moses-scripts/scripts-20100515-1530/training/src /root/smts/bin/moses-scripts/scripts-20100515-1530/training/reference /root/smts/moses/moses-cmd/src/moses /root/smts/bin/moses-scripts/scripts-20100515-1530/training/model/moses.ini –rootdir /root/smts/bin/moses-scripts/scripts-20100515-1530/ –working-dir . –nbest 1000

    却出现了下面的问题:

    After default: -l mem_free=0.5G -hard
    Using SCRIPTS_ROOTDIR: /root/smts/bin/moses-scripts/scripts-20100515-1530/
    checking weight-count for ttable-file
    checking weight-count for generation-file
    checking weight-count for lmodel-file
    checking weight-count for distortion-file
    moses.ini: You defined 1 files for generation but use 0 in [mapping]!

    您看这是什么原因呢?您遇到过这个问题吗?多谢啦!!

    [回复]

  27. 52nlp on 五月 16th, 2010 23:53

    问题出在这一行:
    moses.ini: You defined 1 files for generation but use 0 in [mapping]!

    但是具体情况我也不太清楚,好久没碰moses了,有点忘了,抱歉。

    [回复]

  28. yuejp on 五月 17th, 2010 01:07

    不好意思,问题已经找到,是路径弄错啦,谢谢!

    [回复]

  29. yuejp on 五月 17th, 2010 01:10

    请问训练后如何用生成的moses.ini文件,进行翻译,进而得到result.txt文件

    [回复]

    52nlp 回复:

    建议再看一下ACL2010中统计机器翻译workshop的baseline:
    http://www.statmt.org/wmt10/baseline.html
    可以模仿“Run System on Development Test Set”这一部分,最简单的方法就是直接利用Moses进行解码,其中的config部分就利用了moses.ini:
    moses/moses-cmd/src/moses -config working-dir/evaluation/filtered.devtest2006/moses.ini -input-file working-dir/evaluation/devtest2006.input > working-dir/evaluation/devtest2006.output

    [回复]

  30. tornado on 五月 19th, 2010 12:35

    我在安装解码器Moses及相关脚本的时候
    在  ./regenerate-makefiles.sh 这一步后出现错误
    zhao@zhao-desktop:~/moses$ ./regenerate-makefiles.sh
    Calling …
    ./regenerate-makefiles.sh: line 40: -I:找不到命令
    aclocal failed
    这是怎么回事啊
    regenerate-makefiles.sh: line 40里是
    $ACLOCAL -I m4 || die “aclocal failed”
    m4是什么意思?
    之后我硬着头皮运行./configure –with-srilm=/home/52nlp/mtworkdir/srilm
    的时候
    出现
    zhao@zhao-desktop:~/moses$ ./configure -with-srilm=/home/zhao/srilm
    bash: ./configure: 没有该文件或目录
    请您帮我看看。 谢谢

    [回复]

    52nlp 回复:

    需要安装automake和aclocal.

    [回复]

  31. kemi on 六月 11th, 2010 21:40

    我在安装解码器Moses及相关脚本的时候
    在  ./regenerate-makefiles.sh 这一步后出现错误

    Calling /usr/bin/aclocal…
    Calling /usr/bin/autoconf…
    Calling /usr/bin/automake…
    OnDiskPt/src/Makefile.am:1: library used but `RANLIB’ is undefined
    OnDiskPt/src/Makefile.am:1: The usual way to define `RANLIB’ is to add `AC_PROG_RANLIB’
    OnDiskPt/src/Makefile.am:1: to `configure.in’ and run `autoconf’ again.
    moses-chart/src/Makefile.am:1: library used but `RANLIB’ is undefined
    moses-chart/src/Makefile.am:1: The usual way to define `RANLIB’ is to add `AC_PROG_RANLIB’
    moses-chart/src/Makefile.am:1: to `configure.in’ and run `autoconf’ again.
    moses/src/Makefile.am:1: Libtool library used but `LIBTOOL’ is undefined
    moses/src/Makefile.am:1: The usual way to define `LIBTOOL’ is to add `AC_PROG_LIBTOOL’
    moses/src/Makefile.am:1: to `configure.in’ and run `aclocal’ and `autoconf’ again.
    moses/src/Makefile.am:1: If `AC_PROG_LIBTOOL’ is in `configure.in’, make sure
    moses/src/Makefile.am:1: its definition is in aclocal’s search path.
    automake failed

    然后继续执行./configure –with-srilm=/home/52nlp/mtworkdir/srilm
    又出现了以下的情况
    checking for a BSD-compatible install… /usr/bin/install -c
    checking whether build environment is sane… yes
    checking for a thread-safe mkdir -p… /bin/mkdir -p
    checking for gawk… gawk
    checking whether make sets $(MAKE)… yes
    checking for g++… g++
    checking for C++ compiler default output file name… a.out
    checking whether the C++ compiler works… yes
    checking whether we are cross compiling… no
    checking for suffix of executables…
    checking for suffix of object files… o
    checking whether we are using the GNU C++ compiler… yes
    checking whether g++ accepts -g… yes
    checking for style of include used by make… GNU
    checking dependency style of g++… gcc3
    checking how to run the C++ preprocessor… g++ -E
    ./configure: line 3281: AC_DISABLE_SHARED: command not found
    ./configure: line 3282: AC_PROG_LIBTOOL: command not found
    checking for XMLRPC-C… ignored
    configure: trace enabled (default)
    configure: Building non-threaded moses. This will disable the moses server
    checking Ngram.h usability… yes
    checking Ngram.h presence… yes
    checking for Ngram.h… yes
    checking for trigram_init in -loolm… yes
    checking getopt.h usability… yes
    checking getopt.h presence… yes
    checking for getopt.h… yes
    configure: Disabling server
    configure: creating ./config.status
    config.status: error: cannot find input file: Makefile.in

    请教一下是出现了什么情况,应该如何解决呢,谢谢了

    [回复]

    kemi 回复:

    我换用了moses 2008-7-11的版本之后
    ./regenerate-makefiles.sh
    ./configure –with-srilm=/home/52nlp/mtworkdir/srilm
    这两个命令可以编译通过了

    但是在执行make -j 4命令的时候又出现以下的错误
    In file included from FactorTypeSet.h:28,
    from Dictionary.h:25,
    from DecodeStep.h:26,
    from DecodeGraph.cpp:24:
    Util.h: In function ‘T Scan(const std::string&) [with T = int]’:
    Util.h:76: 错误: ‘atoi’在此作用域中尚未声明
    Util.h: In function ‘T Scan(const std::string&) [with T = float]’:
    Util.h:83: 错误: ‘atof’在此作用域中尚未声明
    In file included from Factor.h:31,
    from Word.h:28,
    from ConfusionNet.h:7,
    from ConfusionNet.cpp:3:
    Util.h: In function ‘T Scan(const std::string&) [with T = int]’:
    Util.h:76: 错误: ‘atoi’在此作用域中尚未声明In file included from FactorTypeSet.h:28,
    from Dictionary.h:25,
    from DecodeStep.h:26,
    from DecodeStep.cpp:22:
    Util.h: In function ‘T Scan(const std::string&) [with T = int]’:
    Util.h:76: 错误: ‘atoi’在此作用域中尚未声明
    Util.h: In function ‘T Scan(const std::string&) [with T = float]’:
    Util.h:83: 错误: ‘atof’在此作用域中尚未声明

    Util.h: In function ‘T Scan(const std::string&) [with T = float]’:
    Util.h:83: 错误: ‘atof’在此作用域中尚未声明
    In file included from ConfusionNet.h:7,
    from ConfusionNet.cpp:3:
    Word.h: In copy constructor ‘Word::Word(const Word&)’:
    Word.h:49: 错误: ‘memcpy’不是‘std’的成员
    Word.h: In constructor ‘Word::Word()’:
    Word.h:54: 错误: ‘memset’不是‘std’的成员
    In file included from Phrase.h:30,
    from InputType.h:27,
    from ConfusionNet.h:8,
    from ConfusionNet.cpp:3:
    WordsBitmap.h: In constructor ‘WordsBitmap::WordsBitmap(size_t)’:
    WordsBitmap.h:57: 错误: ‘malloc’在此作用域中尚未声明
    WordsBitmap.h: In copy constructor ‘WordsBitmap::WordsBitmap(const WordsBitmap&)’:
    WordsBitmap.h:64: 错误: ‘malloc’在此作用域中尚未声明
    WordsBitmap.h: In destructor ‘WordsBitmap::~WordsBitmap()’:
    WordsBitmap.h:72: 错误: ‘free’在此作用域中尚未声明
    In file included from Phrase.h:29,
    from PhraseDictionary.h:29,
    from PhraseDictionaryMemory.h:25,
    from DecodeStep.cpp:23:
    Word.h: In copy constructor ‘Word::Word(const Word&)’:
    Word.h:49: 错误: ‘memcpy’不是‘std’的成员
    Word.h: In constructor ‘Word::Word()’:
    Word.h:54: 错误: ‘memset’不是‘std’的成员
    In file included from Phrase.h:30,
    from PhraseDictionary.h:29,
    from PhraseDictionaryMemory.h:25,
    from DecodeStep.cpp:23:
    WordsBitmap.h: In constructor ‘WordsBitmap::WordsBitmap(size_t)’:
    WordsBitmap.h:57: 错误: ‘malloc’在此作用域中尚未声明
    WordsBitmap.h: In copy constructor ‘WordsBitmap::WordsBitmap(const WordsBitmap&)’:
    WordsBitmap.h:64: 错误: ‘malloc’在此作用域中尚未声明
    WordsBitmap.h: In destructor ‘WordsBitmap::~WordsBitmap()’:
    WordsBitmap.h:72: 错误: ‘free’在此作用域中尚未声明
    make[2]: *** [DecodeGraph.o] 错误 1
    make[2]: *** 正在等待未完成的任务….
    In file included from Phrase.h:29,
    from Hypothesis.h:27,
    from BitmapContainer.h:27,
    from BitmapContainer.cpp:26:
    Word.h: In copy constructor ‘Word::Word(const Word&)’:
    Word.h:49: 错误: ‘memcpy’不是‘std’的成员
    Word.h: In constructor ‘Word::Word()’:
    Word.h:54: 错误: ‘memset’不是‘std’的成员

    请教下该如何解决呢?

    [回复]

    52nlp 回复:

    抱歉这么迟才答复你,我搜了一下,感觉你的这个问题比较怪,好像与你的系统缺乏一些C++标准库有关,建议除了g++外,将C/C++编译需要的库也装了,具体可以Google一下,我有点忘了。

    [回复]

    kemi 回复:

    我尝试了
    sudo apt-get install build-essential
    sudo apt-get install libc6
    sudo apt-get install libstdc++6
    其中libstdc++6已经安装过了
    然后再运行make -j 4 的命令,依然出现上面同样的问题
    是不是因为我把moses的版本换成了2008-7-11导致的呢
    请教还有什么解决方法吗

    [回复]

  32. kemi on 六月 13th, 2010 22:04

    还是我,不好意思,又打搅你了,上面的问题我还是没有解决。
    又从头根据你的文章装一下,到了安装解码器moses的时候还是出现和上面的问题
    就是运行./regenerate-makefiles.sh命令时,出现

    xuji@xuji-desktop:~/mtworkdir/moses$ ./regenerate-makefiles.sh
    Calling /usr/bin/aclocal…
    Calling /usr/bin/autoconf…
    configure.in:12: error: possibly undefined macro: AC_DISABLE_SHARED
    If this token and others are legitimate, please use m4_pattern_allow.
    See the Autoconf documentation.
    configure.in:13: error: possibly undefined macro: AC_PROG_LIBTOOL
    autoconf failed

    我再运行一遍./regenerate-makefiles.sh之后又出现下面的错误
    xuji@xuji-desktop:~/mtworkdir/moses$ ./regenerate-makefiles.sh
    Calling /usr/bin/aclocal…
    Calling /usr/bin/autoconf…
    Calling /usr/bin/automake…
    OnDiskPt/src/Makefile.am:1: library used but `RANLIB’ is undefined
    OnDiskPt/src/Makefile.am:1: The usual way to define `RANLIB’ is to add `AC_PROG_RANLIB’
    OnDiskPt/src/Makefile.am:1: to `configure.in’ and run `autoconf’ again.
    moses-chart/src/Makefile.am:1: library used but `RANLIB’ is undefined
    moses-chart/src/Makefile.am:1: The usual way to define `RANLIB’ is to add `AC_PROG_RANLIB’
    moses-chart/src/Makefile.am:1: to `configure.in’ and run `autoconf’ again.
    moses/src/Makefile.am:1: Libtool library used but `LIBTOOL’ is undefined
    moses/src/Makefile.am:1: The usual way to define `LIBTOOL’ is to add `AC_PROG_LIBTOOL’
    moses/src/Makefile.am:1: to `configure.in’ and run `aclocal’ and `autoconf’ again.
    moses/src/Makefile.am:1: If `AC_PROG_LIBTOOL’ is in `configure.in’, make sure
    moses/src/Makefile.am:1: its definition is in aclocal’s search path.
    automake failed

    应该可以看出来automake之类的都已经安装过了。实在不知道怎么解决,真是麻烦你了。

    另外,我从http://sourceforge.net/projects/mosesdecoder下载其他版本的moses
    仍然会出现问题。
    上一个帖子就是,下载安装了C++标准库,仍然同样的问题。
    不好意思哈

    [回复]

    52nlp 回复:

    “autoconf failed”是怎么解决的?如果没有解决再运行一遍又是“automake failed”就太怪了。
    对于“autoconf failed”的问题,我搜了一下,似乎这个家伙遇到的是和你一样的问题: http://www.bakuzen.com/?p=21

    ./regenerate-makefiles.sh
    This will take a few seconds and will generate your makefiles based on how your computer is configured. The only problem I ran into was this: possibly undefined macro: AC_PROG_LIBTOOL and I was able to fix it easily by installing libtool (in ubuntu: sudo apt-get install libtool -thanks to this site for the info) and then tried again and it worked fine.

    所以对于这个错误:configure.in:12: error: possibly undefined macro: AC_DISABLE_SHARED, 你需要安装libtool,具体参考:
    http://desk.stinkpot.org:8080/tricks/index.php/2007/05/fixing-error-undefined-macro-ac_prog_libtool/

    一些问题可能是环环相扣的,总得感觉是你的linux开发环境还是缺少moses所依赖的一些库,再仔细检查一下。

    [回复]

  33. 小飞 on 七月 16th, 2010 22:45

    你好,我想问一下我可以用moses进行中英文的翻译吗?

    [回复]

    52nlp 回复:

    可以,前提是你必须有中英对齐的语料库用来训练翻译模型和语言模型。
    Moses只提供一个统计机器翻译的平台框架,与具体语言无关。

    [回复]

  34. craig on 八月 16th, 2010 09:43

    向版主请教在test srilm时全都是DIFFERS的问题.
    我用的是ubuntu 8.04, 在srilm目录下make World后编译成功, 在bin目录下有i686文件夹, 里面有ngram, ngram-count等文件. 即使设置path后 (export  PATH= ….), 然后没有.

    请教是什么原因? 谢谢

    另外, test的很多文件找不到啊,例如
    *** Running test ngram-count-abs ***
    5.25user 0.11system 0:04.00elapsed 133%CPU (0avgtext+0avgdata 0maxresident)k
    0inputs+8768outputs (0major+21353minor)pagefaults 0swaps
    ngram-count-abs: stdout output DIFFERS.
    ngram-count-abs: stderr output DIFFERS.

    ngram-count-abs 这个文件在$srilm/bin/i686目录下没这个文件啊

    [回复]

    52nlp 回复:

    不清楚你用的是srilm哪一个版本,我估计你已经编译成功了,只是由于path设置不正确,导致测试时全都是DIFFERS的问题,所以重点检查一下PATH设置。

    test的文件在相应的test目录下,并没有在$srilm/bin/i686下,例如你说的这个ngram-count-abs,我用的是1.5.11的版本,它在这个版本的srilm\lm\test\tests\目录下,也是一个目录,里面有脚本调用ngram-count,如果它找不到ngram-count,估计输出的都是differs了,所以还是要看一下path设置的问题。

    [回复]

  35. craig on 八月 16th, 2010 22:10

    谢谢回复

    svn co  https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder
    /trunk moses

    这个命令下载文件需要很长时间啊, 下载的文件夹branches里面,每个文件里面的内容都相似啊。。 是不是什么不同人写的不同版本?
    谢谢

    [回复]

    craig 回复:

    安装moses的时候还出现下面的问题,

    craig@craig:~/smt/moses$ ./regenerate-makefiles.sh
    Calling /usr/bin/aclocal…
    Calling /usr/bin/autoconf…
    configure.in:12: error: possibly undefined macro: AC_DISABLE_SHARED
    If this token and others are legitimate, please use m4_pattern_allow.
    See the Autoconf documentation.
    configure.in:13: error: possibly undefined macro: AC_PROG_LIBTOOL
    autoconf failed

    请问是什么原因啊?

    [回复]

    52nlp 回复:

    应该是autoconf没有安装吧。

    [回复]

    craig 回复:

    谢谢

    后来发现是libtool没有安装.

  36. kemi on 八月 27th, 2010 21:50

    您好
    我在安装scripts训练脚本时
    运行 make release 命令
    出现了下面的情况
    请教下是怎样造成的,有什么解决方法吗?
    在scripts的文件里应该是只有一部分生成的perl吧

    # Compile the parts
    make all
    make[1]: 正在进入目录 `/home/xuji/mtworkdir/moses/scripts’
    # Building memscore may fail e.g. if boost is not available.
    # We ignore this because traditional scoring will still work and memscore isn’t used by default.
    cd training/memscore ; \
    ./configure && make \
    || ( echo “WARNING: Building memscore failed.”; \
    echo ‘training/memscore/memscore’ >> ../../release-exclude )
    checking for a BSD-compatible install… /usr/bin/install -c
    checking whether build environment is sane… yes
    checking for gawk… gawk
    checking whether make sets $(MAKE)… yes
    checking for g++… g++
    checking for C++ compiler default output file name… a.out
    checking whether the C++ compiler works… yes
    checking whether we are cross compiling… no
    checking for suffix of executables…
    checking for suffix of object files… o
    checking whether we are using the GNU C++ compiler… yes
    checking whether g++ accepts -g… yes
    checking for style of include used by make… GNU
    checking dependency style of g++… gcc3
    checking for gcc… gcc
    checking whether we are using the GNU C compiler… yes
    checking whether gcc accepts -g… yes
    checking for gcc option to accept ISO C89… none needed
    checking dependency style of gcc… gcc3
    checking for boostlib >= 1.31.0… configure: error: We could not detect the boost libraries (version 1.31 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to –with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.
    WARNING: Building memscore failed.
    touch release-exclude # No files excluded by default
    pwd=`pwd`; \
    for subdir in phrase-extract symal mbr lexical-reordering; do \
    make -C training/$subdir || exit 1; \
    echo “### Compiler $subdir”; \
    cd $pwd; \
    done
    make[2]: 正在进入目录 `/home/xuji/mtworkdir/moses/scripts/training/phrase-extract’
    make[2]: 没有什么可以做的为 `all’。
    make[2]:正在离开目录 `/home/xuji/mtworkdir/moses/scripts/training/phrase-extract’
    ### Compiler phrase-extract
    make[2]: 正在进入目录 `/home/xuji/mtworkdir/moses/scripts/training/symal’
    make[2]: 没有什么可以做的为 `all’。
    make[2]:正在离开目录 `/home/xuji/mtworkdir/moses/scripts/training/symal’
    ### Compiler symal
    make[2]: 正在进入目录 `/home/xuji/mtworkdir/moses/scripts/training/mbr’
    make[2]: 没有什么可以做的为 `all’。
    make[2]:正在离开目录 `/home/xuji/mtworkdir/moses/scripts/training/mbr’
    ### Compiler mbr
    make[2]: 正在进入目录 `/home/xuji/mtworkdir/moses/scripts/training/lexical-reordering’
    make[2]: 没有什么可以做的为 `all’。
    make[2]:正在离开目录 `/home/xuji/mtworkdir/moses/scripts/training/lexical-reordering’
    ### Compiler lexical-reordering
    ## All files that need compilation were compiled
    make[1]:正在离开目录 `/home/xuji/mtworkdir/moses/scripts’
    mkdir -p /home/xuji/mtworkdir/moses-scripts/scripts-20100827-2133
    cat ./released-files \
    | grep -v -x -f release-exclude \
    | rsync -r –files-from – . /home/xuji/mtworkdir/moses-scripts/scripts-20100827-2133/
    sed ‘s#^my \$BINDIR\s*=.*#my \$BINDIR=”/home/xuji/mtworkdir/bin”;#’ training/train-model.perl > /home/xuji/mtworkdir/moses-scripts/scripts-20100827-2133/training/train-model.perl
    ## Remember, only files listed in released-files are released!!
    ## Don’t forget to set your SCRIPTS_ROOTDIR with:
    export SCRIPTS_ROOTDIR=/home/xuji/mtworkdir/moses-scripts/scripts-20100827-2133

    [回复]

    kemi 回复:

    看了下应该是boost库的问题吧,但是
    安装boost库的时候
    运行以下的命令就出现了下面的问题了,看上去是不是版本问题?
    再请教下
    我是新手上路,谢谢了

    sudo apt-get install libboost-dev libboost-dbg libboost-doc bcp libboost-*
    正在读取软件包列表… 完成
    正在分析软件包的依赖关系树
    正在读取状态信息… 完成
    注意,根据正则表达式“libboost-*”选中了 libboost-system1.35-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-test1.34.1
    注意,根据正则表达式“libboost-*”选中了 libboost-regex1.34.1
    注意,根据正则表达式“libboost-*”选中了 libboost-test1.35.0
    注意,根据正则表达式“libboost-*”选中了 libboost-regex1.35.0
    注意,根据正则表达式“libboost-*”选中了 libboost-wave1.34.1
    注意,根据正则表达式“libboost-*”选中了 libboost-wave1.35.0
    注意,根据正则表达式“libboost-*”选中了 libboost-thread-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-graph-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-date-time-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-program-options1.34.1
    注意,根据正则表达式“libboost-*”选中了 libboost-program-options1.35.0
    注意,根据正则表达式“libboost-*”选中了 libboost-dbg
    注意,根据正则表达式“libboost-*”选中了 libboost-iostreams-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-doc
    注意,根据正则表达式“libboost-*”选中了 libboost-thread1.35-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-iostreams1.35-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-filesystem-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-thread1.34.1
    注意,根据正则表达式“libboost-*”选中了 libboost-thread1.35.0
    注意,根据正则表达式“libboost-*”选中了 libboost-serialization1.34.1
    注意,根据正则表达式“libboost-*”选中了 libboost-date-time1.34.1
    注意,根据正则表达式“libboost-*”选中了 libboost-serialization1.35.0
    注意,根据正则表达式“libboost-*”选中了 libboost-date-time1.35.0
    注意,根据正则表达式“libboost-*”选中了 libboost-test-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-wave-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-serialization-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-signals-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-filesystem1.35-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-signals1.34.1
    注意,根据正则表达式“libboost-*”选中了 libboost-program-options1.35-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-signals1.35.0
    注意,根据正则表达式“libboost-*”选中了 libboost-graph1.34.1
    注意,根据正则表达式“libboost-*”选中了 libboost-graph1.35.0
    注意,根据正则表达式“libboost-*”选中了 libboost-iostreams1.34.1
    注意,根据正则表达式“libboost-*”选中了 libboost-iostreams1.35.0
    注意,根据正则表达式“libboost-*”选中了 libboost-regex1.35-dev
    注意,根据正则表达式“libboost-*”选中了 libboost1.35-dbg
    注意,根据正则表达式“libboost-*”选中了 libboost-regex-dev
    注意,根据正则表达式“libboost-*”选中了 libboost1.35-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-serialization1.35-dev
    注意,根据正则表达式“libboost-*”选中了 libboost1.35-doc
    注意,根据正则表达式“libboost-*”选中了 libboost-graph1.35-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-python-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-date-time1.35-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-wave1.35-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-signals1.35-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-filesystem1.34.1
    注意,根据正则表达式“libboost-*”选中了 libboost-filesystem1.35.0
    注意,根据正则表达式“libboost-*”选中了 libboost-test1.35-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-system1.35.0
    注意,根据正则表达式“libboost-*”选中了 libboost-python1.35-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-python1.34.1
    注意,根据正则表达式“libboost-*”选中了 libboost-program-options-dev
    注意,根据正则表达式“libboost-*”选中了 libboost-python1.35.0
    有一些软件包无法被安装。如果您用的是不稳定(unstable)发行版,这也许是
    因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
    包尚未被创建或是它们还在新到(incoming)目录中。
    下列的信息可能会对解决问题有所帮助:

    下列的软件包有不能满足的依赖关系:
    libboost-date-time1.35-dev: 冲突: libboost-date-time-dev 但是 1.34.1-11ubuntu1 正要被安装
    libboost-filesystem1.35-dev: 冲突: libboost-filesystem-dev 但是 1.34.1-11ubuntu1 正要被安装
    libboost-graph1.35-dev: 冲突: libboost-graph-dev 但是 1.34.1-11ubuntu1 正要被安装
    libboost-iostreams1.35-dev: 冲突: libboost-iostreams-dev 但是 1.34.1-11ubuntu1 正要被安装
    libboost-program-options1.35-dev: 冲突: libboost-program-options-dev 但是 1.34.1-11ubuntu1 正要被安装
    libboost-python1.35-dev: 冲突: libboost-python-dev 但是 1.34.1-11ubuntu1 正要被安装
    libboost-regex1.35-dev: 冲突: libboost-regex-dev 但是 1.34.1-11ubuntu1 正要被安装
    libboost-serialization1.35-dev: 冲突: libboost-serialization-dev 但是 1.34.1-11ubuntu1 正要被安装
    libboost-signals1.35-dev: 冲突: libboost-signals-dev 但是 1.34.1-11ubuntu1 正要被安装
    libboost-test1.35-dev: 冲突: libboost-test-dev 但是 1.34.1-11ubuntu1 正要被安装
    libboost-thread1.35-dev: 冲突: libboost-thread-dev 但是 1.34.1-11ubuntu1 正要被安装
    libboost-wave1.35-dev: 冲突: libboost-wave-dev 但是 1.34.1-11ubuntu1 正要被安装
    libboost1.35-dbg: 冲突: libboost-dbg 但是 1.34.1-11ubuntu1 正要被安装
    libboost1.35-dev: 冲突: bcp 但是 1.34.1-11ubuntu1 正要被安装
    冲突: libboost-dev 但是 1.34.1-11ubuntu1 正要被安装
    libboost1.35-doc: 冲突: libboost-doc 但是 1.34.1-11ubuntu1 正要被安装

    [回复]

    52nlp 回复:

    抱歉,不太清楚boost这个问题,你看看这个解答:
    http://ubuntuforums.org/showthread.php?t=1041562
    试试仅仅安装dev吧:
    sudo apt-get install libboost-dev

    [回复]

    kemi 回复:

    我在安装了libboost-dev libboost-dbg libboost-doc bcp
    之后 仍然出现这样的情况,昨天就出现的
    phrasetable.h:17:27: error: boost/bimap.hpp: 没有该文件或目录
    一直是寻找不到解决这个方法
    在moses-scripts/train 目录下面没有train-factored-phrase-model.perl
    等文件,但是有clean-corpus-n.perl等文件。
    不知道是不是需要把系统重装一遍,重来一次

    # Compile the parts
    make all
    make[1]: 正在进入目录 `/home/xuji/mtworkdir/moses/scripts’
    # Building memscore may fail e.g. if boost is not available.
    # We ignore this because traditional scoring will still work and memscore isn’t used by default.
    cd training/memscore ; \
    ./configure && make \
    || ( echo “WARNING: Building memscore failed.”; \
    echo ‘training/memscore/memscore’ >> ../../release-exclude )
    checking for a BSD-compatible install… /usr/bin/install -c
    checking whether build environment is sane… yes
    checking for gawk… gawk
    checking whether make sets $(MAKE)… yes
    checking for g++… g++
    checking for C++ compiler default output file name… a.out
    checking whether the C++ compiler works… yes
    checking whether we are cross compiling… no
    checking for suffix of executables…
    checking for suffix of object files… o
    checking whether we are using the GNU C++ compiler… yes
    checking whether g++ accepts -g… yes
    checking for style of include used by make… GNU
    checking dependency style of g++… gcc3
    checking for gcc… gcc
    checking whether we are using the GNU C compiler… yes
    checking whether gcc accepts -g… yes
    checking for gcc option to accept ISO C89… none needed
    checking dependency style of gcc… gcc3
    checking for boostlib >= 1.31.0… yes
    checking for cos in -lm… yes
    checking for gzopen in -lz… yes
    checking for cblas_dgemm in -lgslcblas… no
    checking for gsl_blas_dgemm in -lgsl… no
    checking how to run the C++ preprocessor… g++ -E
    checking for grep that handles long lines and -e… /bin/grep
    checking for egrep… /bin/grep -E
    checking for ANSI C header files… yes
    checking for sys/types.h… yes
    checking for sys/stat.h… yes
    checking for stdlib.h… yes
    checking for string.h… yes
    checking for memory.h… yes
    checking for strings.h… yes
    checking for inttypes.h… yes
    checking for stdint.h… yes
    checking for unistd.h… yes
    checking n_gram.h usability… no
    checking n_gram.h presence… no
    checking for n_gram.h… no
    checking for size_t… yes
    checking for ptrdiff_t… yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating config.h
    config.status: executing depfiles commands
    make[2]: 正在进入目录 `/home/xuji/mtworkdir/moses/scripts/training/memscore’
    make all-am
    make[3]: 正在进入目录 `/home/xuji/mtworkdir/moses/scripts/training/memscore’
    if g++ -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include -Wall -ffast-math -ftrapping-math -fomit-frame-pointer -g -O2 -MT phrasetable.o -MD -MP -MF “.deps/phrasetable.Tpo” -c -o phrasetable.o phrasetable.cpp; \
    then mv -f “.deps/phrasetable.Tpo” “.deps/phrasetable.Po”; else rm -f “.deps/phrasetable.Tpo”; exit 1; fi
    phrasetable.cpp:1: 警告: -fassociative-math 为其他选项所禁用
    In file included from phrasetable.cpp:5:
    phrasetable.h:17:27: error: boost/bimap.hpp: 没有该文件或目录
    In file included from phrasetable.cpp:5:
    phrasetable.h:34: 错误: ISO C++ 不允许声明无类型的‘bimap’
    phrasetable.h:34: 错误: typedef 名不能是嵌套名指定
    phrasetable.h:34: 错误: expected ‘;’ before ‘ /home/xuji/mtworkdir/moses-scripts/scripts-20100829-0023/training/train-model.perl
    ## Remember, only files listed in released-files are released!!
    ## Don’t forget to set your SCRIPTS_ROOTDIR with:
    export SCRIPTS_ROOTDIR=/home/xuji/mtworkdir/moses-scripts/scripts-20100829-0023

    craig 回复:

    关于 boost/bimap.hpp: 没有该文件或目录 的错误我也碰到过. 通过ubuntu的新立得安装libboost后, 在/usr/include/boost/目录下找不到bimap.hpp. 后来是到libboost官网上下载并安装,会发现在/usr/local/include/boost/目录下有文件bimap.hpp了.

    [回复]

    52nlp 回复:

    非常感谢Craig的提示!
    以前安装Moses还没有碰到过boost这个问题,不知是不是近期Moses代码里有了什么改动所致。

  37. 乒乓球 on 八月 29th, 2010 21:21

    您好,我在安装srilm的时候出现这个错误可能是什么原因啊?谢谢
    mkdir include lib bin
    mkdir: 无法创建目录‘include’: 文件已存在
    mkdir: 无法创建目录‘lib’: 文件已存在
    mkdir: 无法创建目录‘bin’: 文件已存在
    make: [dirs] Error 1 (ignored)
    make init
    make[1]: Entering directory `/srilm’
    for subdir in misc dstruct lm flm lattice utils; do \
    (cd $subdir/src; make SRILM=/srilm MACHINE_TYPE=i686 OPTION= init) || exit 1; \
    done
    make[2]: Entering directory `/srilm/misc/src’
    make[2]: *** No rule to make target `init’. Stop.
    make[2]: Leaving directory `/srilm/misc/src’
    make[1]: *** [init] Error 1
    make[1]: Leaving directory `/srilm’
    make: *** [World] Error 2
    [root@localhost srilm]# make World
    mkdir include lib bin
    mkdir: 无法创建目录‘include’: 文件已存在
    mkdir: 无法创建目录‘lib’: 文件已存在
    mkdir: 无法创建目录‘bin’: 文件已存在
    make: [dirs] Error 1 (ignored)
    make init
    make[1]: Entering directory `/srilm’
    for subdir in misc dstruct lm flm lattice utils; do \
    (cd $subdir/src; make SRILM=/srilm MACHINE_TYPE=i686 OPTION= init) || exit 1; \
    done
    make[2]: Entering directory `/srilm/misc/src’
    make[2]: *** No rule to make target `init’. Stop.
    make[2]: Leaving directory `/srilm/misc/src’
    make[1]: *** [init] Error 1
    make[1]: Leaving directory `/srilm’
    make: *** [World] Error 2

    [回复]

    52nlp 回复:

    抱歉,没有遇到过这个问题,也查了一下,也没发现有用的线索。再检查一下依赖的工具是否已安装完全,这个一般是出问题的源泉。

    [回复]

  38. kemi on 八月 31st, 2010 21:39

    前辈
    在srilm irstlm 和giza++都安装好了的情况下,并且把boost的bimap库编译安装完成
    我重新下载了一个moses的版本2010.4.26,重新进行编译之后再估计moses官网上提供
    的测试moses是否编译成功的sample-models进行测试,出现了以下的情况,修改了
    moses.ini 的路径之后仍然是同样的情况的。

    不知道怎么样修改才能让它成功

    但是我在moses/scripts 下进行make release之后,生成的moses-scripts/training
    目录下生成了我以前没有的train-factored-phrase-model.perl
    等文件,而且也有clean-corpus-n.perl等文件。

    在以前用moses最新版本的时候利用samples-models测试是很成功的
    只是会出现生成的moses-scripts/training目录下没有train-factored-phrase-model.perl

    这个问题实在是扰头。

    xuji@xuji-desktop:~/smt/data/sample-models/phrase-model$ ../../../moses/moses-cmd/src/moses -f moses.ini out
    Defined parameters (per moses.ini or switch):
    DPR-file: DPR-file.txt
    config: moses.ini
    input-factors: 0
    lmodel-file: 0 0 3 ../lm/europarl.srilm.gz
    mapping: T 0
    n-best-list: nbest.txt 100
    ttable-file: 0 0 0 1 phrase-table
    ttable-limit: 10
    weight-DPR: 3
    weight-d: 1
    weight-l: 1
    weight-t: 1
    weight-w: 0
    Loading lexical distortion models…have 0 models
    Start loading LanguageModel ../lm/europarl.srilm.gz : [0.000] seconds
    Finished loading LanguageModels : [7.000] seconds
    Start loading PhraseTable phrase-table : [7.000] seconds
    filePath: phrase-table
    ERROR:Size of scoreVector != number (0!=1) of score components on line 1
    忽略

    [回复]

    52nlp 回复:

    配置文件有问题,你的moses.ini中是否有这一行:
    # translation tables: source-factors, target-factors, number of scores, file
    [ttable-file]
    0 0 0 1 phrase-table
    如果有,将它修改为:
    0 0 5 phrase-table
    试试。
    如果没有,贴一下你的配置文件。

    [回复]

    kemi 回复:

    我改过了,试过了没有用
    出现下面的情况

    xuji@xuji-desktop:~/smt/data/sample-models/phrase-model$ /home/xuji/smt/moses/moses-cmd/src/moses -f moses.ini out
    Defined parameters (per moses.ini or switch):
    DPR-file: DPR-file.txt
    config: moses.ini
    input-factors: 0
    lmodel-file: 0 0 3 ../lm/europarl.srilm.gz
    mapping: T 0
    n-best-list: nbest.txt 100
    ttable-file: 0 0 5 phrase-table
    ttable-limit: 10
    weight-DPR: 3
    weight-d: 1
    weight-l: 1
    weight-t: 1
    weight-w: 0
    ERROR:Expected at least 5 tokens per emtry in ‘ttable-file’, but only found 4
    Usage:
    -beam-threshold (b): threshold for threshold pruning
    -cache-path: ?
    -clean-lm-cache: clean language model caches after N translations (default N=1)
    -config (f): location of the configuration file
    -consensus-decoding (con): use consensus decoding (De Nero et. al. 2009)
    -constraint: Location of the file with target sentences to produce constraining the search
    -cube-pruning-diversity (cbd): How many hypotheses should be created for each coverage. (default = 0)
    -cube-pruning-pop-limit (cbp): How many hypotheses should be popped for each stack. (default = 1000)
    -description: Source language, target language, description
    -disable-discarding (dd): disable hypothesis discarding
    -distortion: configurations for each factorized/lexicalized reordering model.
    -distortion-file: source factors (0 if table independent of source), target factors, location of the factorized/lexicalized reordering tables
    -distortion-limit (dl): distortion (reordering) limit in maximum number of words (0 = monotone, -1 = unlimited)
    -drop-unknown (du): drop unknown words instead of copying them
    -early-discarding-threshold (edt): threshold for constructing hypotheses based on estimate cost
    -factor-delimiter (fd): specify a different factor delimiter than the default
    -generation-file: location and properties of the generation table
    -global-lexical-file (gl): discriminatively trained global lexical translation model file
    -glue-rule-type: Left branching, or both branching. 0=left. 2=both. 1=right(not implemented). Default=0
    -include-alignment-in-n-best: include word alignment in the n-best list. default is false
    -input-factors: list of factors in the input
    -input-file (i): location of the input file to be translated
    -inputtype: text (0), confusion network (1), word lattice (2) (default = 0)
    -labeled-n-best-list: print out labels for each weight type in n-best list. default is true
    -lattice-hypo-set: to use lattice as hypo set during lattice MBR
    -link-param-count: Number of parameters on word links when using confusion networks or lattices (default = 1)
    -lmbr-map-weight: weight given to map solution when doing lattice MBR (default 0)
    -lmbr-p: unigram precision value for lattice mbr
    -lmbr-pruning-factor: average number of nodes/word wanted in pruned lattice
    -lmbr-r: ngram precision decay value for lattice mbr
    -lmbr-thetas: theta(s) for lattice mbr calculation
    -lminimum-bayes-risk (lmbr): use lattice miminum Bayes risk to determine best translation
    -lmodel-dub: dictionary upper bounds of language models
    -lmodel-file: location and properties of the language models
    -lmstats (L): (1/0) compute LM backoff statistics for each translation hypothesis
    -mapping: description of decoding steps
    -max-chart-span: maximum num. of source word chart rules can consume (default 10)
    -max-partial-trans-opt: maximum number of partial translation options per input span (during mapping steps)
    -max-phrase-length: maximum phrase length (default 20)
    -max-trans-opt-per-coverage: maximum number of translation options per input span (after applying mapping steps)
    -mbr-scale: scaling factor to convert log linear score probability in MBR decoding (default 1.0)
    -mbr-size: number of translation candidates considered in MBR decoding (default 200)
    -minimum-bayes-risk (mbr): use miminum Bayes risk to determine best translation
    -monotone-at-punctuation (mp): do not reorder over punctuation
    -n-best-factor: factor to compute the maximum number of contenders (=factor*nbest-size). value 0 means infinity, i.e. no threshold. default is 0
    -n-best-list: file and size of n-best-list to be generated; specify – as the file in order to write to STDOUT
    -non-terminals: list of non-term symbols, space separated
    -output-factors: list if factors in the output
    -output-hypo-score: Output the hypo score to stdout with the output string. For search error analysis. Default is false
    -output-search-graph (osg): Output connected hypotheses of search into specified filename
    -output-search-graph-extended (osgx): Output connected hypotheses of search into specified filename, in extended format
    -output-word-graph (owg): Output stack info as word graph. Takes filename, 0=only hypos in stack, 1=stack + nbest hypos
    -persistent-cache-size: maximum size of cache for translation options (default 10,000 input phrases)
    -phrase-drop-allowed (da): if present, allow dropping of source words
    -print-alignment-info: Output word-to-word alignment into the log file. Word-to-word alignments are takne from the phrase table if any. Default is false
    -print-alignment-info-in-n-best: Include word-to-word alignment in the n-best list. Word-to-word alignments are takne from the phrase table if any. Default is false
    -print-all-derivations: to print all derivations in search graph
    -recover-input-path (r): (conf net/word lattice only) – recover input path corresponding to the best translation
    -report-all-factors: report all factors in output, not just first
    -report-all-factors-in-n-best: Report all factors in n-best-lists. Default is false
    -report-segmentation (t): report phrase segmentation in the output
    -rule-limit: a little like table limit. But for chart decoding rules. Default is DEFAULT_MAX_TRANS_OPT_SIZE
    -search-algorithm: Which search algorithm to use. 0=normal stack, 1=cube pruning, 2=cube growing. (default = 0)
    -source-label-overlap: What happens if a span already has a label. 0=add more. 1=replace. 2=discard. Default is 0
    -stack (s): maximum stack size for histogram pruning
    -stack-diversity (sd): minimum number of hypothesis of each coverage in stack (default 0)
    -time-out: seconds after which is interrupted (-1=no time-out, default is -1)
    -translation-details (T): for each best translation hypothesis, print out details about what sourcce spans were used, dropped
    -translation-option-threshold (tot): threshold for translation options relative to best for input phrase
    -ttable-file: location and properties of the translation tables
    -ttable-limit (ttl): maximum number of translation table entries per input phrase
    -unknown-lhs: file containing target lhs of unknown words. 1 per line: LHS prob
    -use-alignment-info: Use word-to-word alignment: actually it is only used to output the word-to-word alignment. Word-to-word alignments are taken from the phrase table if any. Default is false.
    -use-persistent-cache: cache translation options across sentences (default true)
    -verbose (v): verbosity level of the logging
    -weight-d (d): weight(s) for distortion (reordering components)
    -weight-e (e): weight for word deletion
    -weight-file (wf): file containing labeled weights
    -weight-generation (g): weight(s) for generation components
    -weight-i (I): weight(s) for word insertion – used for parameters from confusion network and lattice input links
    -weight-l (lm): weight(s) for language models
    -weight-lex (lex): weight for global lexical model
    -weight-t ™: weights for translation model components
    -weight-u (u): weight for unknown word penalty
    -weight-w (w): weight for word penalty
    -xml-input (xi): allows markup of input with desired translations and probabilities. values can be ‘pass-through’ (default), ‘inclusive’, ‘exclusive’, ‘ignore’

    然后moses.ini里面是

    #########################
    ### MOSES CONFIG FILE ###
    #########################

    # input factors
    [input-factors]
    0

    # mapping steps, either (T) translation or (G) generation
    [mapping]
    T 0

    # translation tables: source-factors, target-factors, number of scores, file
    [ttable-file]
    0 0 0 1 phrase-table

    # language models: type(srilm/irstlm), factors, order, file
    [lmodel-file]
    0 0 3 ../lm/europarl.srilm.gz

    # limit on how many phrase translations e for each phrase f are loaded
    [ttable-limit]
    10

    # distortion (reordering) weight
    [weight-d]
    1

    # language model weights
    [weight-l]
    1

    # translation model weights
    [weight-t]
    1

    # word penalty
    [weight-w]
    0

    [DPR-file]
    DPR-file.txt

    [weight-DPR]
    3

    [n-best-list]
    nbest.txt
    100

    [回复]

  39. 52nlp on 九月 1st, 2010 20:59

    “ERROR:Expected at least 5 tokens per emtry in ‘ttable-file’, but only found 4″
    改成4试试,这个和你的phrasetable中的特征有关。

    [回复]

    kemi 回复:

    昨天晚上改过,但是还是有error
    今天我把系统重新装了一遍重头按照步骤装了一遍
    到了moses编译完成之后,用官网上提供的数据测试
    出现了下面的问题
    xuji@xuji-desktop:~/smt$ moses-scripts/scripts-20100901-2022/training/clean-corpus-n.perl data/work/corpus/news-commentary.tok fr en data/work/corpus/news-commentary.clean 1 40
    clean-corpus.perl: processing data/work/corpus/news-commentary.tok.fr & .en to data/work/corpus/news-commentary.clean, cutoff 1-40
    Use of uninitialized value $opn in open at moses-scripts/scripts-20100901-2022/training/clean-corpus-n.perl line 46.
    Use of uninitialized value $opn in concatenation (.) or string at moses-scripts/scripts-20100901-2022/training/clean-corpus-n.perl line 46.
    Can’t open ” at moses-scripts/scripts-20100901-2022/training/clean-corpus-n.perl line 46.

    这个clean-corpus-n.perl是我通过moses编译scripts得出来的 不论是moses 2010.4.26版本还是最新的版本都是这个问题。。。不知道是不是我的系统出的问题,还是srilm或者irstlm编译的过程中有什么失误的地方

    谢谢前辈的指导,虽然还没有把moses平台搭建成功,不过我还是学到了很多,希望能最后成功搞定这个吧

    [回复]

    52nlp 回复:

    clean-corpus-n.perl只是一个perl脚本,和moes的版本没有太大关系,更和你的系统或者srilm及irstlm没有关系。

    我找了一下这个脚本,第46行是:
    open(F,$opn) or die “Can’t open ‘$opn’”;
    从出错的信息来看应该是这个目录data/work/corpus/下没有“news-commentary.tok.fr”文件,所以打不开报错。
    原因可能是第41行“if (-e $l1input) ”到第45行判断这个文件没有存在导致“Use of uninitialized value $opn in open at moses-scripts/scripts-20100901-2022/training/clean-corpus-n.perl line 46.”

    [回复]

    kemi 回复:

    谢谢前辈

    发现了是phrase-table文件里面的形式不对,我修改了文件的内容之后终于

    顺利通过了,看起来moses的测试平台搭建应该是完成了,以后使用肯定还有

    需要请教前辈的地方。

    [回复]

发表评论






订阅52nlp:

Add to Google Reader or Homepage