argos-translate
Translate text from one language to another
TLDR
Install translation pairs for Spanish to English translation
Translate some text from Spanish (es) to English (en) (Note: only two letter language codes are supported)
Translate a text file from English to Hindi
List all installed translation pairs
Show translation pairs from English that are available to be installed
Update installed language package pairs
Translate from ar to ru (Note: this requires the translation pairs translate-ar_en and translate-en_ru to be installed)
SYNOPSIS
argos-translate [OPTIONS] SOURCE_LANGUAGE TARGET_LANGUAGE [TEXT|FILENAME]
PARAMETERS
--help
Show help message and exit.
--version
Show program's version number and exit.
--model-path MODEL_PATH
Path to the Argos Translate model directory (optional, if not specified uses the default).
--install-path INSTALL_PATH
Install models into a custom directory.
--batch
Read input from stdin, with each line representing a separate translation.
SOURCE_LANGUAGE
The source language code (e.g., 'en' for English, 'es' for Spanish).
TARGET_LANGUAGE
The target language code (e.g., 'en' for English, 'es' for Spanish).
TEXT|FILENAME
The text to translate or the filename containing the text to translate. If a filename is provided, the content of the file will be translated. if no text is provided reads from stdin.
DESCRIPTION
argos-translate is a command-line interface (CLI) for performing offline neural machine translation using the Argos Translate library. It allows users to translate text from one language to another directly from the terminal without requiring an internet connection. The translation models are pre-downloaded and stored locally. It supports various languages depending on the available models. Argos Translate is designed for privacy and security as it processes all data locally, eliminating the need to send sensitive information to external servers. The CLI provides a convenient way to integrate machine translation into scripts, workflows, and other automated processes. The translation quality is dependent on the models installed, but the main advantage is the offline availability and privacy that it provides.
It leverages pre-trained neural networks to achieve a decent translation quality in a fully private way.
CAVEATS
The quality of translation depends on the installed models. Not all language pairs may be available. The first execution may take a significant amount of time due to library initialization.
EXAMPLE USAGE
Translate text from English to Spanish:
argos-translate en es "Hello, world!"
Translate content of file from French to English:
argos-translate fr en myfile.txt
Translate multiple texts from standard input:
argos-translate --batch en es
Text 1
Text 2
MODEL MANAGEMENT
You need to download and install translation models separately. The Argos Translate library provides tools or instructions on how to download and install models for the desired language pairs before using the CLI. Please, follow the project documentation.