Kyubyong / cjk_trans

Pre-trained Machine Translation Models of Korean from/to ECJ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do I load the pretrained models?

justinsowhat opened this issue · comments

Hi,

First of all, thank you so much for the trained models!

I haven't been able to figure out how to load the pretrained language models, and the pretrained MT models require vocab files. Could you include some code snippet on how to load the models and do translate in your README file?

Thanks!

Never mind. I just figured out.

I have same problem. How did you figured it?

@jaeyoung0909 I only needed it for the interactive mode; so here's what I did:

fairseq-interactive --path <checkpoint_file_path> . \
                        --beam 5 \
                        --source-lang ko \
                        --target-lang en \
                        --bpe sentencepiece \
                        --sentencepiece-vocab <sentence_piece_vocab_file>

Thank you!
I am so sorry to bother you, but can you tell me how to generate sentence_piece_vocab_file?

Oh I understand know. Thank you!