Skip to content

Installing IRSTLM on Ubuntu

January 15, 2014
  1. Get the source from here http://sourceforge.net/projects/irstlm/
  2. Installing some dependencies
    sudo apt-get install build-essential
    sudo apt-get install automake
    sudo apt-get install libtool
    
    sudo apt-get install zlib1g-dev
  3. Extracting files
    sudo mkdir -p /usr/local/src/irstlm
    sudo chown username /usr/local/src/irstlm
    
    tar -xvzf irstlm.tgz -C /usr/local/src/irstlm
  4. Compiling
    sudo mkdir -p /usr/local/lib/irstlm 
    sudo chown username /usr/local/lib/irstlm
    
    ./regenerate-makefiles.sh
    
    ./configure --prefix=/usr/local/lib/irstlm --enable-caching
    
    make -j 4
  5. Installing
    make -j 4 install
    
    sudo ln -sfn /usr/local/lib/irstlm/bin/add-start-end.sh /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/build-lm-qsub.sh /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/build-lm.sh /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/build-sublm.pl /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/compile-lm /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/dict /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/goograms2ngrams.pl /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/interpolate-lm /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/lm-stat.pl /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/merge-sublm.pl /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/ngram-split.pl /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/ngt /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/plsa /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/prune-lm /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/quantize-lm /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/rm-start-end.sh /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/score-lm /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/sort-lm.pl /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/split-dict.pl /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/split-ngt.sh /usr/local/bin
    sudo ln -sfn /usr/local/lib/irstlm/bin/tlm /usr/local/bin

From → Linguistik

2 Comments
  1. Despina permalink

    Hello, congrats its a very nice guide! I have already done steps 1,2,3 but from the 4th i have problem with generate. When i put ./regenerate-makefiles.sh it is said no such a file or directory. Any ideas?
    Thank you in advance.

    • Kid permalink

      The file “regenerate-makefiles.sh” can be found in /usr/local/src/irstlm/irstlm-5.80.08/trunk…
      tar -xvzf irstlm.tgz -C /usr/local/src/irstlm => extracted the file to this location… You are probably executing the commands from a different place..

      Try – cd /usr/local/src/irstlm/irstlm-5.80.08/trunk
      and then – ./regenerate-makefiles.sh

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: