baroxyton / parallel-translation-generator

Generate a parallel translation (bilingual version) of a book, given a .epub file using google translate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parallel text generator

Schopenhauer 'Aphorismen' demo

Given a .epub file, you can use this project to generate a parallel translation

Prequesiteries:

  • Linux environment (native, WSL, ...)
  • Bash shell
  • .epub file
  • Installed commands: pdf2txt, zip/unzip, ebook-convert, python, pandoc, git
  • Web browser

Step 1: preparations

Run the command git clone https://github.com/baroxyton/parallel-translation-generator to copy the code to your computer. Next, navigate into it using cd parallel-translation-generator. Copy the .epub book into this directory and lastly run pip install -r requirements.txt to install the dependencies.

Step 2: running it

run python v2.py and supervise the process. File paths requested can be provided relative or absolute. Note that you will need to translate a docx generated by the program in https://translate.google.com, so a modern browser with access to the file system is necessary.

Features

  • Generates a parallel translation of an ebook in .epub format.
  • Provides a side-by-side comparison of the original text and its translation in a table format.
  • Each paragraph is marked with a unique ID, making it easy to match the two versions.

Limitations

Credits

This project is developed by baroxyton and is open-source and public domain under the CC0 License. Contributions are welcome.

Disclaimer

This tool is provided as-is and the developers are not responsible for any errors, data loss, or other issues that may arise from its usage. Use at your own risk.

About

Generate a parallel translation (bilingual version) of a book, given a .epub file using google translate

License:Other


Languages

Language:Python 100.0%