Pages in topic:   [1 2] >
QA Checker 3.0 > Check numbers
Thread poster: Lenart

Lenart  Identity Verified
Luxembourg
Local time: 06:06
Feb 13

Good evening everybody,

In my QA Checker 3.0 I have ticked the field »Check numbers«

However, this »Check numbers« function is not very useful for my documents, because I get a lot of falls errors with numbers that are connected to letters or signs (e.g. C-567/17).

Therefore I would like to have a look at a code behind »Check numbers« and adapt it to my needs.

Could someone please share this code that is hiding behind »Check numbers« field?


 

Anthony Rudd

Local time: 06:06
German to English
+ ...
QA regex Feb 20

What exactly do you want to check?

“Project Settings” → “Verification” → “QA Checker 3.0” → “Regular Expressions” lists the regexes performed for the QA (Quality Assurance).


 

Lenart  Identity Verified
Luxembourg
Local time: 06:06
TOPIC STARTER
“Verification”→ “QA Checker 3.0” → “Numbers“ → “ Check numbers“ Feb 20

Hello Anthony,

I am tlakin about “Project Settings” → “Verification” → “QA Checker 3.0” → “QA Checker 3.0” “Numbers“ → “ Check numbers“

The problem is that above “ Check numbers“ function is not useful for me. The reason being that in my text I have tons of numbers that are connected to letters or signs (e.g. C-567/17). And Every time numbers are connected to letters or signs, “ Check numbers“ verification will show you error, al
... See more
Hello Anthony,

I am tlakin about “Project Settings” → “Verification” → “QA Checker 3.0” → “QA Checker 3.0” “Numbers“ → “ Check numbers“

The problem is that above “ Check numbers“ function is not useful for me. The reason being that in my text I have tons of numbers that are connected to letters or signs (e.g. C-567/17). And Every time numbers are connected to letters or signs, “ Check numbers“ verification will show you error, although the numbers per se (e.g.567 and 17) are completely correct.

I suppose that behind above “ Check numbers“ there is a regexcode that verify numbers. I would like to have a look of this code, modify it and past it in “ Regular expressions checker“.

So if you know the regexcode behind “ Check numbers“ verification, please share it.

[Edited at 2019-02-20 15:44 GMT]

[Edited at 2019-02-20 15:45 GMT]

[Edited at 2019-02-21 13:02 GMT]

[Edited at 2019-02-21 13:32 GMT]
Collapse


 

Anthony Rudd

Local time: 06:06
German to English
+ ...
Number checking Feb 21

Which version of Studio are you using? With Studio 2017 I do not get any "Number error" messages for numbers such as those you mentioned.

 

Lenart  Identity Verified
Luxembourg
Local time: 06:06
TOPIC STARTER
C-258/17 Feb 21

Excuse me, I wasn't clear enough.

If I translate C-258/17 as C258/17, I get an error(number is missing in target sector or is not properly localized).

Numbers are ok in this case, it is just that the rules of writing them in target language are different than in source language, which is quite common.

It goes the same for „1 bis“ that we translate as „1a“

[Edited at 2019-02-21 13:51 GMT]


 

Anthony Rudd

Local time: 06:06
German to English
+ ...
Number check condition Feb 21

What exactly do you want to check?
For example: C-258/17 is translated as C258/17
If so, this is done with the QA Regex condition: Report if source matches but not the target
(and the appropropriate source and target regexes)


 

Lenart  Identity Verified
Luxembourg
Local time: 06:06
TOPIC STARTER
good general regex code for numbers is hard to make from a scratch Feb 22

I could create regex condition: if 258 in the source, than 258 should be also in the target.

off course this would work great in this particular case, but would be useless in general as numbers will obviously change all the time.

so you are right, I am looking for a GOOD GENERAL regex code for numbers.

And good regex general code for numbers is difficult to write and therefore I don't want to start from a scratch.

like already said, SDL alrea
... See more
I could create regex condition: if 258 in the source, than 258 should be also in the target.

off course this would work great in this particular case, but would be useless in general as numbers will obviously change all the time.

so you are right, I am looking for a GOOD GENERAL regex code for numbers.

And good regex general code for numbers is difficult to write and therefore I don't want to start from a scratch.

like already said, SDL already developed a code. It is not a perfect one (as discused it does not check numbers per se but numbers in connection with some signs in the source). This code is hiding behind check numbers function (“Project Settings” → “Verification” → “QA Checker 3.0” → “QA Checker 3.0” “Numbers“ → “ Check numbers“).

It would be very nice if somebody from SDL could share this code so we could pimp it up and use it in regex conditions.

of course if somebody have an idea for a solid general regex code for numbers (that is better from one developed by SDL) he/she is very welcome to share it:)
Collapse


 

Anthony Rudd

Local time: 06:06
German to English
+ ...
QA regexes Feb 22

The following regexes check that numbers like C-123/45 are translated to C123/45 (i.e. the “-“ is removed). If the number of digits can vary, the regexes would need to be adapted appropriately.
Regex source: C-\d{3}/\d{2}
Regex target: C\d{3}/\d{2}
Condition: Report if source matches but not the target

I have “published” an “application” in the SDL Application Store that provides many examples for the use of regexes: Practical Usage of Regular Expressio
... See more
The following regexes check that numbers like C-123/45 are translated to C123/45 (i.e. the “-“ is removed). If the number of digits can vary, the regexes would need to be adapted appropriately.
Regex source: C-\d{3}/\d{2}
Regex target: C\d{3}/\d{2}
Condition: Report if source matches but not the target

I have “published” an “application” in the SDL Application Store that provides many examples for the use of regexes: Practical Usage of Regular Expressions for Translators (it is also available in printed form)
Collapse


 

Lenart  Identity Verified
Luxembourg
Local time: 06:06
TOPIC STARTER
thank you but as I said a GENERAL GOOD regex code for numbers is quite a complex thing Feb 22

numbers could be more or less than 3 in first and second place

and than as I said above this was just an example

the same problem goes with „1 bis“ that we translate as „1a“

and we have a LOT of those rules according to which we integrate numbers in target differently (comparing to source)

and last but not the least I will still need to check all numbers with “ Check numbers“ (“Project Settings” → “Verification” → “QA
... See more
numbers could be more or less than 3 in first and second place

and than as I said above this was just an example

the same problem goes with „1 bis“ that we translate as „1a“

and we have a LOT of those rules according to which we integrate numbers in target differently (comparing to source)

and last but not the least I will still need to check all numbers with “ Check numbers“ (“Project Settings” → “Verification” → “QA Checker 3.0” → “QA Checker 3.0” “Numbers“ → “ Check numbers“). Therefore I will get an error anyways (even if I add the code that you suggested)

this is why I want to get a code that hides behind “ Check numbers“ and upgrade it to my needs.
Collapse


 

Anthony Rudd

Local time: 06:06
German to English
+ ...
QA regex Feb 22

You make the pertinent statement: "compare to source"
This is just the condition that my answer showed (Condition: Report if source matches but not the target).

Obviously the regexes may need to be extended to cater for your particular numbers, for example
Regex source: C-\d{1,3}/\d{1,2}
Regex target: C\d{1,3}/\d{1,2}

I find that the standard QA number checking not very useful, so you would probably do better to write your own regexes, and also the oth
... See more
You make the pertinent statement: "compare to source"
This is just the condition that my answer showed (Condition: Report if source matches but not the target).

Obviously the regexes may need to be extended to cater for your particular numbers, for example
Regex source: C-\d{1,3}/\d{1,2}
Regex target: C\d{1,3}/\d{1,2}

I find that the standard QA number checking not very useful, so you would probably do better to write your own regexes, and also the other special numbers that you want to validate (such as "1 bis").

Unlike memoQ, where the associated regexes are listed (although scarcely understandable), the Studio number-checking regexes appear to be system-internal.
Collapse


 

Anthony Rudd

Local time: 06:06
German to English
+ ...
QA number checking regexes Feb 23

The amount of effort involved with the regex depends on how extensive checks should be

For example:
Regex source: \d+\sbis
Regex target: \d+a
Condition: Report if target matches but not the source
checks whether "n bis" is translated as "ma" (where n and m are any numbers)

whereas
Regex source: (\d+)\sbis
Regex target: $1a
Condition: Grouped search expression - report if source matches but not target
checks that "n bis"
... See more
The amount of effort involved with the regex depends on how extensive checks should be

For example:
Regex source: \d+\sbis
Regex target: \d+a
Condition: Report if target matches but not the source
checks whether "n bis" is translated as "ma" (where n and m are any numbers)

whereas
Regex source: (\d+)\sbis
Regex target: $1a
Condition: Grouped search expression - report if source matches but not target
checks that "n bis" is translated as "na" (i.e. the same number)

The same logic can be used for integer numbers.
Collapse


 

Lenart  Identity Verified
Luxembourg
Local time: 06:06
TOPIC STARTER
test of sugested code failed Feb 26

I gave it a try and tested the suggested code and its not working for me.

To makes things simple I focused simply on this text: „123/45“

I put a code in sdl:

Regex source: \d{3}/\d{2}
Regex target: \d{3}/\d{2}
Condition: Report if source matches but not the target

then I wrote 100/10 in target and I don't get any error.

do you have any idea where is the problem?


 

Anthony Rudd

Local time: 06:06
German to English
+ ...
QA Checker Feb 28

As I mentioned, the regex depends on how extensive the checks should be.
For example, “Report if target matches but not the source” checks only the “pattern”, whereas “Grouped search expression - report if source matches but not target” also checks the content.

The code you mentioned works correctly, 123/45 and 100/10 match the specified source and target regexes, respectively.

The following QA Check checks that the content also matches
Source
... See more
As I mentioned, the regex depends on how extensive the checks should be.
For example, “Report if target matches but not the source” checks only the “pattern”, whereas “Grouped search expression - report if source matches but not target” also checks the content.

The code you mentioned works correctly, 123/45 and 100/10 match the specified source and target regexes, respectively.

The following QA Check checks that the content also matches
Source regex: (\d{3})/(\d{2})
Target regex: $1/$2
Condition: Grouped search expression - report if source matches but not target
Collapse


Lenart
 

Lenart  Identity Verified
Luxembourg
Local time: 06:06
TOPIC STARTER
now it works Mar 1

awesome! thank you for explanation!!

 

Kerstin Kiss
Local time: 06:06
English to German
error message 1-2 -> 1 to 2 Jun 5

Hi everybody,

I am not familiar with reprogramming Trados or whatever you did right above ...

I have lots of texts where the "-" between numbers, i.e. 1-2 hours, is to be replaced with "1 to 2 hours" in the translation. Trados won't accept this, issuing error messages although the numbers are correct. That's rather annoying.

Any piece of advice would be highly appreciated.

Thank you!


Lenart
 
Pages in topic:   [1 2] >


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

QA Checker 3.0 > Check numbers

Advanced search







Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

More info »
Déjà Vu X3
Try it, Love it

Find out why Déjà Vu is today the most flexible, customizable and user-friendly tool on the market. See the brand new features in action: *Completely redesigned user interface *Live Preview *Inline spell checking *Inline

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search