How to add a segmentation rule to have Studio segment BEFORE every opening bracket

Hello. I want to create a new TM where Studio should segment BEFORE every opening bracket. I have tried playing with the segmentation rules, but I am having trouble since in most cases the segmentation happens after the break character, not before. I guess that the segmentation rule should look something like: Any character/digit before break, a space as the break character (which is not an option but  it may be possible to add it as regex in the Advanced display of the rule) and an opening bracket followed by any character/digit after break. I am new to regex. Any ideas would be much appreciated.  

Parents Reply Children
  • Ok. So I created the project with the memory and the file. Once I created it, I went to the Files view and deleted all the files. I clicked on Project Settings to check and recheck that I only had the correct memory with the correct parentheses rule. Then I added the File again and it was still not correctly segmented. Did I miss something? In your message you say to add the file again, prepare it and open it in the Editor. What do you mean exactly by preparing it? When you add the file, all the batch tasks of your project template (Analysis, Pretranslation and so on) are done automatically so I don't see what else I should be doing.
    Just to clarify, you say that the Preview is not to be used to test segmentation rules. If I have understood correctly, no matter which memory I use for my project with whatever customized segmentation rules, these will never apply when I create a project. I would need to go to Files, delete all the files, add them again and then my customized segmentation rules will apply. Is that right? If does not make much sense to me. Thanks. 

  • Hi ,

    Open the project in Projects view.

    Ensure you've selected the Source language in the Files view.

    Trados Studio navigation pane showing selected 'Files' view with 'Projects', 'Reports', 'Editor', and 'Translation Memories' options listed.

    After adding the DOCX file (take into account that you'd need to delete it if it's already there).

    Ensure that the TM in the project has got the right segmentation rules.

    Then right click on the DOCX file and select Batch Tasks, and then select the Prepare item and finish the wizard:

    Context menu in Trados Studio with 'Batch Tasks' expanded showing 'Prepare' option highlighted in red.

    Then go to the Target language in Files view and open the file (SDLXLIFF extension) to check the segmentation in the Editor.

    Regarding your question about the TM and Preview, segmentation rules apply to the project of course, but you won't be able to test them with the Preview button under File Types. And yes, you need to open the file in the Editor to confirm the segmentation rules are fine. Notice that the Preview button is in File Types section, so it makes sense to skip any other previews. On the other hand, I wished the feature to test the segmentation rules were available somewhere while adding a segmentation rule.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 4:38 AM (GMT 0) on 5 Mar 2024]