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
  • Thanks ,

    The TM attached has the default segmentation rules:

    Screenshot of Trados Studio showing Segmentation Rules window with rules like Full stop rule, Other terminating punctuation, Colon, and Semi-colon.

    As you can see, there are no segmentation rule for parenthesis. So just guessing, you may have another TM with the same name but without the segmentation rule you needed.

    If I add the above mentioned segmentation rule to your TM:

    Screenshot of Trados Studio's Translation Memory Settings window with a focus on Edit Segmentation Rule dialog box for parenthesis.

    Then I get this as expected (of course, after deleting the DOCX from the Files view and adding it again):

    Screenshot of a Trados Studio document with highlighted text indicating segmentation errors, such as missing breaks for parenthesis.

    Please ensure you use the TM with the right segmentation rules in your project, delete the files in Files view and add them in order to be re-segmented. This should work!

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 4:38 AM (GMT 0) on 5 Mar 2024]
  • Thank you Jesús. My apologies, I must have added the wrong TM to the project before sending it to you. I have tried again, followed step-by-step (at least I think) your instructions, and still the same problem. I have created a video to show you. I added the correct TM with the right segmentation rule to my project (in both SC and TG language though I know the TG was not necessary). At this point, I think it´s just better for me to give up. I know it should work but for whatever reason it doesn´t for me.

  • Hi ,

    I know what's going on!

    The Preview is a very nice feature to test your File Type settings, but it takes some default segmentation rules so your existing parentheses rule is bypassed. So please don't use the Preview to test segmentation rules.

    Yo need to delete the file in the Files view, add it again, prepare it, and open it in the Editor. You'll see then that it's correctly segmented.

  • 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]