CheckMate: ability to verify that numbers in the source are also present in the target

Create issue
Issue #543 resolved
Chase Tingley created an issue

Original thread:

Silvio is asking for the ability to have CheckMate detect that if "5" is present in the source, but "6" is present in the target, this is a mismatch and possibly a translation error. It isn't possible to do this generically for all numbers using a regex, because they're considered independently -- "\d+" could match one number in the source and a different number in the target, and CheckMate wouldn't realize anything was wrong.

I think this problem may be specific to number handling, so it might be useful as a specific, separate validation check (ie, "Verify numerical values in source as present in the target").

Comments (3)

  1. Chase Tingley reporter

    Silvio contacted me to say that the <same> rule actually solves this problem, for example:

    Source rule: \d+ Target rule: <same>

    This only works for explicitly matching the numbers (for example, you can't try to detect "5 lb" vs "6 lb" with a complex pattern), but it does solve the basic use case.

  2. Log in to comment