-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with Text Translation Using Special Characters in Deepl (API) #28
Comments
Hi, thanks for your report!
As an example,
would become
This gives me
and should be more robust to these kinds of issues. |
Thanks JanEbbing, that solution doesn't work also. Do you have any suggestions? I can't be the only one with this issue. Some of the tags disappear during translation. For Example in the original text, I have the character |
Do you have any other suggestions for the problem? |
Hi, could you please provide an example call that fails in the way you described, if the contents are not sensitive? I can then forward this to the responsible team. |
Hello Jan Ebbing, I have texts that need to be translated. They can be very short marketing texts with little content, but also long texts of up to 6000-8000 characters. I have texts in German that should be translated into English using the DeepL Api. The English text translated by Deepl will than be translated into French, Portuguese (Brazil) and Russian. The structure of the text should be maintained as much as possible. Here is a small example: Now my program starts: The table can be seen as a list/arraylist, where each row is a record (in this case, a line of text). The table can contain 1 to n rows. I have to convert the table to a string. Then, as you said, I added a sepecial character before and after each line. The special character I use is . I loop through the entire text, and each line receives a
After that, I send the text to the Deepl API as a string. and I receive this back:
I then convert the characters back, which looks like this:
Then, I delete the Then I use the split function and split by This is how it looks in the system: The same process then from English to French I checked the translation with the DeepL Translator, and it looked good. For simple texts, it works well. However, as I mentioned at the beginning, I have marketing texts that are more than 6000 characters long, are in a table with more than 100 rows. This texts can contain brand names and various special characters like – ( ) / & : . Since the texts are sent as a single string via the DeepL Api, there seem to be problems. I generated another English text and sent it via the DeepL Api. With this text, I’m already having issues with the translation, even without placeholders.
When I send this text to the DeepL API, it will be sent as a string. When I send this strring to the API, it appers the same in the web translator (picture below). In this example, points f. and g. are duplicated But actually, I want to translate the text, with the given structure (for this example: including the list from a. to i. and all the dashes), from English to French. The biggest problems for me is the duplications, as I can’t figure out a logical reason for what causes them. They seem to occur randomly. |
Hello I have a Problem with the Deepl API in ABAP.
The Problem:
I have a text that is in a table format. Each table row can contain a maximum of 72 characters. The text can have a structure, as shown in the example, where the texts are separted by bullet points. The text should be maintained during the translation.
This is how a text can look like.
This is the text in table format I have to work with.
The solution I have tried but dont work:
I take the text from the table and convert it into a string. I insert a special character {@} between the lines each time. I also use the ignored_tags function, and use the tag
<x></x>
with it. I wrap my ignored_tags around my placeholder and it looks like this<x>{@}<x>
. I thought the tags and placeholders would then be ignored in the translation, but it dosnt look like it works. At last, I split the string back<x>{@}</x>
with this placeholder back, so I get the translated text into a table form. Thats why I need this placeholder.This is the text that I am sending to the Deepl API, translated from english to portuguese (brasil).
english I translate:
portuguese (brasil) I get back from the Deepl API:
As you can see, the complete sentence "e.g.
<x>{@}</x>
DataScope) is applied, the client needs to adjust the link<x>{@}</x>
." is doubled in the portuguese (brasil) translation).I would say Deepl apparently has trouble handling such special characters. There are duplicates of words or sentences.
Also if I use the Deepl Webtranslator instead of the Deepl API, I get the problem with duplicates.
english -> portuguese (brasil)
english -> french
english -> german
In french I get the same problem.
In german it dont double the sentence but doubles the e.g. to z z.B.
Is there a way to use a special character as a placeholder that is completely ignored by the Deepl API translation? Or do you have a solution that you could recommend?
The text was updated successfully, but these errors were encountered: