-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add predefined_recognizer: IN_AADHAAR #1256
Conversation
Added India PAN (Permanent Account Number) recognizer
refined the regex for better recognition and enhanced the test cases accordingly
Fixed lint error that was missed earlier.
Added test cases , verification and context data
Added negative test cases per review comments.
linted code
I would like to know where to set the default score for a newly introduced recognizer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! Left a couple of comments
presidio-analyzer/presidio_analyzer/predefined_recognizers/in_aadhaar_recognizer.py
Outdated
Show resolved
Hide resolved
presidio-analyzer/presidio_analyzer/predefined_recognizers/in_aadhaar_recognizer.py
Outdated
Show resolved
Hide resolved
update pattern recognizer value per suggestion in review
hi @omri374 , |
Hi @devopam unfortunately we cannot use stdnum because of its license. Are you familiar with another implementation with a less strict license? |
Hi @omri374 , |
I think that's a good way forward. Perhaps create a |
added PresidioAnalyzerUtils class with generic functions. removed usage of stdnum
Hi @omri374 , I have added analyzer_utils.py as a generic class for utility functions, and created the logic for verhoeff validation in it as a function. Please have a look and let me know . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks great. Left one comment asking to add a few unit tests to the utils class.
added test cases for analyzer_utils.py in prescribed format
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
added to the count of predefined recognizers
hi @omri374 . I updated the failing test case with increased count of predefined recognizers. kindly run once again. regret the rework. |
/azp run |
no worries :) |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Change Description
Add a new recognizer - IN_AADHAAR, language: en
Describe your changes
Add Govt of India issued unique person identifier : Aadhaar
Issue reference
This PR fixes issue #XX
Checklist