Deep Learning

Machine Learning in Linux: Argos Translate is an Offline Translation Library

Our Machine Learning in Linux series focuses on apps that make it easy to experiment with machine learning.

Machine Learning extends in many directions. We’ve not covered neural networks in this series, so let’s rectify that. A neural network is a method in artificial intelligence that teaches computers to process data in a way that’s inspired by the human brain. It is a type of machine learning process, called deep learning, that uses interconnected nodes or neurons in a layered structure that resembles the human brain.

Google Translate is a popular multilingual neural machine translation service that translates text and websites from one language into another. How about a self-hosted open source alternative?

Argos Translate is state of the art neural machine translation software. It’s written in Python and published under an open source license. Argos Translate uses OpenNMT for translations and can be used as either a Python library, command-line, or GUI application.

Modern machine translation goes beyond simple word-to-word translation to communicate the full meaning of the original language text in the target language. It analyzes all text elements and recognizes how the words influence one another.

Installation

As we’ve explained in previous articles in this series, we don’t recommend using pip to install software unless it’s within a virtual environment. A good solution is to use a conda environment as it helps manage dependencies, isolate projects, and it’s language agnostic.

We’ll therefore use conda to install Argos Translate. If your system is missing conda, install either Anaconda or Miniconda first. Once installed, we can then create our conda environment with the command.

$ conda create --name argostranslate

Activate that environment with the command:

$ conda activate argostranslate

Install the software with all the dependencies with the command:

$ pip install argostranslate

If your machine has a dedicated graphics card, you’ll want to enable GPU support. This is enabled by setting the ARGOS_DEVICE_TYPE env variable to cuda or auto.

If you want to try out the project’s GUI, issue the command:

$ pip install argostranslategui

Next page: Page 2 – In Operation and Summary

Pages in this article:
Page 1 – Introduction and Installation
Page 2 – In Operation and Summary

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Please read our Comment FAQ before posting a comment.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments