I had built a english - german Translation server using Docker Image. It works very badly sometimes. I had used it for different source translation it works good most of the time.
How do I improve the translation efficiency ?
I am now planning for German - English translation server. Do we have any existing models for this?
How many language pairs are supported by OpenNMT presently ? Where could I get those information ?
Those underlined in red is Input
Those with arrows in Blue is output
The sentence highlighted in yellow is the really issue which does not get translated at all.
Could you please assist here ?
Also please assist me in the following queries also:
I am now planning for German - English translation server. Do we have any existing models for this?
How many language pairs are supported by OpenNMT presently ? Where could I get those information ?
How do you run the server? Are you applying the correct tokenization?
I run the server using the below command: sudo docker run -v $PWD/data:/data -p 7784:7784 --entrypoint th opennmt/opennmt:latest tools/rest_translation_server.lua -host 0.0.0.0 -model /data/model-ende_epoch7_5.55_release.t7 -bpe_model /data/train-ende.bpe32000 -mode aggressive -segment_case -joiner_annotate
I am trying to create a german to english server at a different port .
I am already using a server for english to german at port 7784 with the following command: sudo docker run -v $PWD/data:/data -p 7784:7784 --entrypoint th opennmt/opennmt:latest tools/rest_translation_server.lua -host 0.0.0.0 -model /data/model-ende_epoch7_5.55_release.t7 -bpe_model /data/train-ende.bpe32000 -mode aggressive -segment_case -joiner_annotate
For running the same server for german to english translation at different port, I am unable to
run with the models in “http://opennmt.net/Models-py/” with the above opennmt/opennmt:latest image.
I get the following error message with .pt model files administrator:~/OpenNMT$ sudo docker run -v $PWD/data:/data -p 7786:7786 --entrypoint th opennmt/opennmt:latest tools/rest_translation_server.lua -host 0.0.0.0 -model /data/data_de_en/averaged-10-epoch.pt -mode aggressive -segment_case -joiner_annotate tput: No value for $TERM and no -T specified [06/12/19 11:12:43 INFO] Loading model * [06/12/19 11:12:43 INFO] Loading ‘/data/data_de_en/averaged-10-epoch.pt’… * /root/torch/bin/luajit: /root/torch/share/lua/5.1/torch/File.lua:375: unknown object stack traceback:
*** [C]: in function ‘error’
*** /root/torch/share/lua/5.1/torch/File.lua:375: in function ‘readObject’***
*** /root/torch/share/lua/5.1/torch/File.lua:409: in function ‘load’***
*** ./onmt/translate/Translator.lua:200: in function ‘__init’***
*** /root/torch/share/lua/5.1/torch/init.lua:91: in function ‘new’***
*** tools/rest_translation_server.lua:190: in function ‘main’***
*** tools/rest_translation_server.lua:197: in main chunk***
*** [C]: in function ‘dofile’***
*** /root/torch/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk***
*** [C]: at 0x00405d50*** administrator:~/OpenNMT$
Could you please send me the link for model (*.t7 model , bpe model) for german to english translation ?
Please do reply as I require those model to build a german to english server . Please assist me to
resolve this error.
I think I already mentioned that there is no German to English model publicly available for OpenNMT-lua. You can train one yourself using publicly available data (see for example http://www.statmt.org/wmt19/translation-task.html) or ask on #marketplace for people to train one for you.
As there is no trained OpenNMT-lua models from german to english, I had trained the model using the data from the link: git clone https://github.com/OpenNMT/OpenNMT. SInce it is from german to english, I had used tgt related files for src and src related file for tgt. After training the models in 13 epoch, I get the following error message when running the server at a different port.
**administrator@:~/OpenNMT/Server/OpenNMT$ sudo docker run -v $PWD/data:/data -p 7785:7785 --entrypoint th opennmt/opennmt:latest tools/rest_translation_server.lua -host 0.0.0.0 -model data/demo-model-de-en_epoch11_522.73.t7 -mode aggressive -segment_case -joiner_annotate ** tput: No value for $TERM and no -T specified rest_translation_server.lua: invalid argument for option -model: if set, the file must exist Try ‘rest_translation_server.lua -h’ for more information, or browse the documentation in the docs/ directory. administrator@~/OpenNMT/Server/OpenNMT$
I am unable ot understand why it says that the file must exists