artetxem/undreamt

Error while using undreamt as regular NMT : print(line, file=f) invalid syntax

kamal-kg opened this issue · 1 comments

Hi, I am using undreamt as regular NMT. After running following command :

python train.py --src2trg ../nematus/test/data/norig_out.hi ../nematus/test/data/norig_out.en --src_vocabulary ../nematus/test/data/norig_out.hi.json --trg_vocabulary ../nematus/test/data/norig_out.en.json --embedding_size 300 --learn_encoder_embeddings --disable_denoising --save MODEL_PREFIX --cuda

getting this error:

Traceback (most recent call last):
File "train.py", line 16, in
import undreamt.train
File "/home1/kamalpcs17/undreamt/undreamt/train.py", line 425
print(line, file=f)
^
SyntaxError: invalid syntax

(My python version is 2.7)

As described in the readme, you should use python 3 and not python 2. Also, the vocabulary should be given as a text file with one word per line and not in json.