You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am translating large amounts of XML text. Every time when I translate text, a character that preceeds an inline element (superScript) is being moved into the inline element.
Input:
Problemet är att bokstaven före superScript elementet flyttas in i inline elementet: tank rymmer 48 m3 och tanken rymmer 43 m3. Lite mer text här.
Translated output:
The problem is that the letter preceding the superScript element is being moved into the inline element: tank holds 48m3 and the tank holds 43m3. A little more text here.
result = deepl_client.translate_text(
text,
tag_handling="xml",
source_lang="SV",
target_lang="EN-GB",
model_type="prefer_quality_optimized",
split_sentences="nonewlines"
)
I have noticed that adding the superScript element to the 'ignore_tags' attribute will help. The unfortunate thing is that the superScript element can also contain other text that must be translated.
I am translating large amounts of XML text. Every time when I translate text, a character that preceeds an inline element (superScript) is being moved into the inline element.
Input:
Problemet är att bokstaven före superScript elementet flyttas in i inline elementet: tank rymmer 48 m3 och tanken rymmer 43 m3. Lite mer text här.
Translated output:
The problem is that the letter preceding the superScript element is being moved into the inline element: tank holds 48m3 and the tank holds 43m3. A little more text here.
result = deepl_client.translate_text(
text,
tag_handling="xml",
source_lang="SV",
target_lang="EN-GB",
model_type="prefer_quality_optimized",
split_sentences="nonewlines"
)
I have noticed that adding the superScript element to the 'ignore_tags' attribute will help. The unfortunate thing is that the superScript element can also contain other text that must be translated.