vsimko / deepl-fix-english

Use DeepL translator to fix English texts (through EN->DE->EN pipeline)
0 stars 0 forks source link
deepl deepl-translator english-grammar machine-translation shell-script

deepl-fix-english

Use DeepL translator to fix English texts (through EN->DE->EN pipeline)

Requirements

Installation

Download the deepl-fix-english.sh file and make sure it is executable. The easiest way is to clone the latest version from github as follows:

git clone --depth 1 https://github.com/vsimko/deepl-fix-english.git
cd deepl-fix-english

Usage (short sentences)

For shorter texts use command line arguments

$ ./deepl-fix-english.sh Please translate this text

output

######################################################################## 100,0%
######################################################################## 100,0%
Please translate the following text

Usage (larger texts)

NOTE: not implemented properly yet, see issue #1

Multiline texts can be piped to the script through stdin as follows:

$ ./deepl-fix-english.sh

now you can write or copy-paste to console and hit ENTER and CTRL+D when finished:

This document contains multiple 
lines and should also be translated
by DeepL without problems. (hit ENTER and CTRL+D)
######################################################################## 100,0%
######################################################################## 100,0%
This document contains several lines and should be easily translated by DeepL.

or from file

$ ./deepl-fix-english.sh < my_file_to_fix.txt
######################################################################## 100,0%
######################################################################## 100,0%
This document contains several lines and should be easily translated by DeepL.