Improving number + noun matches?

Is there a way of tweaking the number + noun matches in Trados? One thing I struggle with a lot are sequences like

1 hr

2 hrs

3 hrs

4 hrs

5 hrs

10 hrs

11 hrs

12 hrs

Singular isn't a problem but once you move off singular, Trados appears to be very agnostic as to predicting what is a full match and what isn't, irrespective of the plural format for the target locale i.e. locales where the formula for plural is more complex than English (which has two forms; ONE and ELSE). Most languages have different plural structures - in my case, we have ONE (1, 11), TWO (2, 12), FEW (3-10, 13-20) and OTHER (anything else, including 0).

So I'd expect it, after

1 hr = 1 taigh

to show this as fuzzy

2 hrs = 2 thaigh

but then this also as fuzzy

3 hrs = 3 uairean

then these as full matches

3 hrs - 10 hrs = 3-10 uairean

then also as a full match

11 hrs = 11 uair

and so on. The problem is that when you get a list of these (even though I have tried and tried to turn off the way Trados automatically matches and moves forward one cell), before you know it you're at the end of the list and they're all wrong.

Is this a setting I can tweak somewhere or have plurals to date not made it into the gubbins of Trados? If not, it ought to be fairly easy to code this into Trados in relation to the target locale by simply pulling the plural formulae off CLDR I'd say.

Parents Reply
  • I have to admit, your usecase is quite tricky. For example, to be able to handle these:

    3 hrs - 10 hrs = 3-10 uairean

    You would need one rule like this:

    Find
    ((?:10|[3-9]?[3-9])\s)hrs\s-\s((?:10|[3-9]?[3-9])\s)hrs

    Replace
    $1- $2uairean

    To handle just 3hrs or 10hrs and anything between you'd need something like this:

    Find
    ((?:10|[3-9]?[3-9])\s)hrs

    Replace
    $1uairean

    Then for this:

    1 hr = 1 taigh

    Find
    \b(1 )hr\b

    Replace
    $1thaigh

    You get the idea perhaps... I think once you have all the rules, and maybe it's not too many, then the job would not be too difficult. But it certainly is a complex search and replace operations as the linguistic rules are not simplistic here.

    Regards

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Children
  • Errrr... ok. Yeah, no I'm not doing that.
    Though given that I can hardly be the only translator using Studio facing this problem (Slavonic for example has similarly complex rules), I think an inbuilt system would be desirable i.e. something that looks at the locale plural rules and if it sees that the locale has (for example) 1,11; 2, 12; 3-10, 13-20; else then if it encounters strings such as
    1 hr
    2 hrs
    3 hrs
    4 hrs
    11 hrs
    12 hrs
    13 hrs
    it does some form of smart matching of Recurrent Number + Else pattern and does not treat 3 hrs and 12 hrs as "3" and "hrs" but "3 hrs" and "12 hrs" or alternatively, whatever mechanism commits strings to the TM does not merge "3 hrs" with "5 hrs" as it does at the moment.
  • Hi Michael,

    Like that it's less complicated. But you added even more complexity by asking for this:

    3 hrs - 10 hrs = 3-10 uairean

    As opposed to this:

    3 hrs - 10 hrs = 3 uairean -10 uairean

    A straightforward "number space hr(hrs)" is far less complex and I'm sure you could handle that with a few simple rules.

    Regards

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Ah you misread me (and I wasn't entirely clear) - the hyphenated stuff does not appear on the whole (and I wouldn't expect Studio to handle it), it simply meant 3 hrs, 4 hrs, 5 hrs, 6 hrs, 7 hrs, 8 hrs, 9 hrs, 10 hrs individually occur as strings - but it was a lot to type. Just shows that shortcuts are not always quicker.
  • In that case it's pretty straightforward.  The easiest way is probably as Jerzy said and allow Studio to do it's thing so you get all the numbers and hrs correct (not translated) and then do four search & replace operations.

    Like this.

    1 hr = 1 taigh

    Search
    \b(1 )hr\b

    Replace
    $1taigh

    2 hrs = 2 thaigh

    Search
    \b(2 )hrs\b

    Replace
    $1thaigh

    3 hrs = 3 uairean (in fact up to 10 hrs = 10 uairean)

    Search
    \b((?:10|[3-9]?[3-9])\s)hrs\b

    Replace
    $1uairean

    11 hrs = 11 uair

    Search
    \b(11 )hrs\b

    Replace
    $1uair

    So just four search and replace operations.  Try it just by making sure you select the regular expression option when you search and replace:

    I reckon when you've done it once or twice it won't seem so daunting any more.

    If you wanted to do this interactively the same rules could be used in the Regex AutoSuggest Provider but personally I think for things like this the search and replace is better because you let Studio do it's thing quickly which will save you a lot of time, and then run a couple of search & replace operations across the file, or even an entire project at the end, in one go.

    Regards

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub