Is there any way to get Studio's segmentation to include closing punctuation following a break plus a hard space?

I work in a French/English environment where we are translating in both directions and, in order to maximize leverage of our respective memories, wish to respect our respective styles. Our house style for French is to insert a space after opening French quotation marks («) and before the closing ones (»). I cannot figure out how to make the Studio 2015 break after the closing quotation mark where it is separated from a full stop, question mark or exclamation point by a space. I am new to regular expressions, but I tried to force Studio to include a closing quotation mark preceded by a space using (?:\p{Zs}\p{Pe})|[\s] in the After break space. I tried with and without Include closing punctuation, but it did not work. Any suggestions?

Parents
  • Hi Paul; thanks for the quick response.

    Here is some sample text with the three stops that might be followed by a closing French quotation mark:

    « Voici un exemple avec un point final. » « Pourquoi est-ce que Studio ne marche pas comme il faut pour nous? » « Zut, alors! »

    French-Canadian style is to separate the quotation marks from the text they surround with a space. (Our house rules require a hard space, and incoming source documents are normally edited to change soft spaces to hard.) The default segmentation rules for our French-English memories cause Studio to place the closing quotation mark in a segment all on its own, requiring us to manually edit the source segments.

    My latest test regex, @"(?:\u0020\u00BB[\s])|[\s]", with Include closing punctuation unchecked, put all of the above three sentences in one segment. The same string without the @ and quotation marks gave me the same results as the default segmentation. (I guess I need to paste from Regex Buddy as is? I have .NET flavour selected).

    The result is four improperly punctuated segments instead of the three properly punctuated ones:

    « Voici un exemple avec un point final.
    » « Pourquoi est-ce que Studio ne marche pas comme il faut pour nous?
    » « Zut, alors!
    »

  • Hi Janis,

    It sounds like you need an exception to the full stop and other terminating punctuation rules, rather than a new segmentation rule, as explained here:

    To achieve what you want, add an exception like this:

    Make sure to add it both to the full stop rule and to the other terminating punctuation rule. That will do the trick. : )

    Edit: To elaborate on the above, make sure yo have selected both ? and ! when you add the exception to the "Other terminating punctuation rule", so that it will look like this:

    You will also need a segmentation rule to break before «, like this:

Reply Children