News for hackers. Stuff that matters.
Re:Mozilla releases local machine translation tools as part ... by Vinnl on Thursday June 02, 2022 @12:25PM (#31596917)
I've been using the extension [1] for a bit and, while it doesn't support too many languages, for the ones it does it's pretty cool to have it all running locally.

[1] https://addons.mozilla.org/firefox/addon/firefox-translation...

Re:Mozilla releases local machine translation tools as part ... by clairity on Thursday June 02, 2022 @01:15PM (#31597723)
neat, but it looks like it was just released, so how were you using it before?

as an aside, pretty sad to see the project page, https://browser.mt/ , requiring not just javascript but specifically google connections to work. to 5 different google properties, no less.

Re:Mozilla releases local machine translation tools as part ... by Vinnl on Thursday June 02, 2022 @01:32PM (#31597981)
I work at Mozilla, so got a sneak preview (and also the first bugs) :)

(Of course technically the work was out there in the open already, since it's Mozilla.)

Agreed about the Bergamot website. I suspect it's not by Mozilla, but I'll see if I can ask someone to take a look, as I don't think all those connections should be necessary.

Re:Mozilla releases local machine translation tools as part ... by 2Gkashmiri on Friday June 03, 2022 @03:30AM (#31605304)
is there a way to opt websites/URLS/ url roots in to automatic translations? currently the "auto translate this tab" works but you have to select it manually and for me at least on linux it makes the window more than 100% so i cannot use the right side of browser in this tab.

you know a simple setting "always translate this website" and an option to hide the bar

Re:Mozilla releases local machine translation tools as part ... by edko on Thursday June 02, 2022 @01:58PM (#31598319)
Do you know if this will be open-sourced, or if the repo is already available?
Re:Mozilla releases local machine translation tools as part ... by space_fountain on Thursday June 02, 2022 @02:02PM (#31598384)
I think this is probably the source https://github.com/mozilla/firefox-translations

edit: and for the actual translations https://github.com/mozilla/bergamot-translator

Re:Mozilla releases local machine translation tools as part ... by clairity on Thursday June 02, 2022 @01:37PM (#31598064)
awesome, thanks! i also suspect it's by the EU coalition behind bergamot, so probably beyond mozilla's jurisdiction, but it doesn't hurt to ask.
Re:Mozilla releases local machine translation tools as part ... by 0des on Thursday June 02, 2022 @01:19PM (#31597787)
.mt huh thats a new one for me
Re:Mozilla releases local machine translation tools as part ... by baobob on Thursday June 02, 2022 @02:10PM (#31598484)
Do you know what the pipeline looks like for new language pairs being added? This is really, really, really awesome

I'm also immediately curious about using it headless outside the browser

Re:Mozilla releases local machine translation tools as part ... by jelmervdl on Thursday June 02, 2022 @03:07PM (#31599231)
The training pipeline is also on Github! [1]

I was experimenting with running the wasm version of bergamot-translator (the translation engine used by the addon) in node [2].

However, if you want more performance, using the Python library [3] or the native C++ interface [4] gets you further because the wasm build is limited to a single thread and thus a blocking interface, and can't use all the processor specific optimisations that are in the native builds.

EDIT: Another option is using translateLocally [5], which is a Qt desktop app based on bergamot-translator. It has a native messaging API that is designed as a much faster alternative to the wasm build for browser extensions, but it can also be used from Python [6].

[1] https://github.com/mozilla/firefox-translations-training

[2] https://gist.github.com/jelmervdl/a4c8b6b92ad88a885e1cbd51c6...

[3] https://colab.research.google.com/drive/1AHpgewVJBFaupwAbZq0...

[4] https://github.com/browsermt/bergamot-translator/blob/main/a...

[5] https://github.com/XapaJIaMnu/translateLocally

[6] https://github.com/XapaJIaMnu/translateLocally/blob/master/s...