Working with escape sequences (\n) - avoiding translating them
Thread poster: Christian Schmidt
Oct 26, 2018

Hey,

let's say I do have a sentence in my source segment which I want to translate. Beside the regular sentence however I've got escape sequences, "\n" for example. I noticed, that the AT for example sometimes struggles with these escape sequences ( "\n\nWordA" becomes "\n\WordA" for example).

Is there a way I can make the AT ignore the escape sequences? GoogleAPI for example puts spaces like "\ n \ n " or sometimes "\ N \ N".
I feel parser rules won't help me wi
... See more
Hey,

let's say I do have a sentence in my source segment which I want to translate. Beside the regular sentence however I've got escape sequences, "\n" for example. I noticed, that the AT for example sometimes struggles with these escape sequences ( "\n\nWordA" becomes "\n\WordA" for example).

Is there a way I can make the AT ignore the escape sequences? GoogleAPI for example puts spaces like "\ n \ n " or sometimes "\ N \ N".
I feel parser rules won't help me with that. Xpath probably neither? Has anyone had similar issues and has a solution for this? Because if you translate an xml with quite a few of those escape sequences, you really will miss some of those mess ups and end up with problems later on (when the line break doesn't appear, for example).


Appreciate any help



Thanks!
Collapse


 

Roy Oestensen  Identity Verified
Norway
Local time: 06:04
Member (2010)
English to Norwegian (Bokmal)
+ ...
I am always editing machine translated segments manually Oct 26, 2018

As AT sentences are not to be trusted anyway, I see no better recourse than correct this manually. I would use search and replace for strings that are a problem if they are very much recurrent.
Roy

[Edited at 2018-10-26 15:45 GMT]


 

Samuel Murray  Identity Verified
Netherlands
Local time: 06:04
Member (2006)
English to Afrikaans
+ ...
SITE LOCALIZER
@Christian Oct 26, 2018

Christian Schmidt wrote:
I noticed that the AT for example sometimes struggles with these escape sequences ( "\n\nWordA" becomes "\n\WordA" for example).


This is something your CAT tool should take care of. If it doesn't, then there may be an adjective out there to describe your CAT tool with. (-:

Jokes aside, yes, I have this same problem with using Google Translate. However, I can only offer sympathy and not a solution for you, because I'm not a Trados user (although I do have a Trados 2019 licence) and I don't send segments to the machine translator directly via my CAT tool anyway.

I extract all translatable text, then machine translate it all at once, then align the machine translation with the extracted text, and create a special TM with those segments. This workflow does allow me to fix text *before* sending it to the machine translator. Essentially, I use a few macros in MS Word to temporarily replace characters that Google Translate is known to choke on, and to add underscores to certain punctuation marks where there are or aren't spaces. Then, just before I align and create a TM, I do a reverse find+replace on the machine translation that fixes the errors that the machine translator introduced.

I know this isn't useful information, though. Say, which machine translator do you use?

Roy Oestensen wrote:
As AT sentences are not to be trusted anyway, I see no better recourse than correct this manually.


Well, it can have a great impact on your speed if you have to fix niggly things all the time. For example, if the MT system constantly adds spaces next to tags, and you have to constantly delete them manually, it can drive you up the wall.

I would use search and replace for strings that are a problem if they are very much recurrent.


These sorts of breakages can't be fixed by simply making a find+replace on the target text after the breakage already occurred. You have to make edits the source text before the text is sent to the machine translator, and only then can you make further edits to the target text using find+replace.

Unfortunately Trados does not allow for source text editing except on a per-segment basis. For example, you can't tell Trados to change "\n\n" to "XNZXN" in all source segments in a single operation -- you have to press the source text editing shortcut for each segment individually and move between all source text segment one at a time.


[Edited at 2018-10-26 16:50 GMT]


 

Roy Oestensen  Identity Verified
Norway
Local time: 06:04
Member (2010)
English to Norwegian (Bokmal)
+ ...
What about confidentiality issues, by the way? Oct 26, 2018

I have a few issues with machine translation.
-Speed: MT may be a big saver for larger languages like French, Spanish or German, but for the most part the MT engine doesn't handle small languages like Norwegian as well. There is some saving, but not very substantial, so I prefer projects that are not machine translated from the agency. I decline giving any discount for such jobs for this reason
- QA: Machine translated text has to be much more carefully checked than copy leveraged f
... See more
I have a few issues with machine translation.
-Speed: MT may be a big saver for larger languages like French, Spanish or German, but for the most part the MT engine doesn't handle small languages like Norwegian as well. There is some saving, but not very substantial, so I prefer projects that are not machine translated from the agency. I decline giving any discount for such jobs for this reason
- QA: Machine translated text has to be much more carefully checked than copy leveraged from the memory, at least for Norwegian. Just today I saw "statement activity" (i.e. a bank account statement activity) translated as "sentence activity". It took me actually some little while to figure out what was going on.
-Confidentiality: If you use for instance the free version of Google translate, there may be confidentiality issues as your source text then would be uploaded to the online engine. For many jobs this may not be an issue, but at least some agencies demand that you do not use machine translation, and if you do, you break your agreement with them.

So in short, I much prefer not to receive machine translated projects from the agency anyway.

Regarding editing the source segments: I must confess I do more or less all my Studio work in Dejavu, which does allow me to make all the source segments editable in one go. So for me the combination of Studio and Dejavu is the ideal working environment.
Collapse


 

Samuel Murray  Identity Verified
Netherlands
Local time: 06:04
Member (2006)
English to Afrikaans
+ ...
SITE LOCALIZER
@Roy Oct 26, 2018

Roy Oestensen wrote:
So in short, I much prefer not to receive machine translated projects from the agency anyway.


I think Christian was talking about projects that are not machine translated by the agency, but which gets machine translated while he is working on them. If the agency machine translated the text, then there's basically nothing you can do to fix such problems because the text has already come back from the machine translator.


 

Roy Oestensen  Identity Verified
Norway
Local time: 06:04
Member (2010)
English to Norwegian (Bokmal)
+ ...
Sorry, you are right Oct 27, 2018

Samuel Murray wrote:
I think Christian was talking about projects that are not machine translated by the agency, but which gets machine translated while he is working on them. If the agency machine translated the text, then there's basically nothing you can do to fix such problems because the text has already come back from the machine translator.


In that case it may be appropriate to edit the source document before importing it and replace the problem codes with something like @@@@ or something. That should hopefully fix it.


 

NeoAtlas
Spain
Local time: 06:04
English to Spanish
+ ...
Cleanup Tasks Oct 27, 2018

There is an free app named Cleanup Tasks that can convert those \n into tags
https://appstore.sdl.com/language/app/cleanup-tasks/550/

This would be the workflow (although not the only one):
- Prepare the files in Studio as usual.
- Run the Cleanup Tasks under Batch tasks with the appropriate configuration to convert all of the \n
... See more
There is an free app named Cleanup Tasks that can convert those \n into tags
https://appstore.sdl.com/language/app/cleanup-tasks/550/

This would be the workflow (although not the only one):
- Prepare the files in Studio as usual.
- Run the Cleanup Tasks under Batch tasks with the appropriate configuration to convert all of the \n into tags in the source.
- You'll see the \n as tags in the source segments, more manageable indeed.
- Translate the document as usual.
- After finishing the translation, use the Cleanup Tasks part of the same app (under Batch tasks as well) to get those \n back in the target and generate the translated documents.
Good luck!
… Jesús Prieto …
Collapse


 

Christian Schmidt
Germany
TOPIC STARTER
thanks so far Oct 29, 2018

Thank you so far for your answers.

Currently it seems the best, but really not satisfying way to do it, is a search and replace before and after translating the file.
The Cleanup Tasks App sounds very promising, however it doesn't seem to work with Studio 2019. Maybe there is an alternative
Add-In someone knows about, or maybe there is a way to use such a Add-In in Studio 2019 anyway?

And Samuel understood it correctly, I work with the AT by myself and don'
... See more
Thank you so far for your answers.

Currently it seems the best, but really not satisfying way to do it, is a search and replace before and after translating the file.
The Cleanup Tasks App sounds very promising, however it doesn't seem to work with Studio 2019. Maybe there is an alternative
Add-In someone knows about, or maybe there is a way to use such a Add-In in Studio 2019 anyway?

And Samuel understood it correctly, I work with the AT by myself and don't get it by an agency.

[edit;]
I found an solution that works for me, if anyone else is interested in it, you can read it up here:
https://community.sdl.com/product-groups/translationproductivity/f/90/t/20117
(basically it's possible to do with parser rules & RegEx)



[Edited at 2018-10-29 09:35 GMT]

[Edited at 2018-10-29 14:09 GMT]
Collapse


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Working with escape sequences (\n) - avoiding translating them

Advanced search







WordFinder Unlimited
For clarity and excellence

WordFinder is the leading dictionary service that gives you the words you want anywhere, anytime. Access 260+ dictionaries from the world's leading dictionary publishers in virtually any device. Find the right word anywhere, anytime - online or offline.

More info »
Déjà Vu X3
Try it, Love it

Find out why Déjà Vu is today the most flexible, customizable and user-friendly tool on the market. See the brand new features in action: *Completely redesigned user interface *Live Preview *Inline spell checking *Inline

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search