实验室换了新机器,重新安装了最新的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

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

作者 52nlp

《Ubuntu8.10下moses测试平台搭建全记录》有157条评论
  1. 我在按照以上方法编译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 回复:

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

    [回复]

  2. 还要问您一下:部署完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的训练脚本。

    [回复]

  3. 最近在跑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]!

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

    [回复]

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

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

    [回复]

  5. 请问训练后如何用生成的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

    [回复]

  6. 我在安装解码器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.

    [回复]

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

    [回复]

    52nlp 回复:

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

    [回复]

  8. 我在安装解码器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导致的呢
    请教还有什么解决方法吗

    [回复]

  9. 还是我,不好意思,又打搅你了,上面的问题我还是没有解决。
    又从头根据你的文章装一下,到了安装解码器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所依赖的一些库,再仔细检查一下。

    [回复]

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

    [回复]

    52nlp 回复:

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

    [回复]

  11. 向版主请教在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设置的问题。

    [回复]

  12. 谢谢回复

    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没有安装.

  13. 您好
    我在安装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代码里有了什么改动所致。

  14. 您好,我在安装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 回复:

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

    [回复]

  15. 前辈
    在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 (tm): 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

    [回复]

  16. "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 回复:

    不用客气,也称不上前辈,这些东西用多了自然就熟悉了。

    [回复]

    kemi 回复:

    我在训练语言模型的时候调用命令 nohup nice moses-scripts/scripts-20100903-1605/training/train-factored-phrase-model.perl -scripts-root-dir moses-scripts/scripts-20100903-1605/ -root-dir work -corpus work/corpus/news-commentary.lowercased -f fr -e en -alignment grow-diag-final-and-reordering msd-bidirectional-fr -lm 0:3:/home/xuji/smt/work/lm/news-commentary.lm >& work/training.out&

    执行完之后,按照官网上的提示应该是下面这三个主要的文件都会出现在model文件夹里
    但是我的文件夹里只有前两个,没有最后一个,而且和它名字类似,大小类似的文件都
    没有。

    -rw-r--r-- 1 jschroe1 people 1032 Jan 27 19:40 moses.ini
    -rw-r--r-- 1 jschroe1 people 67333222 Jan 27 19:40 phrase-table.gz
    -rw-r--r-- 1 jschroe1 people 26144298 Jan 27 19:40 reordering-table.gz

    打开training.out文件查看,最下面几行是这样的
    Executing: gzip work/model/phrase-table
    (7) learn reordering model @ Sat Sep 4 13:30:13 CST 2010
    ... skipping this step, reordering is not lexicalized ...
    (8) learn generation model @ Sat Sep 4 13:30:13 CST 2010
    no generation model requested, skipping step
    (9) create moses.ini @ Sat Sep 4 13:30:13 CST 2010

    看上去应该是跳过了第7步导致的,不知道怎么会出现这样的情况,该怎么解决呢,谢谢

    52nlp 回复:

    如果是reordering的话,好像你的命令中:
    "... -e en -alignment grow-diag-final-and-reordering msd-bidirectional-fr -lm 0:3:/home/xuji..."
    的"grow-diag-final-and-reordering"应该有空格吧:
    "grow-diag-final-and -reordering"。
    如果是其他的问题我说不上来,仔细检查一下配置文件吧。

  17. 你好,我在安装moses训练脚本时,make release后出现了错误,请您帮忙看下,我看了前面的留言,libboost-dev装了,还是错误

    jjwdy0508@jjwdy0508-desktop:~/mtworkdir/moses/scripts$ make release
    # Compile the parts
    make all
    make[1]: 进入目录“/home/jjwdy0508/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 whether the C++ compiler works... yes
    checking for C++ compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    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: config.h is unchanged
    config.status: executing depfiles commands
    make[2]: 进入目录“/home/jjwdy0508/mtworkdir/moses/scripts/training/memscore”
    make all-am
    make[3]: 进入目录“/home/jjwdy0508/mtworkdir/moses/scripts/training/memscore”
    make[3]: 离开目录“/home/jjwdy0508/mtworkdir/moses/scripts/training/memscore”
    make[2]: 离开目录“/home/jjwdy0508/mtworkdir/moses/scripts/training/memscore”
    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/jjwdy0508/mtworkdir/moses/scripts/training/phrase-extract”
    make[2]: 对“all”无需做任何事。
    make[2]: 离开目录“/home/jjwdy0508/mtworkdir/moses/scripts/training/phrase-extract”
    ### Compiler phrase-extract
    make[2]: 进入目录“/home/jjwdy0508/mtworkdir/moses/scripts/training/symal”
    make[2]: 对“all”无需做任何事。
    make[2]: 离开目录“/home/jjwdy0508/mtworkdir/moses/scripts/training/symal”
    ### Compiler symal
    make[2]: 进入目录“/home/jjwdy0508/mtworkdir/moses/scripts/training/mbr”
    make[2]: 对“all”无需做任何事。
    make[2]: 离开目录“/home/jjwdy0508/mtworkdir/moses/scripts/training/mbr”
    ### Compiler mbr
    make[2]: 进入目录“/home/jjwdy0508/mtworkdir/moses/scripts/training/lexical-reordering”
    make[2]: 对“all”无需做任何事。
    make[2]: 离开目录“/home/jjwdy0508/mtworkdir/moses/scripts/training/lexical-reordering”
    ### Compiler lexical-reordering
    ## All files that need compilation were compiled
    make[1]: 离开目录“/home/jjwdy0508/mtworkdir/moses/scripts”
    mkdir -p /home/jjwdy0508/mtworkdir/bin/moses-scripts/scripts-20101020-2036
    cat ./released-files \
    | grep -v -x -f release-exclude \
    | rsync -r --files-from - . /home/jjwdy0508/mtworkdir/bin/moses-scripts/scripts-20101020-2036/
    rsync: link_stat "/home/jjwdy0508/mtworkdir/moses/scripts/recaser/detokenizer.perl" failed: No such file or directory (2)
    rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]
    make: *** [release] 错误 23

    我的email: jjwdy0508@163.com

    [回复]

    jjwdy0508 回复:

    汗哪,在moses目录下把这个文件搜到复制到recaser目录下就行了,丢人了,感谢52nlp

    [回复]

    52nlp 回复:

    自己解决就好,呵呵!

    [回复]

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注