bAIbel AV guidesGuides and tutorialsbAIbel AV →

Guides / Confidentiality

Swap out contact details and references by rule

An explanation of pattern masking: emails and phone numbers become placeholders, a protected order reference goes as written, and the placeholders are restored.

  • Intermediate
  • 3 videos · 5:15
  • Shown on AV 0.2.11

Before you start

  • A project with a pattern profile attached (videos 13–14).
  • Examples of the values you want masked.
  • A regular expression for each format.
  • Pattern groups (video 13).
  • A project.
Video 1 · 1:25

How pattern profiles work

An explanation of pattern masking: emails and phone numbers become placeholders, a protected order reference goes as written, and the placeholders are restored. In the grid, pattern matches are underlined in grey; a segment is translated with the values restored; and when a reply drops a placeholder, AV refuses to write the translation.

Step by step

  1. How it works: emails and phones become placeholders, then are restored

    Before a segment is sent, the email and the phone number become placeholders. The order reference is protected, so it goes as written. The reply's placeholders are put back.

  2. Why patterns run before numbers

    Without the pattern profile, the number profile would treat the digits in the order reference and the phone number as figures, and scale them.

  3. Open the document: pattern matches underlined in grey, figures in amber

    Open the document. Pattern matches are underlined in grey, and the figures the number profile will mask in amber. The order references are not underlined: they are sent as written. Point at a match to see its profile and group.

  4. Click in segment 10 and press Ctrl+Shift+M: values restored

    Click in segment 10 and press Ctrl+Shift+M. The AI model got placeholders; AV put the email address and the phone number back.

  5. A placeholder goes missing: AV refuses to write the translation

    For this demonstration, the AI model's reply was edited to leave out [PHONE_a]. The phone number would vanish from the French, so AV refuses to write the translation. The status bar says why until you close it, and the segment is marked with ⛔.

Video 2 · 1:54

Create pattern groups

Pattern groups under Privacy, Pattern Profiles: a regex group for UK phone numbers, a regex group for a house order-reference format, and a list group for timber grade names, each tested and saved as a Custom group.

Step by step

  1. Open Privacy, Pattern Profiles: the shipped groups

    Pattern profiles are built from pattern groups, under Privacy → Pattern Profiles. Four groups come with AV, among them Email addresses. Make your own for anything else.

  2. Click Create Group, name it and choose Non-language specific

    Click Create Group. Name it, choose Non-language specific, and describe it. UK numbers written without +44 need a group of their own: the shipped one only finds international numbers.

  3. Click Next, Add Pattern, choose Regex; type a test sentence and click Test Group

    Click Next, then Add Pattern. Choose Regex, type the pattern, and confirm. Type a sentence in the test box and click Test Group: both numbers are found, and 12345 is not.

  4. Click Save Group

    Click Save Group. It joins the list as a Custom group.

  5. Create a second group for order references

    The order references are in a house format: TW, the year, and five digits. Another group.

  6. Type the regular expression and test it

    The regular expression matches TW-, four digits, a hyphen and five digits. The test finds both orders, and leaves the policy reference TW-7 alone.

  7. Save it

    Save it.

  8. Create a third group for a list of names

    A group can also be a plain list. The company's timber grade names are one.

  9. Choose List, type one entry per line and test

    Choose List and type one entry per line. The test finds all three grades.

  10. Save it

    Save it. The three groups are ready for a profile.

Video 3 · 1:56

Build a pattern profile and attach it

The seven-step pattern profile wizard: name, languages, groups, Redact tokens, Shield & restore for references needed as written, group order, and a test of what would be sent. The profile is saved and attached to a project under Pattern Masking, alongside a number profile.

Step by step

  1. Click Create New Profile, name it and say what it is for

    Click Create New Profile. The wizard has seven steps. Name the profile, and say what it is for.

  2. Choose the language pair

    Choose the language pair the profile is for: English to French.

  3. Click the groups to use

    Click the groups to use: Email addresses, which ships with AV, and the three made earlier.

  4. Set Redact tokens, e.g. [EMAIL_{i}]

    Redact sends a placeholder instead of the match, so the AI model never sees the real value. Set a short token for each group, with {i} where the counter goes: [EMAIL_{i}].

  5. Set references to Shield & restore

    Phones and grades are redacted too. The order references are needed in the translation as written, so they are set to Shield & restore: kept as written, and protected from the number pass.

  6. Check the group order

    Groups run from top to bottom. These never match the same text, so here the order changes nothing.

  7. Paste text and click Run Profile Test

    Paste some text and click Run Profile Test. The output is what would be sent: emails, phones and grades become placeholders, and the order references go as written.

  8. Click Finish

    The last step sums the profile up. Click Finish.

  9. In the project's Privacy Configuration, under Pattern Masking, choose the profile under Source

    Open the project's Privacy Configuration. Under Pattern Masking, choose the profile under Source. With Same profile on both sides ticked, Target follows it. None at the top of the list takes it off again.

  10. Check patterns and numbers are both masked

    This project masks patterns with the new profile and numbers with a number profile. Patterns go first, so the digits inside a phone number or an order reference are never scaled.

Recorded on 5 November 2026 with AV 0.2.11. The videos replay AI model answers recorded earlier, so what an AI model writes for you may differ.