nusnlp / smtgec2017

A statistical machine translation (SMT)-based grammatical error correction system that makes use of neural network joint models (NNJM) and and character-level SMT for spelling correction.
GNU General Public License v3.0
25 stars 5 forks source link

Error installing Moses with nplm #1

Closed Krishna1997 closed 6 years ago

Krishna1997 commented 6 years ago

Hi,

I am getting an error when installing Moses with nplm. I have attached the build log also. build.log.gz

I installed nplm and used the below command to install moses. ./bjam -j12 --with-nplm=../nplm --max-kenlm-order=9

Can you please let me know how exactly did you install Moses with nplm?

shamilcm commented 6 years ago

Did you install the correct Moses version as given in download.sh within models/ directory. Also, try to install NPLM according to the instructions given here: https://github.com/moses-smt/nplm

Krishna1997 commented 6 years ago

Yes, I did install as you mentioned. I installed nplm outside the mosesdecoder folder. When I ran the above command, all the errors that I got are g++ header errors such as fatal error: neuralLM.h: No such file or directory

include

fatal error: neuralTM.h: No such file or directory

include

When I copied these header files from nplm folder to corresponding locations in mosesdecoder the above errors are gone but I got the following errors in linking the libraries.

...failed gcc.link /home/development/krishna1997/smtgec2017/software/mosesdecoder/bin/build_binary... gcc.link /home/development/krishna1997/smtgec2017/software/mosesdecoder/bin/query /usr/bin/ld: cannot find -lnplm collect2: error: ld returned 1 exit status

Then I copied the libnplm.a and libnplm.so libraries to mosesdecoder folder but it still throws the same error

shamilcm commented 6 years ago

I don't think you need to copy anything from nplm/ directory to Moses directory. Try recompiling, by removing whatever you copied into Moses directory, but make sure you put the full path to NPLM when you compile moses --with-nplm=/full/path/to/nplm .