matthewmcvickar / overtranslator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overtranslator

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.

About

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'

Instructions

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.

  1. Install Node.js.

  2. Download or clone this repo.

    git clone git@github.com:matthewmcvickar/overtranslator.git
  3. Install the dependencies for this script. Open the directory for this repo in your terminal and run the following command:

    npm install
  4. Sign up for a free Yandex account and register a free API key.

  5. Rename the config-example.js file in this repo to config.js and paste your API key into it.

  6. Open the overtranslator.js file and change the text in the const text_to_translate = [...] block to what you'd like to translate. If you are translating from a language other than English, change the starting_language_code and starting_language_name variables too.

  7. Back in your terminal, run the following command:

    node overtranslator.js

About


Languages

Language:JavaScript 100.0%