mcthulhu / jorkens

epub reader based on epub.js for foreign language learners
55 stars 7 forks source link

Optional 3rd party translation services? #8

Open ParaplegicRacehorse opened 3 years ago

ParaplegicRacehorse commented 3 years ago

Are there plans to provide option to link translation to an online service, such as DeepL or IBM Watson or Apertium?

mcthulhu commented 3 years ago

Jorkens can currently send a highlighted passage to three online services, Amazon Translate, Google Translate, and Libre Translate -- see the machine translation menu.

I'm certainly open to adding more MT options, at least through a popup window for the respective web sites. It looks like that should be fairly easy to do at least for DeepL, unless I'm missing something. Actual API usage might depend on the sites' free tier limits, or how easy it is to use an individual user's local credentials, if that user chooses to pay; every site has its own authentication system. It looks like DeepL charges $7 a month for unlimited text translation for individuals. I'd have to think about whether I could afford to pay out of pocket for users' data access.

I found the Watson Language Translator demo site at https://www.ibm.com/demos/live/watson-language-translator/self-service/home, if that's what you meant.

I found the Apertium web interface at https://www.apertium.org (the link you gave was for the GitHub site). I think I should be able to link to that fairly easily. I'm not sure how many language combinations are supported.

I'll be away for a bit, but will look into this further when I get back.

mcthulhu commented 3 years ago

OK, I just added Apertium under the MT menu. I'm not impressed with the translation quality in my test, though.