moses-smt / giza-pp

GIZA++ is a statistical machine translation toolkit that is used to train IBM Models 1-5 and an HMM word alignment model. This package also contains the source for the mkcls tool which generates the word classes necessary for training some of the alignment models.
264 stars 83 forks source link

Issues running plain2snt.out #16

Open theamato opened 1 year ago

theamato commented 1 year ago

I'm Trying to run plain2snt.out on two text files in colab, but I get the error /content/giza-pp/GIZA++-v2/plain2snt.out:/content/giza-pp/GIZA++-v2/plain2snt.out: cannot execute binary file.

I installed the library like this: !git clone https://github.com/moses-smt/giza-pp.git %cd /content/giza-pp/GIZA++-v2/ !make and then ran plain2snt.out like this: !bash /content/giza-pp/GIZA++-v2/plain2snt.out /content/drive/MyDrive/big_corp_arabic.txt /content/drive/MyDrive/big_corp_english.txt.

I missing something? I'm working in Google Colab by the way.

hieuhoang commented 1 year ago

no trouble for me. # ./GIZA++-v2/plain2snt.out -h ./GIZA++-v2/plain2snt.out txt1 txt2 [txt3 txt4 -weight w] Converts plain text into GIZA++ snt-format. Did you compile the executable on the same machine you're trying to run it?

theamato commented 1 year ago

Yes, I did. I read herehttps://superuser.com/questions/435988/how-can-i-resolve-the-error-cannot-execute-binary-file that the error can occur if one is running the executable on the wrong architecture - apparantly Colab is using x86_64. But if you had no issues with this I guess it has to be something else?