tensorflow / nmt

TensorFlow Neural Machine Translation Tutorial
Apache License 2.0
6.37k stars 1.96k forks source link

Is the translation is done correctly ?? In windows #211

Open sushant097 opened 6 years ago

sushant097 commented 6 years ago

After I sucessfully Train the model,

Inference – How to generate translations

When i run the translation vietnam to English as:

cat > /tmp/my_infer_file.vi
Làm sao tôi có thể trình bày trong 10 phút về sợi dây liên kết những người phụ nữ qua ba thế hệ , về việc làm thế nào những sợi dây mạnh mẽ đáng kinh ngạc ấy đã níu chặt lấy cuộc sống của một cô bé bốn tuổi co quắp với đứa em gái nhỏ của cô bé , với mẹ và bà trong suốt năm ngày đêm trên con thuyền nhỏ lênh đênh trên Biển Đông hơn 30 năm trước , những sợi dây liên kết đã níu lấy cuộc đời cô bé ấy và không bao giờ rời đi -- cô bé ấy giờ sống ở San Francisco và đang nói chuyện với các bạn hôm nay ?

python -m nmt.nmt \
    --out_dir=/tmp/nmt_model \
    --inference_input_file=/tmp/my_infer_file.vi \
    --inference_output_file=/tmp/nmt_model/output_infer

cat /tmp/nmt_model/output_infer # To view the inference as output

I copy some words from the tst2012.vi

The output comes as combination of many <unk> tag. Is it correct Translation?? See this ouput: image

StupidL commented 6 years ago

The tag means that this word can not found in your vocab file. You can expand your vocab file and train the model again and you can see the correct word.

htpauleta commented 6 years ago

python -m nmt.nmt --out_dir=/tmp/nmt_model --inference_input_file=/tmp/pau_infer_file.en --inference_output_file=/tmp/nmt_model/output_infer

translate english to chinese:

pau_infer_file.en --> sentence1: he was on the first flight to cape verde . sentence2: he was out of control after that , and i guess ?

nmt

how to solve this problem? Thanks