Named Entity Recognition Grammars Package 26.2
Named Entity Recognition Grammars User Guide

# Validated ID Numbers

The post-processing Lua scripts, `pii_postprocessing.lua`, `phi_postprocessing.lua` and `pci_postprocessing.lua` include steps to validate ID numbers that are found by Named Entity Recognition. Validation improves accuracy by discarding results that match the pattern for a valid ID number, but cannot be genuine because they have an invalid checksum. The script increases the score for matches that have a valid checksum, because the valid checksum indicates that the match is more likely to be genuine.

The following sections list the entities that the post-processing scripts validate. For more information about post-processing, see Configure Post Processing.

## PII Grammars

Health ID numbers (`health.ecr`)
pii/health/id/context/au |
pii/health/id/context/br |
pii/health/id/context/gb |
pii/health/id/context/fr | Validated using the INSEE checksum
pii/health/id/context/nz |

National ID numbers (`national_id.ecr` or `national_id_cjkvt.ecr`)
pii/id/context/at | pii/id/nocontext/at | Only the SSN component is validated.
pii/id/context/be | pii/id/nocontext/be |
pii/id/context/bg | pii/id/nocontext/bg |
pii/id/context/ca | pii/id/nocontext/ca |
pii/id/context/ch | pii/id/nocontext/ch |
pii/id/context/cn | pii/id/nocontext/cn |
pii/id/context/cz | pii/id/nocontext/cz |
pii/id/context/dk | pii/id/nocontext/dk | Postprocessing reduces the score of failed checksum values to account for valid IDs that do not meet checksum requirements. Reduce the post-processing threshold to 0.4 to include these values, or to 0.45 to include only values that include a birth date portion of 0101 (this value is used for unknown birth dates, so there are more of these values that fail checksum requirements).
pii/id/context/ee | pii/id/nocontext/ee |
pii/id/context/es | pii/id/nocontext/es |
pii/id/context/fi | pii/id/nocontext/fi |
pii/id/context/fr | pii/id/nocontext/fr |
pii/id/context/gl | pii/id/nocontext/gl | Postprocessing reduces the score of failed checksum values to account for valid IDs that do not meet checksum requirements. Reduce the post-processing threshold to 0.4 to include these values, or to 0.45 to include only values that include a birth date portion of 0101 (this value is used for unknown birth dates, so there are more of these values that fail checksum requirements).
pii/id/context/gr | pii/id/nocontext/gr | Only the AMKA component is validated.
pii/id/context/hk | pii/id/nocontext/hk |
pii/id/context/hr | pii/id/nocontext/hr |
pii/id/context/hu | pii/id/nocontext/hu | Only the PIN component is validated.
pii/id/context/ie | pii/id/nocontext/ie |
pii/id/context/in | pii/id/nocontext/in |
pii/id/context/is | pii/id/nocontext/is |
pii/id/context/it | pii/id/nocontext/it |
pii/id/context/jp | pii/id/nocontext/jp |
pii/id/context/lt | pii/id/nocontext/lt |
pii/id/context/lu | pii/id/nocontext/lu |
pii/id/context/nl | pii/id/nocontext/nl |
pii/id/context/no | pii/id/nocontext/no |
pii/id/context/pl | pii/id/nocontext/pl |
pii/id/context/pt | pii/id/nocontext/pt |
pii/id/context/ro | pii/id/nocontext/ro |
pii/id/context/se | pii/id/nocontext/se |
pii/id/context/si | pii/id/nocontext/si |
pii/id/context/sk | pii/id/nocontext/sk | Only the Rodné číslo component is validated.
pii/id/context/th | pii/id/nocontext/th |
pii/id/context/tr | pii/id/nocontext/tr |
pii/id/context/tw | pii/id/nocontext/tw |
pii/id/context/za | pii/id/nocontext/za |

Tax ID numbers (`tin.ecr` or `tin_cjkvt.ecr`)
pii/tin/context/at | pii/tin/nocontext/at |
pii/tin/context/au | pii/tin/nocontext/au |
pii/tin/context/be | pii/tin/nocontext/be |
pii/tin/context/bg | pii/tin/nocontext/bg |
pii/tin/context/br | pii/tin/nocontext/br | Cadastro de Pessoas Físicas (CPF) Cadastro Nacional de Pessoa Jurídica (CNPJ)
pii/tin/context/ca | pii/tin/nocontext/ca |
pii/tin/context/ch | pii/tin/nocontext/ch | Validation for AHV number, but not for UID-Nr.
pii/tin/context/cy | pii/tin/nocontext/cy |
pii/tin/context/cz | pii/tin/nocontext/cz |
pii/tin/context/de | pii/tin/nocontext/de |
pii/tin/context/dk | pii/tin/nocontext/dk |
pii/tin/context/ee | pii/tin/nocontext/ee |
pii/tin/context/es | pii/tin/nocontext/es |
pii/tin/context/fi | pii/tin/nocontext/fi |
pii/tin/context/fr | pii/tin/nocontext/fr |
pii/tin/context/hr | pii/tin/nocontext/hr |
pii/tin/context/hu | pii/tin/nocontext/hu |
pii/tin/context/ie | pii/tin/nocontext/ie |
pii/tin/context/is | pii/tin/nocontext/is |
pii/tin/context/it | pii/tin/nocontext/it |
pii/tin/context/jp | pii/tin/nocontext/jp |
pii/tin/context/lt | pii/tin/nocontext/lt |
pii/tin/context/lu | pii/tin/nocontext/lu |
pii/tin/context/mt | pii/tin/nocontext/mt |
pii/tin/context/nl | pii/tin/nocontext/nl |
pii/tin/context/nz | pii/tin/nocontext/nz | Inland Revenue Department Number
pii/tin/context/pl | pii/tin/nocontext/pl |
pii/tin/context/pt | pii/tin/nocontext/pt |
pii/tin/context/se | pii/tin/nocontext/se |
pii/tin/context/si | pii/tin/nocontext/si |
pii/tin/context/sk | pii/tin/nocontext/sk |
pii/tin/context/za | pii/tin/nocontext/za |

Machine readable passport numbers (`mrtd.ecr` and `mrtd_cjkvt.ecr`)
pii/mrtd/mrp
pii/mrtd/mrp_cjkvt
pii/mrtd/mrotd/td1
pii/mrtd/mrotd/td1_cjkvt

Driving License numbers (`driving_cjkvt.ecr`)
pii/driving/context/tw | pii/driving/nocontext/tw

## PHI Grammars

Bank Account Numbers (`account.ecr`)
phi/account/bank/context/us
phi/account/bank/nocontext/us (MICR_CODE)

Drug Enforcement Agency (`dea.ecr`)
phi/dea/context/us
phi/dea/nocontext/us

Unique Device Identifiers (`device.ecr`)
pii/device/udi/nocontext

Vehicle Identification Numbers (`vehicle.ecr`)
phi/vehicle/vin/context/us
phi/vehicle/vin/nocontext/us

## PCI Grammars

Magnetic Stripe Data (`magstripe.ecr`)
pci/magstripe/context/magstripe | pci/magstripe/nocontext/magstripe | Validation implicitly validates the Primary Account Number (PAN) that is included in the magstripe data.

Primary Account Numbers (`pan.ecr`)
pci/pan/context/pan | pci/pan/nocontext/pan

Copyright 2026 Open Text
Version 26.2 | Last updated April 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Named Entity Recognition Grammars Package 26.2

Topic Title: Validated ID Numbers