How to add my own Machine Translation interface?
Thread poster: daibola

daibola
United Kingdom
Sep 4

Hello!

This question may have come up before, in that case, I would be happy to receive a pointer (URL) to the corresponding explanation; so far, I couldn't find anything, neither in the mail list archive nor in the OmegaT FAQ.

In OmegaT (4.3.0), a number of Machine Translation tools are already integrated, and one just has to add the API key to activate one.

How can I add my own, locally running MT?How can I add my own, locally running MT?

I would like to add something like

http://localhost/my_mt/translator.script?sl=%source_language%&tl=%target_language%&st=%source_text%

The reply of my MT is an UTF-8 JSON object containing the translated text. (Of course, I can change that.)

I hope that I do not have to create a groovy script for that (see https://github.com/yoursdearboy/omegat-browser)

Best regards,

Gunnar Lindenblatt
Collapse


 

Milan Condak  Identity Verified
Local time: 02:09
English to Czech
Contact developers of OmegaT Sep 4

daibola wrote:

How can I add my own, locally running MT?



Dear Gunnar,

I have a similar problem. I want to intergrate old and working desktop MT czech "PC Translator" for MS Windows into OmegaT.

Your MT is in Linux?

Connect OmegaT development page:

https://sourceforge.net/projects/omegat/

https://sourceforge.net/projects/omegat/lists/omegat-development

Or ask in OmegaT users group:

http://groups.yahoo.com/group/OmegaT/

http://groups.yahoo.com/group/OmegaT/join

Milan


 

Samuel Murray  Identity Verified
Netherlands
Local time: 02:09
Member (2006)
English to Afrikaans
+ ...
@Milan Sep 5

Milan Condak wrote:
I have a similar problem. I want to intergrate old and working desktop MT czech "PC Translator" for MS Windows into OmegaT.


Does the "PC Translator" also work with a localhost URL and predictable output?


 

Samuel Murray  Identity Verified
Netherlands
Local time: 02:09
Member (2006)
English to Afrikaans
+ ...
@Gunnar, not the answer you were hoping for Sep 5

daibola wrote:
How can I add my own, locally running MT?


Here's a possible method (not tried by me) that may be a possible workaround. In OmegaT, in Options > Preferences > Editor, there is the option "Export the segment to text files". This exports the current source text to a text file[1], ostentatiously so that the user can run some functions on the source text using an external program. You could write a script that listens for when this file is updated, then grab that source text from it, translate it, optionally display it as a tooltip, and add the translation to the clipboard, so that you can insert it using Ctrl+V.

[1] C:\Users\YourName\AppData\Roaming\OmegaT\script\source.txt

[Thinking about your question reminded me that the feature could maybe do with a bit of an upgrade. Wouldn't it be great if OmegaT can also "listen" for the presence of a file containing updated target text, and then automatically insert it into the target field in OmegaT (or display it as fuzzy match number 0, or display it in the machine translation pane for easy insertion)? If such a feature existed, it would mean, however, that there needs to be an external script to translate the text, but at least it would make it easier to get the text into OmegaT.]


 

Milan Condak  Identity Verified
Local time: 02:09
English to Czech
Demo version of PC Translator 2007 Sep 5

Samuel Murray wrote:

Does the "PC Translator" also work with a localhost URL and predictable output?


Dear Samuel,

In 1989 we do not know what URL is. I have some my articles in folder /archiv-cz/. I translated some articles for Interlingua Conference with Google Translate. I have to edit MT-ed text.

http://www.condak.cz/archiv-cz/demo/demo.html

You can download demo with EN-CS or DE-CS dictionary. There is also EMPTY dictionary, which work in full version (maybe in demo, too).

PC Translator with installed plugin for MS Word works with Wordfast Classic.

Thank you for your interest,

Milan




[Edited at 2019-09-05 09:13 GMT]


 

Samuel Murray  Identity Verified
Netherlands
Local time: 02:09
Member (2006)
English to Afrikaans
+ ...
@Gunnar Sep 5

daibola wrote:
How can I add my own, locally running MT?


I asked this question on the OmegaT developer list, and I was reminded that DGT-OmegaT may have some useful content about this:
http://185.13.37.79/?q=/node/5
http://185.13.37.79/?q=/node/28
(Remember, DGT-OmegaT is a fork of OmegaT that is very similar to OmegaT but which has some differences as well. As far as I know, the projects created by DGT-OmegaT and OmegaT are fully interchangeable.)

OmegaT also has another feature that may be useful here: if you create a TM and put it in the folder /tm/mt/, and if there is an exact match from that TM, OmegaT will mark the segment in purple to warn you about it. So, what you must do is extract all of the source text, run it all through the MT service, and align the source text and machine translation into a TMX file, and then use that.

I often perform extraction in OmegaT, using Kos' write_table.groovy script, which I modified to output one single table per project instead of separate tables for separate files. It creates an HTML file in the /script-output/ folder. Open it in MS Word (or in a browser). I suppose one could modify it to create a TMX file instead. Then you just have to figure out how to translate the TMX file in your MT system. There are a few TMX related scripts already, but none of them work for me ("unable to resolve class org.omegat.util.TMXReader").


Milan Condak
 

briacp
Local time: 02:09
English to French
Simple custom Machine Translator Sep 5

Hello,

I wrote a very simple and barebone OmegaT plugin for a custom MT. The plugin is available on GitHub omegat-plugin-fake-mt 1.0.0, along with a sample Node.js TM server.

Cheers,
Briac


Milan Condak
 

Milan Condak  Identity Verified
Local time: 02:09
English to Czech
It looks promising Sep 6

briacp wrote:

Hello,

I wrote a very simple and barebone OmegaT plugin for a custom MT.



Hi Briac,

I downloaded your plugin, put it into subfolder /plugins/ and "Fake MT" is visibible. I think it could be a solution for Gunnar.

Another tip for web MT: https://www.translate2018.eu/#/text

= EU Council Presidency Translator.

Cheers,

Milan


 

Christian Werner-Meier  Identity Verified
France
Local time: 02:09
English to German
+ ...
Okapi Tools Sep 6

I just wanted to point at the possibility to use the Okapi tool suite, and notably rainbow, to take any source file, convert ist to Xliff, which is segmented, generate a tab delimited file from this, have this translated with any tool, and to convert a translated tab delimited file into a tmx for OmegaT.

 

daibola
United Kingdom
TOPIC STARTER
Merci beaucoup ! Sep 7

briacp wrote:

I wrote a very simple and barebone OmegaT plugin for a custom MT. (...)


Thank you very, very much!
Merci beaucoup !
Vielen herzlichen Dank!
非常感谢!

That’s exactly what I was looking for. I installed your plug-in, added the URL in the settings dialogue, and now the translations of my local MT will appear in the MT subwindow, and a Ctrl-M will copy that result into the editor subwindow.

Marvellous!

Your plug-in will be used for The SOS Card Project http://www.sos-card.info/ . The local MT, I keep talking about, is a newly designed, (artificial) Neuronal Network based Chinese-German MT based on the corpus of the DeHanCi http://www.dehanci.com/ . After some testing and improvements, I hope it will be made publicly available as well.


 


There is no moderator assigned specifically to this forum.
To report site rules violations or get help, please contact site staff »


How to add my own Machine Translation interface?

Advanced search






WordFinder Unlimited
For clarity and excellence

WordFinder is the leading dictionary service that gives you the words you want anywhere, anytime. Access 260+ dictionaries from the world's leading dictionary publishers in virtually any device. Find the right word anywhere, anytime - online or offline.

More info »
Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search