Skip to content

feat: Add UK passport and vehicle registration recognizers#1862

Open
tee-jagz wants to merge 2 commits intomicrosoft:mainfrom
tee-jagz:feat/uk-recognizers
Open

feat: Add UK passport and vehicle registration recognizers#1862
tee-jagz wants to merge 2 commits intomicrosoft:mainfrom
tee-jagz:feat/uk-recognizers

Conversation

@tee-jagz
Copy link
Contributor

Add two new UK-specific recognizers:

  • UK_PASSPORT: detects 2-letter + 7-digit passport numbers (2015+ format)
  • UK_VEHICLE_REGISTRATION: detects current (2001+), prefix (1983-2001), and suffix (1963-1983) number plate formats with age identifier validation

Change Description

  • Add UkPassportRecognizer for UK passport numbers (2-letter prefix + 7 digits, issued from 2015 onwards) with context-based scoring
  • Add UkVehicleRegistrationRecognizer for UK number plates covering three format eras, with validate_result checking age identifier ranges (02-29, 51-79) for the current format and replacement_pairs for space/hyphen normalization
  • Both recognizers are disabled by default in default_recognizers.yaml (country-specific convention)
  • 13 test cases for passport, 27 test cases for vehicle registration

Issue reference

N/A

Checklist

  • I have reviewed the contribution guidelines
  • I have signed the CLA (if required)
  • My code includes unit tests
  • All unit tests and lint checks pass locally
  • My PR contains documentation updates / additions if required

Add two new UK-specific recognizers:
- UK_PASSPORT: detects 2-letter + 7-digit passport numbers (2015+ format)
- UK_VEHICLE_REGISTRATION: detects current (2001+), prefix (1983-2001),
  and suffix (1963-1983) number plate formats with age identifier validation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments