Skip to content

Add predefined_recognizer: IN_AADHAAR#1256

Merged
omri374 merged 21 commits into
microsoft:mainfrom
devopam:main
Jan 30, 2024
Merged

Add predefined_recognizer: IN_AADHAAR#1256
omri374 merged 21 commits into
microsoft:mainfrom
devopam:main

Conversation

@devopam

@devopam devopam commented Jan 16, 2024

Copy link
Copy Markdown
Contributor

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

  • 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

@devopam

devopam commented Jan 17, 2024

Copy link
Copy Markdown
Contributor Author

I would like to know where to set the default score for a newly introduced recognizer.

@omri374 omri374 left a comment

Copy link
Copy Markdown
Collaborator

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

update pattern recognizer value per suggestion in review
@devopam

devopam commented Jan 18, 2024

Copy link
Copy Markdown
Contributor Author

hi @omri374 ,
I added a new python library : stdnum for use. Will it automatically get added to requirements.txt or I need to manually refer it somewhere ? Please advise

@omri374 omri374 closed this Jan 18, 2024
@omri374 omri374 reopened this Jan 18, 2024
@omri374

omri374 commented Jan 18, 2024

Copy link
Copy Markdown
Collaborator

Hi @devopam unfortunately we cannot use stdnum because of its license. Are you familiar with another implementation with a less strict license?

@devopam

devopam commented Jan 19, 2024

Copy link
Copy Markdown
Contributor Author

Hi @omri374 ,
Nice catch on stdnum , I checked their licensing and it's actually a bit conflicting (scripts vs LGPL on pip) but nonetheless it is out of my purview. verhoeff is a standard algo, i will add it as a function in main class itself and re-submit.

@omri374

omri374 commented Jan 19, 2024

Copy link
Copy Markdown
Collaborator

I think that's a good way forward. Perhaps create a checksum or validation file with the verhoeff algorithm? We may add more to it in the future.

added PresidioAnalyzerUtils class with generic functions. removed usage of stdnum
@devopam

devopam commented Jan 23, 2024

Copy link
Copy Markdown
Contributor Author

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 .

@omri374 omri374 left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread presidio-analyzer/presidio_analyzer/analyzer_utils.py
omri374 and others added 2 commits January 28, 2024 11:34
added test cases for analyzer_utils.py in prescribed format
@omri374

omri374 commented Jan 29, 2024

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

omri374
omri374 previously approved these changes Jan 29, 2024
added to the count of predefined recognizers
@devopam

devopam commented Jan 29, 2024

Copy link
Copy Markdown
Contributor Author

hi @omri374 . I updated the failing test case with increased count of predefined recognizers. kindly run once again. regret the rework.

@omri374

omri374 commented Jan 29, 2024

Copy link
Copy Markdown
Collaborator

/azp run

@omri374

omri374 commented Jan 29, 2024

Copy link
Copy Markdown
Collaborator

no worries :)

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@omri374

omri374 commented Jan 30, 2024

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@omri374 omri374 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@omri374 omri374 merged commit 4008f36 into microsoft:main Jan 30, 2024
prokopidis pushed a commit to prokopidis/presidio that referenced this pull request Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants