Build you own translator from chinese to english with seq2seq model in pytorch😄
- `torchtext >= 1.8'
spacy
get_loaderl.py
: Define the dataloader using torchtexttrain.py
: Train the modelmodel.py
: Define the modelinference.py
:Translate your own chinese sentece to english one !!
- 'saved_vocab`: Contain serval vocabulary txt and you can also generate then during training
translation2019zh
: This is Google's chinese2english translation samples. It's huge and i only take the validation dataset to train
- 'Go inside the train.py, set some hyperparameters if you want or just run it!'
- `Go inside the inference.py, set the your own chinese sentence at line 73