OpenNMT Forum

German to English Translation Server

Hi ,

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.

  1. How do I improve the translation efficiency ?

  2. I am now planning for German - English translation server. Do we have any existing models for this?

  3. How many language pairs are supported by OpenNMT presently ? Where could I get those information ?

Thank You,
Kishor.

Hi,

Are you using OpenNMT LuaTorch?

Hi,

Presently I am using the pre-trained model shared by you as the docker image.viz.
“wget https://s3.amazonaws.com/opennmt-models/wmt-ende_l2-h1024-bpe32k_release.tar.gz && tar xf wmt-ende_l2-h1024-bpe32k_release.tar.gz”

When I enter the following sentence the output is as follows:


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:

  1. I am now planning for German - English translation server. Do we have any existing models for this?
  2. How many language pairs are supported by OpenNMT presently ? Where could I get those information ?

Regards,
Kishor.

Yes.it is a OpenNMT LuaTorch server…downloaded from the below url :

“wget https://s3.amazonaws.com/opennmt-models/wmt-ende_l2-h1024-bpe32k_release.tar.gz && tar xf wmt-ende_l2-h1024-bpe32k_release.tar.gz

How do you run the server? Are you applying the correct tokenization?

I am now planning for German - English translation server. Do we have any existing models for this?

There is a small German English model for experimentation with OpenNMT-py: http://opennmt.net/Models-py/

It basically supports all language pairs, assuming there is enough training data.

Thank a ton for the reply…

Hi,

If we are using the Docker OpenNMT Server Image for translation then how do we
expose the server through REST API.

Could you please give info on this ?

Thank You,
kishor

Hi,

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

how do I apply tokenization here ? 

Thanks In advance ,
Kishor

You are already applying a tokenization. So what is the issue? Did you try more examples?

Hi,

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.

Thank You,
Kishor.

OpenNMT-lua can not run OpenNMT-py models.

See Simple OpenNMT-py REST server if you intend to run OpenNMT-py models.

Hi,

SInce I am already using OpenNMT-lua models for english -german , please send me the
url for downloading the openNMT-lua models for german - english .

Please send me the download url.

Thank You,
Kishor.

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.

okay…got it…I will check that …thanks again for the reply.

Hi,

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

Please assist me in resolving this concern.

Thank You,
Kishor.