Mozilla releases local machine translation tools as part of Project Bergamot

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • bergamot-translator

    Cross platform C++ library focusing on optimized machine translation on the consumer-grade device.

  • 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:

  • firefox-translations

    Discontinued Firefox Translations is a webextension that enables client side translations for web browsers.

  • 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

  • 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.

    InfluxDB logo
  • marian-dev

    Fast Neural Machine Translation in C++ - development repository

  • 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/

  • firefox-translations-training

    Training pipelines for Firefox Translations neural machine translation models

  • 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

  • marian-dev

    Fast Neural Machine Translation in C++ - development repository (by browsermt)

  • 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:

  • translation-service

    This is the repo that hosts the code for Mozilla's translation service

  • 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

  • tagtransfer

    Evaluations for tag-transfer in bergamot

  • 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

  • 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.

    WorkOS logo
  • translateLocally

    Fast and secure translation on your local machine, powered by marian and Bergamot.

  • 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...

  • 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

  • translate

    Translations website utilizing Bergamot proceedings (by mozilla)

  • 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

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts