Our great sponsors
-
bergamot-translator
Cross platform C++ library focusing on optimized machine translation on the consumer-grade device.
-
firefox-translations
Discontinued Firefox Translations is a webextension that enables client side translations for web browsers.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
firefox-translations-training
Training pipelines for Firefox Translations neural machine translation models
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
firefox-translations-models
CPU-optimized Neural Machine Translation models for Firefox Translations
-
gecko-dev
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
A fork of marian-dev[1] is the underlying machine-translation engine:
- https://github.com/browsermt/marian-dev
Development of higher-level code wrapping around marian-dev make suitable for the browser-extension happens at:
- https://github.com/browsermt/bergamot-translator
Some of the WebAssembly optimizations are available in bergamot-translator/marian-dev. Rest are in Firefox source-code. A start point could be https://bugzilla.mozilla.org/show_bug.cgi?id=1720747.
Extension code is open-source, and linked already in other comments:
Thanks to you for giving the extension a try! This is a very interesting feature, and I'd like to consider it. Would you mind filing an issue in the repo so we could track and discuss it here [1]?
[1] https://github.com/mozilla/firefox-translations/issues
You can find the engine used here [1], the API built around it here [2] and its WASM port here [3] and the WebAssembly matrix multiplication optimizations are here [4]
[1] https://marian-nmt.github.io/
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.
[1] https://github.com/mozilla/firefox-translations-training
A fork of marian-dev[1] is the underlying machine-translation engine:
- https://github.com/browsermt/marian-dev
Development of higher-level code wrapping around marian-dev make suitable for the browser-extension happens at:
- https://github.com/browsermt/bergamot-translator
Some of the WebAssembly optimizations are available in bergamot-translator/marian-dev. Rest are in Firefox source-code. A start point could be https://bugzilla.mozilla.org/show_bug.cgi?id=1720747.
Extension code is open-source, and linked already in other comments:
I'm not aware of any actively maintained projects that give you this out of the box, but these two could be starting points for such a project.
Mozilla implemented a REST service based on (an earlier version of) bergamot-translator [1]. You could use that as a replacement for the WASM component in the addon's code.
I also know of some full-page translation demo code that uses the python bindings of bergamot-translator [2]. That's basically a web proxy a la Goole Translate.
Lastly, marian, the translation software that's being used, has a web server as well [3]. It does not support HTML though.
[1] https://github.com/mozilla/translation-service
[2] https://github.com/jerinphilip/tagtransfer
[3] https://marian-nmt.github.io/docs/#web-server
I'm not aware of any actively maintained projects that give you this out of the box, but these two could be starting points for such a project.
Mozilla implemented a REST service based on (an earlier version of) bergamot-translator [1]. You could use that as a replacement for the WASM component in the addon's code.
I also know of some full-page translation demo code that uses the python bindings of bergamot-translator [2]. That's basically a web proxy a la Goole Translate.
Lastly, marian, the translation software that's being used, has a web server as well [3]. It does not support HTML though.
[1] https://github.com/mozilla/translation-service
[2] https://github.com/jerinphilip/tagtransfer
[3] https://marian-nmt.github.io/docs/#web-server
Try https://translatelocally.com/ – it's the same backend, and should be usable in git HEAD from the cli: https://github.com/XapaJIaMnu/translateLocally/issues/51#iss...
Sure, like I mentioned in the article, you can embed the engine and the models in any web page to be run in a browser with proper WebAssembly and SIMD support.
You can have an example on how we did here [1] and test it here (I recommend using Firefox) [2]
That way you don't need a server and everything is processed in the browser, so no need of google translate, or any cloud service to have translations embedded in any website anymore.
[1] https://github.com/mozilla/translate
Related posts
- Show HN: Using stylometry to find HN users with alternate accounts
- How do I remove this ugly annoying translation bar that pops up on various sites in FireFox? It doesn't show up in Chrome on the same site, and I have not installed any translation extensions as far as I know.
- What do you believe Firefox is missing?
- Mozilla has a new Firefox add-on project for translating websites as you browse [Link]
- True