A Node.js script that sends a text string to the Yandex Translate API and translates it through a chain of languages randomly selected from the languages Yandex supports.
This script was started in November 2015 as a proof of concept for a Twitter bot, but I couldn't figure out what source text to feed it, so I stopped working on it. It sat dormant until the folks at Popula mentioned they were going to run a piece on machine translation and I mentioned having written this script. They came up with the idea of running the entirety of that article through my script, and I loved the idea, so I agreed and finished up this script.
The original article, by Giovanni Tiso: Machine Translation
And my overtranslation: Machine Translation of 'Machine Translation'
If you're interested in running this script yourself, here are some basic instructions for getting it running. Because I'm short on time right now, these are not as complete as I'd like. Please open a new issue on this repo or email me if you have any trouble.
-
Download or clone this repo.
git clone git@github.com:matthewmcvickar/overtranslator.git
-
Install the dependencies for this script. Open the directory for this repo in your terminal and run the following command:
npm install
-
Sign up for a free Yandex account and register a free API key.
-
Rename the
config-example.js
file in this repo toconfig.js
and paste your API key into it. -
Open the
overtranslator.js
file and change the text in theconst text_to_translate = [...]
block to what you'd like to translate. If you are translating from a language other than English, change thestarting_language_code
andstarting_language_name
variables too. -
Back in your terminal, run the following command:
node overtranslator.js