metadata
license: bsd-3-clause
language:
- en
- zh
tags:
- translation
This is a translation model from English to Chinese and it can be consumed by Seq2SeqSharp (https://github.com/zhongkaifu/Seq2SeqSharp). You can clone Seq2SeqSharp, build it and run the model as follows:
- git clone https://github.com/zhongkaifu/Seq2SeqSharp.git
- cd Seq2SeqSharp
- dotnet build Seq2SeqSharp.sln --configuration Release
- cd Tools
- cd Seq2SeqConsole
- cd bin
- ./bin/Seq2SeqConsole -Task Test -ModelFilePath mt_enu_chs.model -InputTestFile %InputFilePath% -OutputFile %OutputFilePath% -ProcessorType %Device% -MaxSrcSentLength 220 -MaxTgtSentLength 220
- %InputFilePath% is English input file for translation. It's one sentence per line. It needs to be tokenized by SentencePiece encoder using enuSpm.model in this repo
- %OutputFilePath% is translated Chinese file output by the model. It's one sentence per line. You can decode them by SentencePiece decoder using cjkSpm.model in this repo
- %Device% is device type for model inference, it can be GPU, CPU and CPU_MKL(For Windows only).