Document directory
- Change the line under # location of gawk binary
- Gawk =/usr/bin/gawk
- Export Path = $ path:/home/Administrator/srilm/bin/i686:/home/Administrator/srilm/bin
- Next, execute the compilation steps.
- Well, let's write it here. If you have any questions, please leave me a message!
Because ubuntu10.10 is relatively new, I have been experimenting with it for a long time based on my previous blog, and I have always encountered such and such errors. I have worked hard and finally solved them! Here we will write down the steps to see this post without any detours. Before installation, you can configure the Ubuntu source, which will be faster! (1) because the GCC version of ubuntu10.10 is relatively high, you need to download a lower version and set it to the default version. Sudo apt-Get install gcc-4.1 next, set the gcc-4.1 to the default GCC compiler sudo mV/usr/bin/GCC. baksudo ln-S/usr/bin/gcc-4.1/usr/bin/GCC now you can view the current default GCC version by viewing GCC -- version. This is my result: GCC (GCC) 4.1.3 20080704 (prerelease) (Ubuntu 4.1.2-29ubuntu1) Copyright (c) 2006 Free Software Foundation, Inc. this isfree software; see the source for copying conditions. there is nowarranty; not even for merchantability or fitness for a particle purpose. (2) download related software: G ++, make, gawk, Gzip, Bzip2, p7zip, tcl8.5, and CSH. You can view the installation path through which *, for example: if which make is not installed, use: sudo apt-Get install * to install it. For example, sudo apt-Get install tcl8.5 (3) all conditions are ready, next, we will officially download and install the srilm version 1.5.12, Which is http://www-speech.sri.com/projects/srilm/download.htmlmy downloaded contents are:/home/Administrator/srilm. tgzcd/home/Administrator/srilm/sudo tar-zxvf srilm. add a line after # srilm =/home/speech/stolcke/project/srilm/devel in tgzsudo gedit makefile with the following content: srilm =/home/Administrator/srilm/ Add # In Front Of machine_type :=$ (shell $ (srilm)/sbin/machine-type) and input: machine_type: = i686 in another line to save and close. CD common/sudo gedit makefile. machine. i686 will # Use the gnu c compiler. change the following three rows to gcc_flags =-mtune = pentium3-wreturn-type-wimplicitcc = GCC $ (gcc_flags) cxx = g ++ $ (gcc_flags) -dinstantiate_templates: Change the following two lines under # TCL support (standard in Linux): tcl_include =-I/usr/include/tcl8.5tcl _ Library =-L/usr/lib/tcl8.5 change the line under # location of gawk binary to gawk =/usr/bin/gawk environment variable: add sudo gedit/etc/profile before umask022 in the last line One row: Export Path = $ path:/home/Administrator/srilm/bin/i686:/home/Administrator/srilm/bin. Next, execute the compilation step CD .. after the make world command is executed, test make test. If identical is displayed, the command is successful! For example, *** running test multi-Ngram *** sh: cannot create output/multi-ngram.i686.stdout: Permission deniedcommandexited with non-zero status limit 00user0.00system. 00 elapsed? % CPU (0 avgtext + 0 avgdata 2112 maxresident) k0inputs + 0 outputs (0 major + 262 minor) pagefaults 0 SWAPs/home/Administrator/srilm // sbin/go. run-test: 35: cannot create output/multi-ngram.i686.stderr.new: permissiondenied/home/Administrator/srilm // sbin/go. run-test: 35: cannot create output/multi-ngram.i686.stdout.new: permissiondeniedmulti-Ngram: stdout output identical. multi-Ngram: stderr output identical. okay, let's write it here, everybody. If you have any questions, please leave me a message!
Note that the following result is displayed when Ngram is entered on the terminal:
Ngram: Command not found
This is a path configuration problem. Enter
Export Path = $ path:/home/Administrator/srilm/bin/i686:/home/Administrator/srilm/bin
That's all!