Combining segments
מפרסם התגובה: James McVay
James McVay
James McVay  Identity Verified
ארצות הברית
Local time: 14:59
מרוסית לאנגלית
+ ...
May 4, 2010

I'm translating an article where almost all of the first names of people mentioned are abbreviated as an initial followed by a period. Example: H. Karzai. OmegaT ends the segment after the period, thus splitting the sentence into two parts. Is there a way I can force combination of two (or more) segments?

I realize OmegaT allows me to establish segmentation rules for common abbreviations, but that won't help in this instance.


 
Didier Briel
Didier Briel  Identity Verified
צרפת
Local time: 19:59
מאנגלית לצרפתית
+ ...
Segmentation rules would help May 4, 2010

James McVay wrote:
I'm translating an article where almost all of the first names of people mentioned are abbreviated as an initial followed by a period. Example: H. Karzai. OmegaT ends the segment after the period, thus splitting the sentence into two parts. Is there a way I can force combination of two (or more) segments?

A simple solution is to replace the space (between H. and Karzai) by a non-breaking space in the source document.
Thus the split will not occur.

I realize OmegaT allows me to establish segmentation rules for common abbreviations, but that won't help in this instance.

It would, if you create a rule that prevent breaking:
Before: [A-Z]\.
After: \s
(The Segmentation/Exception check box must *not* be checked.)

Put that as the first rule.

Didier


 
James McVay
James McVay  Identity Verified
ארצות הברית
Local time: 14:59
מרוסית לאנגלית
+ ...
TOPIC STARTER
Learn something new every day May 6, 2010

Thanks, Didier. I tried it and it works. Then I wrote rules for another few abbreviations that come up repeatedly in Russian.

 
Samuel Murray
Samuel Murray  Identity Verified
הולנד
Local time: 19:59
חבר (2006)
מאנגלית לאפריקאנס
+ ...
Two methods (and a third) May 6, 2010

James McVay wrote:
Is there a way I can force combination of two (or more) segments?


Allow me to say what Didier said. You can (a) edit the source text to remove the offending fullstops or to change the space into a non-breaking space, and then reload the project, or (b) add a segmentation rule.

Didier's segmentation rule is very good. The regular expressions used by OmegaT are these:
http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html

But, you can also add rules on a per-case basis. For example, if your text contains "W. Churchill" then you can add that specific name to the segmentation rules. Normally it would be cumbersome to do it (OmegaT's GUI just wasn't designed for quick rule adding), so if you're just a little computer literate, you can try my little script for adding exceptions to the segmentation rules:

http://leuce.com/tempfile/omtautoit/segadder.zip


 
Harklas
Harklas
Local time: 19:59
I don't make it Jun 15, 2010

My problem this time is that they use each header twice, and only the second time they want it translated. So if a header is like "Options", the source goes:

Options
Options

and the target should be:

Options
Alternativ

I've made one exception by adding Options to the "before" in the segmentation rules exceptions, with "after" being empty, and also one by adding Options to the "after", with the "before" being empty. And one with "Opt
... See more
My problem this time is that they use each header twice, and only the second time they want it translated. So if a header is like "Options", the source goes:

Options
Options

and the target should be:

Options
Alternativ

I've made one exception by adding Options to the "before" in the segmentation rules exceptions, with "after" being empty, and also one by adding Options to the "after", with the "before" being empty. And one with "Options" in both before and after (although there is technically a Return in there as well, which might or might not matter).

Still it makes the two "Options" two different segments, thereby forcing me to have the same translation for them...
Collapse


 
Samuel Murray
Samuel Murray  Identity Verified
הולנד
Local time: 19:59
חבר (2006)
מאנגלית לאפריקאנס
+ ...
The segmentaion rules trick works only... Jun 15, 2010

Harklas wrote:
Still it makes the two "Options" two different segments, thereby forcing me to have the same translation for them...


The segmentation rules trick works only if the repeating segment is in a paragraph with other sentences. If your segment is in its own paragraph, no segmentation rule will force it to "join" another segment.


 
Harklas
Harklas
Local time: 19:59
so then I guess Jun 15, 2010

the only solution is to manually edit the finished translations...

 


לא הוקצה מנהל במיוחד לפורום זה.
To report site rules violations or get help, please contact site staff »


Combining segments






Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »
CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

Buy now! »