{"id":13405518,"url":"https://github.com/argosopentech/argos-translate","last_synced_at":"2025-05-14T21:00:22.534Z","repository":{"id":37248403,"uuid":"253849484","full_name":"argosopentech/argos-translate","owner":"argosopentech","description":"Open-source offline translation library written in Python","archived":false,"fork":false,"pushed_at":"2025-02-20T22:54:09.000Z","size":3806,"stargazers_count":4422,"open_issues_count":127,"forks_count":322,"subscribers_count":55,"default_branch":"master","last_synced_at":"2025-05-07T20:28:27.875Z","etag":null,"topics":["language-models","linux","machine-translation","nlp","open-source","python","transformers","translation"],"latest_commit_sha":null,"homepage":"https://www.argosopentech.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/argosopentech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"argosopentech"}},"created_at":"2020-04-07T16:22:23.000Z","updated_at":"2025-05-07T14:16:24.000Z","dependencies_parsed_at":"2023-02-12T06:00:47.524Z","dependency_job_id":"f8c5c4a6-ebf6-4574-b368-7c429e739839","html_url":"https://github.com/argosopentech/argos-translate","commit_stats":{"total_commits":763,"total_committers":31,"mean_commits":"24.612903225806452","dds":"0.37614678899082565","last_synced_commit":"36e25f9d22a07c291b253e7376160dd92618b519"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argosopentech%2Fargos-translate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argosopentech%2Fargos-translate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argosopentech%2Fargos-translate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argosopentech%2Fargos-translate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/argosopentech","download_url":"https://codeload.github.com/argosopentech/argos-translate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254227603,"owners_count":22035667,"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":["language-models","linux","machine-translation","nlp","open-source","python","transformers","translation"],"created_at":"2024-07-30T19:02:04.457Z","updated_at":"2025-05-14T21:00:22.511Z","avatar_url":"https://github.com/argosopentech.png","language":"Python","readme":"# Argos Translate\n[Demo](https://libretranslate.com) | [Website](https://www.argosopentech.com) | [Docs](https://argos-translate.readthedocs.io) |  [Forum](https://community.libretranslate.com/c/argos-translate/5) | [GitHub](https://github.com/argosopentech/argos-translate) | [PyPI](https://pypi.org/project/argostranslate/)\n\n**Open-source offline translation library written in Python**\n\nArgos Translate uses [OpenNMT](https://opennmt.net/) for translations and can be used as either a Python library, command-line, or GUI application. Argos Translate supports installing language model packages which are zip archives with a \".argosmodel\" extension containing the data needed for translation. [LibreTranslate](https://libretranslate.com) is an API and web-app built on top of Argos Translate.\n\nArgos Translate also manages automatically pivoting through intermediate languages to translate between languages that don't have a direct translation between them installed. For example, if you have a es → en and en → fr translation installed you are able to translate from es → fr as if you had that translation installed. This allows for translating between a wide variety of languages at the cost of some loss of translation quality.\n\nThe [argospm-index](https://github.com/argosopentech/argospm-index) contains metadata and download links to access pre-trained Argos Translate models.\n\n### Supported languages\nArabic, Azerbaijani, Catalan, Chinese, Czech, Danish, Dutch, English, Esperanto, Finnish, French, German, Greek, Hebrew, Hindi, Hungarian, Indonesian, Irish, Italian, Japanese, Korean, Malay, Persian, Polish, Portuguese, Russian, Slovak, Spanish, Swedish, Turkish, Ukrainian, and more\n\n[Request a language](https://github.com/argosopentech/argos-translate/discussions/91)\n\n## Installation\n### Install with Python\nArgos Translate is available from [PyPI](https://pypi.org/project/argostranslate/) and can be easily installed or updated with [pip](https://pip.pypa.io/en/stable/installation/).\n\n```\npip install argostranslate\n```\n\nInstall [GUI](https://github.com/argosopentech/argos-translate-gui):\n```\npip install argostranslategui\n```\n\n### Python source installation into virtualenv\n\nDownload a copy of this repo and install with pip.\n\n```\ngit clone https://github.com/argosopentech/argos-translate.git\ncd argos-translate\nvirtualenv env\nsource env/bin/activate\npip install -e .\n```\n\n## Examples\n### [Python](https://argos-translate.readthedocs.io/en/latest/py-modindex.html)\n\n```python\nimport argostranslate.package\nimport argostranslate.translate\n\nfrom_code = \"en\"\nto_code = \"es\"\n\n# Download and install Argos Translate package\nargostranslate.package.update_package_index()\navailable_packages = argostranslate.package.get_available_packages()\npackage_to_install = next(\n    filter(\n        lambda x: x.from_code == from_code and x.to_code == to_code, available_packages\n    )\n)\nargostranslate.package.install_from_path(package_to_install.download())\n\n# Translate\ntranslatedText = argostranslate.translate.translate(\"Hello World\", from_code, to_code)\nprint(translatedText)\n# '¡Hola Mundo!'\n```\n\n### Command Line Interface\n```\nargospm update\nargospm install translate-en_de\nargos-translate --from en --to de \"Hello World!\"\n# Hallo Welt!\n\n```\n\nInstall all translation packages:\n```\nargospm install translate\n```\n\n### [LibreTranslate](https://github.com/LibreTranslate/LibreTranslate) Web App ([Demo](https://libretranslate.com/))\n![Web App Screenshot](img/WebAppScreenshot.png)\n\n### [LibreTranslate](https://github.com/uav4geo/LibreTranslate) API\n\n```javascript\nconst res = await fetch(\"https://translate.argosopentech.com/translate\", {\n\tmethod: \"POST\",\n\tbody: JSON.stringify({\n\t\tq: \"Hello!\",\n\t\tsource: \"en\",\n\t\ttarget: \"es\"\n\t}),\n\theaders: {\n\t\t\"Content-Type\": \"application/json\"}\n\t});\n\nconsole.log(await res.json());\n\n{\n    \"translatedText\": \"¡Hola!\"\n}\n```\n\n#### Graphical user interface\nThe GUI code is in a [separate repository](https://github.com/argosopentech/argos-translate-gui).\n\n![Screenshot](/img/Screenshot.png)\n![Screenshot2](/img/Screenshot2.png)\n\n\n## [Packages](https://www.argosopentech.com/argospm/index/)\n- [Browse](https://www.argosopentech.com/argospm/index/)\n- [P2P download with BitTorrent](/p2p/README.md)\n- [Training scripts](https://github.com/argosopentech/argos-train)\n- [Google Drive download](https://drive.google.com/drive/folders/11wxM3Ze7NCgOk_tdtRjwet10DmtvFu3i)\n\n\n### GPU Acceleration\n\nTo enable GPU support, you need to set the `ARGOS_DEVICE_TYPE` env variable to `cuda` or `auto`.\n\n```\n$ ARGOS_DEVICE_TYPE=cuda argos-translate --from-lang en --to-lang es \"Hello World\"\nHola Mundo\n```\n\nThe above env variable passes the device type to [CTranslate2](https://github.com/OpenNMT/CTranslate2).\n\n### HTML Translation\nThe [translate-html](https://github.com/argosopentech/translate-html) library is built on top of Argos Translate and [Beautiful Soup](https://beautiful-soup-4.readthedocs.io/en/latest/) and parses and translates HTML. The LibreTranslate API also has support for translating HTML.\n\n\n### Files Translation\nThe [argos-translate-files](https://github.com/LibreTranslate/argos-translate-files) library is built on top of Argos Translate and parses and translates files. The LibreTranslate API also has support for translating files.\n\n## Uninstall\n\n``` shell\npip uninstall argostranslate\n```\n\nYou may choose to also delete temporary and cached files:\n\n``` shell\nrm -r ~/.local/cache/argos-translate\nrm -r ~/.local/share/argos-translate\n```\n\n## Related Projects\n- [LibreTranslate-py](https://github.com/argosopentech/LibreTranslate-py) - Python bindings for LibreTranslate\n- [MetalTranslate](https://github.com/argosopentech/MetalTranslate) - Customizable translation in C++\n- [LibreTranslate/Locomotive](https://github.com/LibreTranslate/Locomotive) - Toolkit for training/converting LibreTranslate compatible language models 🚂 \n- [DesktopTranslator](https://github.com/ymoslem/DesktopTranslator) - [OpenNMT](https://opennmt.net/) based translation application\n- [LibreTranslate-rs](https://github.com/grantshandy/libretranslate-rs) - LibreTranslate Rust bindings\n- [LibreTranslate Go](https://github.com/SnakeSel/libretranslate) - LibreTranslate Golang bindings\n- [LibreTranslate Java](https://github.com/dynomake/libretranslate-java) - LibreTranslate Java bindings\n- [LibreTranslator](https://gitlab.com/BeowuIf/libretranslator) - LibreTranslate Android app\n- [LiTranslate](https://community.libretranslate.com/t/litranslate-ios-app/333) - iOS LibreTranslate client\n\n## Contributing\nContributions are welcome! Available issues are on the [GitHub issues page](https://github.com/argosopentech/argos-translate/issues). Contributions of code, data, and pre-trained models can all be accepted.\n\n## Support\nFor support please use the [LibreTranslate Forum](https://community.libretranslate.com/c/argos-translate/5) or [GitHub Issues](https://github.com/argosopentech/argos-translate/issues).\n\nFor questions about [CTranslate2](https://github.com/OpenNMT/CTranslate2) or general machine translation research the [OpenNMT Forum](https://forum.opennmt.net/) is a good resource.\n\n## Services\nCustom models trained on your own data are available for $1000/language (negotiable).\n\n[I am also available for hire](https://www.argosopentech.com/about/) to do support, consulting, or custom software development.\n\n## Donate\nIf you find this software useful donations are greatly appreciated and help to make this project sustainable.\n- [GitHub Sponsor](https://github.com/sponsors/argosopentech)\n- [PayPal](https://www.paypal.com/biz/fund?id=MCCFG437JP9PJ)\n- Bitcoin: 16UJrmSEGojFPaqjTGpuSMNhNRSsnspFJT\n- Ethereum: argosopentech.eth\n- Litecoin: MCwu7RRWeCRJdsv2bXGj2nnL1xYxDBvwW5\n- BCH: bitcoincash:qzvpxe8y5kq45kahqkyv3p88sjrhlymj2v6xdrj3cv\n\nPaid supporters receive priority support.\n\n#### Hosting affiliate links\nYou can help support Argos Translate financially by purchasing hosting through these referral links:\n- [Vast.ai](http://vast.ai/?ref=24817) - Cheap GPU rentals\n- [DigitalOcean](https://m.do.co/c/a1af57be6e3f) - Best all around hosting\n- [Sharktech](https://portal.sharktech.net/aff.php?aff=1181) - Cheap bandwith\n- [Time4VPS](https://www.time4vps.com/?affid=6929) - Cheap storage\n\n## Contributing\nContributions are welcome! Bug reports, pull requests, documentation writing, and feature ideas are all appreciated.\n\n## License\nArgos Translate is dual licensed under either the [MIT License](https://github.com/argosopentech/argos-translate/blob/master/LICENSE) or [Creative Commons CC0](https://creativecommons.org/share-your-work/public-domain/cc0/).\n","funding_links":["https://github.com/sponsors/argosopentech","https://www.paypal.com/biz/fund?id=MCCFG437JP9PJ"],"categories":["Python","Applications 💻","Translations","A01_文本生成_文本对话","🖥 Desktop apps for translation management","Apps","Developer Resources"],"sub_categories":["其他_文本生成_文本对话","Python","Translation software","Translation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargosopentech%2Fargos-translate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fargosopentech%2Fargos-translate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargosopentech%2Fargos-translate/lists"}