{"id":69082,"date":"2022-06-02T08:23:26","date_gmt":"2022-06-02T15:23:26","guid":{"rendered":"https:\/\/blog.mozilla.org\/?p=69082"},"modified":"2022-06-03T08:17:39","modified_gmt":"2022-06-03T15:17:39","slug":"local-translation-add-on-project-bergamot","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/","title":{"rendered":"Mozilla releases local machine translation tools as part of Project Bergamot"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>In January of 2019, Mozilla joined the University of Edinburgh, Charles University, University of Sheffield and University of Tartu as part of a project funded by the European Union called <a href=\"https:\/\/browser.mt\/\">Project Bergamot<\/a>. The ultimate goal of this consortium was to build a set of neural machine translation tools that would enable Mozilla to develop a website translation add-on that operates locally, i.e. the engines, language models and in-page translation algorithms would need to reside and be executed entirely in the user\u2019s computer, so none of the data would be sent to the cloud, making it entirely private.<\/p>\n\n\n\n<p>In addition to that, two novel features needed to be introduced. The first was translation of forms, to allow users to input text in their own language that is dynamically translated on-the-fly to the page\u2019s language. The second feature was quality estimation of the translations where low confidence translations should be automatically highlighted on the page, in order to notify the user of potential errors.<\/p>\n\n\n\n<p>This set of requirements posed a number of technological challenges to the team: the translation engine was entirely written in programming languages that compile to native code. We needed a way to streamline the distribution of the project in order to avoid the overhead involved in providing builds compatible with all platforms supported by Firefox \u2014 that would be impracticable to scale and maintain. Also, the engine needed to perform fast enough on CPUs and not rely on GPUs like is traditionally required by deep learning solutions.<\/p>\n\n\n\n<p>Our solution to that was to develop a high-level API around the machine translation engine,<a href=\"https:\/\/github.com\/browsermt\/bergamot-translator\/tree\/main\/wasm\"> port it to WebAssembly<\/a>, and optimize the operations for matrix multiplication to <a href=\"https:\/\/github.com\/mozilla\/gecko-dev\/tree\/master\/third_party\/intgemm\">run efficiently on CPUs<\/a>. That enabled us to not only develop the translations add-on but also allowed every web page to integrate local machine translation, <a href=\"https:\/\/mozilla.github.io\/translate\/\">like in this website<\/a>, which lets the user perform free-form translations without using the cloud.\u00a0\u00a0\u00a0\u00a0<\/p>\n\n\n\n<p>The <a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/firefox-translations\/\">translations add-on is now available in the Firefox Add-On store for installation <\/a>on Firefox Nightly, Beta and in General Release. We are looking for users\u2019 feedback and in the add-on, you\u2019ll see a button to <a href=\"https:\/\/qsurvey.mozilla.com\/s3\/Firefox-Translations\">fill out a survey<\/a> that will help Project Bergamot collaborators understand which direction we should take the product.&nbsp;<\/p>\n\n\n\n<p>To empower the community to contribute with new languages we also developed a <a href=\"https:\/\/github.com\/mozilla\/firefox-translations-training\">comprehensive training pipeline <\/a>to allow enthusiasts to easily train new models, helping expand the add-on reach.&nbsp;<\/p>\n\n\n\n<p>This work aligns with Mozilla&#8217;s <a href=\"https:\/\/webvision.mozilla.org\/full\/#internationalization\">commitment<\/a> to keeping the web accessible to everyone regardless of their language while also building open-source projects of value to our community with a focus on privacy. Please join us and <a href=\"https:\/\/github.com\/mozilla\/firefox-translations\">send suggestions<\/a> \u2014 we need all of your voices to make this add-on truly accessible for all.&nbsp;<\/p>\n\n\n\n<p><em>This project has received funding from the European Union\u2019s Horizon 2020 research and innovation programme under grant agreement No 825303<\/em> \ud83c\uddea\ud83c\uddfa.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In January of 2019, Mozilla joined the University of Edinburgh, Charles University, University of Sheffield and University of Tartu as part of a project funded by the European Union called Project Bergamot. The ultimate goal of this consortium was to build a set of neural machine translation tools that would enable Mozilla to develop a [&hellip;]<\/p>\n","protected":false},"author":1829,"featured_media":68613,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[463312,5],"tags":[119,4708],"coauthors":[464141],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Mozilla releases local machine translation tools as part of Project Bergamot<\/title>\n<meta name=\"description\" content=\"The translations add-on is now available in the Firefox Add-On store for installation on Firefox Nightly, Beta and in General Release.\u00a0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/\",\"url\":\"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/\",\"name\":\"Mozilla releases local machine translation tools as part of Project Bergamot\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2022\/03\/moz_blog_header_pattern_1920x1080_03.jpg\",\"datePublished\":\"2022-06-02T15:23:26+00:00\",\"dateModified\":\"2022-06-03T15:17:39+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/en\/#\/schema\/person\/edf11bdfdb1d24f1a537f9e945f05c0d\"},\"description\":\"The translations add-on is now available in the Firefox Add-On store for installation on Firefox Nightly, Beta and in General Release.\u00a0\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/#primaryimage\",\"url\":\"https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2022\/03\/moz_blog_header_pattern_1920x1080_03.jpg\",\"contentUrl\":\"https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2022\/03\/moz_blog_header_pattern_1920x1080_03.jpg\",\"width\":1920,\"height\":1080,\"caption\":\"An illustration shows the Mozilla logo atop a pattern of building blocks.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mozilla releases local machine translation tools as part of Project Bergamot\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/en\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/en\/\",\"name\":\"The Mozilla Blog\",\"description\":\"News and Updates about Mozilla\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/en\/#\/schema\/person\/edf11bdfdb1d24f1a537f9e945f05c0d\",\"name\":\"Rebecca Smith\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/en\/#\/schema\/person\/image\/8d54bca6e5af79b1181b5e9f1af3af60\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6d9f29bb1ee6c52e55575057e21d2342?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6d9f29bb1ee6c52e55575057e21d2342?s=96&d=mm&r=g\",\"caption\":\"Rebecca Smith\"},\"url\":\"https:\/\/blog.mozilla.org\/en\/author\/rsmithmozilla-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Mozilla releases local machine translation tools as part of Project Bergamot","description":"The translations add-on is now available in the Firefox Add-On store for installation on Firefox Nightly, Beta and in General Release.\u00a0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/","url":"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/","name":"Mozilla releases local machine translation tools as part of Project Bergamot","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/#primaryimage"},"image":{"@id":"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2022\/03\/moz_blog_header_pattern_1920x1080_03.jpg","datePublished":"2022-06-02T15:23:26+00:00","dateModified":"2022-06-03T15:17:39+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/en\/#\/schema\/person\/edf11bdfdb1d24f1a537f9e945f05c0d"},"description":"The translations add-on is now available in the Firefox Add-On store for installation on Firefox Nightly, Beta and in General Release.\u00a0","breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/#primaryimage","url":"https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2022\/03\/moz_blog_header_pattern_1920x1080_03.jpg","contentUrl":"https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2022\/03\/moz_blog_header_pattern_1920x1080_03.jpg","width":1920,"height":1080,"caption":"An illustration shows the Mozilla logo atop a pattern of building blocks."},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/en\/mozilla\/local-translation-add-on-project-bergamot\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/en\/"},{"@type":"ListItem","position":2,"name":"Mozilla releases local machine translation tools as part of Project Bergamot"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/en\/#website","url":"https:\/\/blog.mozilla.org\/en\/","name":"The Mozilla Blog","description":"News and Updates about Mozilla","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/en\/#\/schema\/person\/edf11bdfdb1d24f1a537f9e945f05c0d","name":"Rebecca Smith","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/en\/#\/schema\/person\/image\/8d54bca6e5af79b1181b5e9f1af3af60","url":"https:\/\/secure.gravatar.com\/avatar\/6d9f29bb1ee6c52e55575057e21d2342?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6d9f29bb1ee6c52e55575057e21d2342?s=96&d=mm&r=g","caption":"Rebecca Smith"},"url":"https:\/\/blog.mozilla.org\/en\/author\/rsmithmozilla-com\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/posts\/69082"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/users\/1829"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/comments?post=69082"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/posts\/69082\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/media\/68613"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/media?parent=69082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/categories?post=69082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/tags?post=69082"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/coauthors?post=69082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}