Skip to content

Installing MGIZA++ on Ubuntu

January 15, 2014
  1. Get the source from here http://sourceforge.net/projects/mgizapp/
  2. Installing some dependencies
    sudo apt-get install cmake
    sudo apt-get install libboost-all-dev
  3. Extracting source files
    sudo mkdir -p /usr/local/src/mgizapp
    sudo chown username /usr/local/src/mgizapp/
    tar -xvzf mgizapp.tgz -C /usr/local/src/mgizapp/
  4. Configuring
    sudo mkdir -p /usr/local/lib/mgizapp
    sudo chown username /usr/local/lib/mgizapp/
    rm CMakeCache.txt
    cmake .
    make
  5. Installing
    make install
    cp -r inst/* /usr/local/lib/mgizapp/
  6. Creating snt2cooc.out file (GIZA++ compabilty)
    #! /bin/bash
    set -e
    usage() {
        echo "Usage: snt2cooc.out vcb1 vcb2 snt12"
        echo "Converts GIZA++ snt-format into plain text."
        exit 1
    }
    [ $# -ne 3 ] && usage
    ${0%/*}/snt2cooc /dev/stdout $1 $2 $3
    exit 0

    chmod 755 snt2cooc.out

  7. Linking some files
    sudo ln -sfn /usr/local/lib/mgizapp/bin/mgiza /usr/local/bin/mgizapp
    sudo ln -sfn /usr/local/lib/mgizapp/bin/mgiza /usr/local/bin/GIZA++
    sudo ln -sfn /usr/local/lib/mgizapp/bin/mgiza /usr/local/bin
    sudo ln -sfn /usr/local/lib/mgizapp/bin/snt2cooc /usr/local/bin
    sudo ln -sfn /usr/local/lib/mgizapp/bin/mkcls /usr/local/bin
    sudo ln -sfn /usr/local/lib/mgizapp/bin/snt2cooc.out /usr/local/bin
    sudo ln -sfn /usr/local/lib/mgizapp/scripts/merge_alignment.py /usr/local/bin

From → Linguistik

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: