Login/Register
  • Home
  • Community
  • Knowledge
  • Technical Docs
  • RWS Support Policy
  • Trados Studio Licensing Help
  • Login for Support
Back to Search Results

How to create a segmentation rule for hard return (carriage return followed by new line) in a Language Resource Template in Trados Studio

000001532 |12/7/2023 12:36 PM
Scope/Environment
Trados Studio
Symptoms/Context
You need to create a segmentation rule for hard returns in Trados Studio using a Language Resource Template, but you do not know how this works.
Resolution

Adding a segmentation rule for an existing translation memory

  1. Open Trados Studio.
  2. Go to Translation Memory View.
  3. Click on File > Open > Open Translation Memory to add the translation memory you wish to change to the list of translation memories.
  4. Right-click on the listed translation memory and select Settings from the menu; this opens the Translation Memory Settings dialog box.
  5. Click on Language Resources.
  6. On the right-hand side highlight Segmentation Rules and press Edit.
  7. In the Segmentation Rules dialog box, click Add to open the Add Segmentation Rule dialog box.
  8. Enter for example Hard Return in the Description field.
  9. Click Advanced View.
  10. In the field Before break replace the existing regular expression with the following:
    [\w\p{P}][\r\n]+
  11. In the field After break replace the existing regular expression with a single dot:
    .
  12. Click OK several times to confirm the changes until you are back in the Translation Memory View.

The segmentation rule for hard returns will now be used when using this translation memory in translation.
 

Adding a segmentation rule to an existing language resource template

  1. Open Trados Studio.
  2. Go to the Translation Memory View.
  3. Click File > Open > Language Resource Template to add the language resource template you wish to change to the list.
  4. Right-click on the language resource template and select Settings from the menu to open the Language Resource Template Settings dialog box.
  5. Select Segmentation Rules and press Edit.
  6. In the Segmentation Rules dialog box, click the button Add to open the Add Segmentation Rule dialog box.
  7. Enter for example Hard Return in the Description field.
  8. Click Advanced View.
  9. In the field Before break replace the existing regular expression with the following:
    [\w\p{P}][\r\n]+
  10. In the field After break replace the existing regular expression with a single dot:
    .
  11. Click OK several times to confirm the changes until you are back in the Translation Memory View.

The segmentation rule for hard returns will be used when basing a new translation memory on the modified language resource template.

You can also download three example language resource templates that you can open in Trados Studio or use for your translation. They are available in the following languages:

  • English (United Kingdom)
  • English (United States)
  • German (Germany)

Download the file Language Resource Templates.zip from the attachments area of this article and extract it to a location of your choice.

NOTE: 
When working with XML files, you also need to select the option to  "Always preserve" whitespaces, under File > Options > File Types > [Your File Type] > Whitespaces, otherwise whitespaces are normalized and the rule does not "catch".

Root Cause
In Trados Studio a rule for segmenting text at a hard return (same as carriage return followed by new line) is not available by default. Common documents can contain such hard returns within a sentence, for example to apply a particular layout within a cell in a Microsoft Excel document.

If Trados Studio always segmented sentences with a hard return, this would lead to split sentences even if this is not wanted. However, in other and more rare cases a hard return constitutes a segment boundary, and in this case it can be useful to create a segmentation rule.
Reference
These articles might be relevant as well:
  • How to add, update and delete a Language Resource Template in WorldServer
  • How to create a segmentation rule for soft return in a Language Resource Template in SDL Trados Studio
  • Create a Translation Memory
  • How to Create a Segmentation Rule
  • How to Edit a Segmentation Rule
  • Segmentation Rules
  • How to Create a Language Resource Template

 
Attachments
Language Resource Template.zip

Send Article Feedback
RWS Machine Translation Translation Software Language Services Content Management
All Contents Copyright © RWS.
COPYRIGHT PRIVACY POLICY COOKIE POLICY TERMS AND CONDITIONS