Skip to content

Commit

Permalink
Drop WA driver license number (#1214)
Browse files Browse the repository at this point in the history
  • Loading branch information
SharonHart authored Nov 15, 2023
1 parent 2f30b37 commit 8c6aa22
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ class UsLicenseRecognizer(PatternRecognizer):
"""

PATTERNS = [
Pattern(
"Driver License - WA (weak)",
r"\b((?=.*\d)([A-Z][A-Z0-9*]{11})|(?=.*\*)([A-Z][A-Z0-9*]{11}))\b", # noqa: E501
0.3,
),
Pattern(
"Driver License - Alphanumeric (weak)",
r"\b([A-Z][0-9]{3,6}|[A-Z][0-9]{5,9}|[A-Z][0-9]{6,8}|[A-Z][0-9]{4,8}|[A-Z][0-9]{9,11}|[A-Z]{1,2}[0-9]{5,6}|H[0-9]{8}|V[0-9]{6}|X[0-9]{8}|A-Z]{2}[0-9]{2,5}|[A-Z]{2}[0-9]{3,7}|[0-9]{2}[A-Z]{3}[0-9]{5,6}|[A-Z][0-9]{13,14}|[A-Z][0-9]{18}|[A-Z][0-9]{6}R|[A-Z][0-9]{9}|[A-Z][0-9]{1,12}|[0-9]{9}[A-Z]|[A-Z]{2}[0-9]{6}[A-Z]|[0-9]{8}[A-Z]{2}|[0-9]{3}[A-Z]{2}[0-9]{4}|[A-Z][0-9][A-Z][0-9][A-Z]|[0-9]{7,8}[A-Z])\b", # noqa: E501
Expand Down
9 changes: 0 additions & 9 deletions presidio-analyzer/tests/test_us_driver_license_recognizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ def entities():
"text, expected_len, expected_positions, expected_score_ranges",
[
# fmt: off
# WA license tests
(
"AA1B2**9ABA7 A*1234AB*CD9",
2,
((0, 12), (13, 25),),
((0.3, 0.4), (0.3, 0.4),),
),
("3A1B2**9ABA7", 0, (), (),),
# Other states license weak tests
("H12234567", 1, ((0, 9),), ((0.3, 0.4),),),
("C12T345672", 0, (), (),),
# invalid license that should fail, but doesn't do to context
Expand Down

0 comments on commit 8c6aa22

Please sign in to comment.