Full records of building the moses test platform under Ubuntu8.10

Source: Internet
Author: User
The lab changed the machine and re-installed the latest Ubuntu8.10, so we had to re-build the moses test platform. Take the & lt; Moses introduction & gt; for your reference. I feel that the installation process is not detailed enough. Here we will record the installation process, it is a step-by-step process and is useful to everyone. 1. Create the main directory of the moses platform mtworkdir: 52nlp @ 52nlp-desktop in the 52nlp directory of the User :~ $ M

The lab changed the machine and re-installed the latest Ubuntu 8.10, so we had to re-build the moses test platform. Write by yourself <Introduction to Moses> For reference, I feel that the installation process is not detailed enough. Here, we record the entire installation process, which is a step-by-step process. I hope it will be useful to you.

1. Create the main directory mtworkdir of the moses platform under the user 52nlp directory:

52nlp @ 52nlp-desktop :~ $ Mkdir mtworkdir

52nlp @ 52nlp-desktop :~ $ Cd mtworkdir/

Ii. Install the language model tool SRILM:

1. Create the srilm directory:

52nlp @ 52nlp-desktop :~ /Mtworkdir $ mkdir srilm

52nlp @ 52nlp-desktop :~ /Mtworkdir $ cd srilm/

2. download the latest srilm package (srilm-1.5.7.tar.gz is the latest version)

52nlp @ 52nlp-desktop :~ /Mtworkdir/srilm $ wget 'ftp: // ftp.speech.sri.com/pub/people/stolcke/srilm/srilm-1.5.7.tar.gz'

The following information is displayed:

=> 'Srilm-1.5.7.tar.gz'

Parsing the host ftp.speech.sri.com... 130.107.33.205

Connecting ftp.speech.sri.com | 130.107.33.205 |: 21... Connected.

Logging in with anonymous... Login successful!

==> SYST... Complete. ==> PWD... Complete.

==> Type I... Complete. ==> CWD/pub/people/stolcke/srilm... Complete.

SIZE srilm-1.5.7.tar.gz... Complete.

==> PASV... Complete. ==> RETR srilm-1.5.7.tar.gz... Complete.

Length: 48526656 (46 M) (informal data)

The download progress bar appears. Wait for a while and the download is complete.

3. Unzip the tar-zxvf srilm-1.5.7.tar.gz

4. First, check whether the tools on which srilm depends are installed:

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 example of the utility scripts.

GNU gzip to unpack the distribution, and to allow SRILM programs to handle ". Z" and example .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 ).

In addition to the above tools, you also need to install a csh. Ubuntu comes with a small number of software. You can use apt-get or new gains for installation.

5. Modify MakeFile:

After the above tools are installed, first modify srilm/MakeFile:

Cp Makefile. bak (Backup)

Vi Makefile

Modify or add a row under row 7th

# SRILM =/home/speech/stolcke/project/srilm/devel (formerly)

SRILM = $ (PWD) (modified)

Modify srilm/common/Makefile. machine. i686:

Cd common/

Cp Makefile. machine. i686 Makefile. machine. i686.bak

Vi Makefile. machine. i686

Modify the three lines under line 1 # Use the gnu c compiler as follows:

GCC_FLAGS =-mtune = pentium3-Wreturn-type-Wimplicit

CC = gcc $ (GCC_FLAGS)

CXX = g ++ $ (GCC_FLAGS)-DINSTANTIATE_TEMPLATES

Note: The cpu of my new machine is intel64bit, so I tried the 64-bit compilation method, which is not very successful. The method here is also available for 64-bit machines.

Modify the following two lines under line 51 # Tcl support (standard in Linux:

TCL_INCLUDE =-I/usr/include/tcl8.5

TCL_LIBRARY =-L/usr/lib/tcl8.5

Note: I installed tcl8.5. If it is another version, modify it accordingly.

6. Return to the srilm directory for compilation:

Cd ..

Make World

If it succeeds, srilm will be compiled. If a problem occurs, it is likely that the corresponding dependency tool is not fully installed. Go Back To Step 1 to check.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.