NaNoGenMo / 2017

National Novel Generation Month, 2017 edition.
https://nanogenmo.github.io
185 stars 7 forks source link

Novella Stone: Pushing books through many Google Translates #53

Open andyrut opened 6 years ago

andyrut commented 6 years ago

Our concept is to create a novel by pushing source material (a short story, a novel, a collection of poetry, etc.) through multiple languages in Google Translate. We will push, paragraph by paragraph, an entire book into a "translation chain" that starts with English, ends with English, and has many other languages in between.

Here's an example of a translation chain. The source material starts in English (language 1) and is translated to French (language 2). The French translation is translated into Spanish (language 3). This is repeated with several languages until you reach language N-1, and then translate those results back to English (language N).

We have performed these translation chains on a small scale, and the results are readable, interesting, and sometimes outright hilarious. The Google Translate API is available as a REST service. We will automate the processing of books in this fashion in HTML/JavaScript. The product will be an interactive website; you will be able to see, line-by-line, the original text and the translated text as it is generated on-the-fly.

We will generate a PDF of one novels as our official submission as a URL, and the source code will be available by a simple View Source in your web browser when our website is up.

Contributors: Andy Rutledge Jonathan Cheng Margaret Beucke

greg-kennedy commented 6 years ago

Oh good idea. I used to do this manually... can't wait to read a whole novel!

andyrut commented 6 years ago

We decided on using 11 "links" in our translation chain, since November is the 11th month in the Gregorian calendar. Our chain will be: English -> French -> Spanish -> German -> Dutch -> Latin -> Swedish -> Portuguese -> Italian -> Polish -> English. Chosen arbitrarily among Latin character set languages.

Here's an original English line: "Rais'd impious War in Heav'n and Battel proud"

That same line, pushed through the translation chain: "The proud are proud, the outbreak of war in the erect head and a complete and standardized battle"

hugovk commented 6 years ago

If you want to mix things up a bit further, you could throw in a non-Indo-European language in there, like Finnish or Hungarian.

dkurth commented 6 years ago

This is fun. I have tried something similar, but I used Yandex Translator because it offered a free API, which worked pretty well. I like your example sentence. I was a little disappointed that mine didn't turn out as whacky as I'd expected.

andyrut commented 6 years ago

Project completed. You can see a working version at our website:

http://novellastone.org

Do a View Source in your browser to see the HTML/JS source code. The online version translates the selected source book one line at a time and is limited to translating 200 lines to conserve Google Translate API credits.

To see our completed translation (and official submission) with interactive mouseovers, check out:

http://novellastone.org/ParadiseLost-NovellaStoned.html

And the same, as a PDF and raw text:

http://novellastone.org/ParadiseLost-NovellaStoned.pdf http://novellastone.org/ParadiseLost-NovellaStoned.txt

greg-kennedy commented 6 years ago

The mouseover effect is really great for the presentation! I love this. Good job.

It also looks like Google's translation engine has gotten a lot better than I remember from ten years ago... this is still very "readable".

andyrut commented 6 years ago

Deactivated the API key to save Google Translate credits since we're at the end of NaNoGen month.

Moved the finished Paradise Lost (Novella Stoned) product to the main page: http://novellastone.org

Moved the original source code (minus a working API key) to: http://novellastone.org/translate