mirror of
https://github.com/dragen1860/TensorFlow-2.x-Tutorials.git
synced 2021-05-12 18:32:23 +03:00
Chinese-to-English Machine Translation
HowTo
- install required packages.
pip install bert-for-tf2
-
python transformer_train.pyto run naive transformer model. -
python bert_train.pyto run BERT pretrained encoder model.
Screenshot
- transformer
Chinese src: 周四和周五发生在五个省份的炸弹爆炸事件导致四人死亡,几十人受伤,遭袭地点包括旅游胜地普吉和华 欣。
Translated : Four weeks and five-week bombings have killed four people and injured dozens of others, including tourism and the likelihood of land grabs.
Real: The bombings in five provinces on Thursday and Friday, including in Phuket and Hua Hin, areas popular with tourists, killed four people and injured dozens.