Skip to content

DeepL is omitting parts of the text #249

@tflo

Description

@tflo

First I thought that the translation via DeepL sometimes stops at line breaks. But it turned out to be more complicated.

Example:

Input:

trans -b -e deepl :de 'No heap allocation is involved in initializing this array of empty strings (C++ is not Java!). Local UnicodeString arrays like this are a very good fit for use with split(); after extracting the fields, any values that need to be kept in some more permanent way can be copied to their ultimate destination.'

Result:

Lokale UnicodeString-Arrays wie diese sind sehr gut für die Verwendung mit split() geeignet; nach dem Extrahieren der Felder können alle Werte, die auf eine dauerhaftere Weise gehalten werden müssen, in ihr endgültiges Ziel kopiert werden.

You’ll notice that the first sentence is missing.

The same thing happens with Spanish as target language. However, the translation is complete with French as target language! Removing the -b switch doesn’t change anything in respect.
The DeepL webform delivers the complete translation for all languages.


Now back to the text.

If I add a sentence at the beginning of the text, then everything gets translated:

Input:

trans -b -e deepl :de 'Note that, in this example, “words” is a local, or stack array of actual UnicodeString objects. No heap allocation is involved in initializing this array of empty strings (C++ is not Java!). Local UnicodeString arrays like this are a very good fit for use with split(); after extracting the fields, any values that need to be kept in some more permanent way can be copied to their ultimate destination.'

Result:

Beachten Sie, dass in diesem Beispiel "words" ein lokales oder Stack-Array von tatsächlichen UnicodeString-Objekten ist, bei dessen Initialisierung keine Heap-Allokation erforderlich ist (C++ ist nicht Java!) Lokale UnicodeString-Arrays wie dieses sind sehr gut für die Verwendung mit split() geeignet; nach dem Extrahieren der Felder können alle Werte, die in einer dauerhafteren Weise gehalten werden müssen, an ihr endgültiges Ziel kopiert werden.

Or: If I cut the last sentence right after the “split();” then the translation is complete also:

Input:

trans -b -e deepl :de 'No heap allocation is involved in initializing this array of empty strings (C++ is not Java!). Local UnicodeString arrays like this are a very good fit for use with split().'

Result:

Bei der Initialisierung dieses Arrays von leeren Strings (C++ ist nicht Java!) ist keine Heap-Allokation erforderlich; solche lokalen UnicodeString-Arrays sind sehr gut für die Verwendung mit split() geeignet.

Any idea why this happens?

Note that the omissions…

  • do not happen with the web form
  • seem to be content and language dependent, but I was unable to find a pattern

I’m using Translate Shell 0.9.6.7-git:865ac72. I’m on macOS 10.13.6, the user locale is set to en_US.UTF-8. Bash is 4.4.23, gawk is 4.2.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions