{"id":13573296,"url":"https://github.com/mozilla/bergamot-translator","last_synced_at":"2025-10-04T11:31:33.592Z","repository":{"id":37842354,"uuid":"346428477","full_name":"mozilla/bergamot-translator","owner":"mozilla","description":"INACTIVE - Bergamot translator","archived":true,"fork":true,"pushed_at":"2023-12-14T11:00:39.000Z","size":765,"stargazers_count":73,"open_issues_count":0,"forks_count":10,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-16T16:28:02.555Z","etag":null,"topics":["inactive","unmaintained"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"browsermt/bergamot-translator","license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mozilla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-10T16:55:46.000Z","updated_at":"2024-10-11T11:29:05.000Z","dependencies_parsed_at":"2023-02-11T21:16:43.206Z","dependency_job_id":null,"html_url":"https://github.com/mozilla/bergamot-translator","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fbergamot-translator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fbergamot-translator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fbergamot-translator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fbergamot-translator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mozilla","download_url":"https://codeload.github.com/mozilla/bergamot-translator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235246183,"owners_count":18959222,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["inactive","unmaintained"],"created_at":"2024-08-01T15:00:32.916Z","updated_at":"2025-10-04T11:31:28.248Z","avatar_url":"https://github.com/mozilla.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# Bergamot Translator\n\n[![CircleCI badge](https://img.shields.io/circleci/project/github/browsermt/bergamot-translator/main.svg?label=CircleCI)](https://circleci.com/gh/browsermt/bergamot-translator/)\n\nBergamot translator provides a unified API for ([Marian NMT](https://marian-nmt.github.io/) framework based) neural machine translation functionality in accordance with the [Bergamot](https://browser.mt/) project that focuses on improving client-side machine translation in a web browser.\n\n## Build Instructions\n\n### Build Natively\nCreate a folder where you want to build all the artifacts (`build-native` in this case) and compile\n\n```bash\nmkdir build-native\ncd build-native\ncmake ../\nmake -j2\n```\n\n### Build WASM\n#### Prerequisite\n\nBuilding on wasm requires Emscripten toolchain. It can be downloaded and installed using following instructions:\n\n* Get the latest sdk: `git clone https://github.com/emscripten-core/emsdk.git`\n* Enter the cloned directory: `cd emsdk`\n* Install the sdk: `./emsdk install 3.1.8`\n* Activate the sdk: `./emsdk activate 3.1.8`\n* Activate path variables: `source ./emsdk_env.sh`\n\n#### \u003ca name=\"Compile\"\u003e\u003c/a\u003e Compile\n\nTo build a version that translates with higher speeds on Firefox Nightly browser, follow these instructions:\n\n   1. Create a folder where you want to build all the artifacts (`build-wasm` in this case) and compile\n       ```bash\n       mkdir build-wasm\n       cd build-wasm\n       emcmake cmake -DCOMPILE_WASM=on ../\n       emmake make -j2\n       ```\n\n       The wasm artifacts (.js and .wasm files) will be available in the build directory (\"build-wasm\" in this case).\n\n   2. Enable SIMD Wormhole via Wasm instantiation API in generated artifacts\n       ```bash\n       bash ../wasm/patch-artifacts-enable-wormhole.sh\n       ```\n\n   3. Patch generated artifacts to import GEMM library from a separate wasm module\n       ```bash\n       bash ../wasm/patch-artifacts-import-gemm-module.sh\n       ```\n\nTo build a version that runs on all browsers (including Firefox Nightly) but translates slowly, follow these instructions:\n\n  1. Create a folder where you want to build all the artifacts (`build-wasm` in this case) and compile\n      ```bash\n      mkdir build-wasm\n      cd build-wasm\n      emcmake cmake -DCOMPILE_WASM=on -DWORMHOLE=off ../\n      emmake make -j2\n      ```\n\n  2. Patch generated artifacts to import GEMM library from a separate wasm module\n       ```bash\n       bash ../wasm/patch-artifacts-import-gemm-module.sh\n       ```\n\n#### Recompiling\nAs long as you don't update any submodule, just follow [Compile](#Compile) steps.\\\nIf you update a submodule, execute following command in repository root folder before executing\n[Compile](#Compile) steps.\n```bash\ngit submodule update --init --recursive\n```\n\n\n## How to use\n\n### Using Native version\n\nThe builds generate library that can be integrated to any project. All the public header files are specified in `src` folder.\\\nA short example of how to use the APIs is provided in `app/main.cpp` file.\n\n### Using WASM version\n\nPlease follow the `README` inside the `wasm` folder of this repository that demonstrates how to use the translator in JavaScript.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Fbergamot-translator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmozilla%2Fbergamot-translator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Fbergamot-translator/lists"}