Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Create your own document de-identifier using docdeid, a simple framework independent of language or domain.
Installation - Getting started - Features - Documentation - Development and contributiong - Authors - License
Create your own document de-identifier using docdeid
, a simple framework independent of language or domain.
Note that
docdeid
is still on version 0.x.x, and breaking changes might occur. If you plan to do extensive work involvingdocdeid
, feel free to get in touch to coordinate.
Grab the latest version from PyPi:
pip install docdeid
from docdeid import DocDeid
from docdeid.tokenize import WordBoundaryTokenizer
from docdeid.process SingleTokenLookupAnnotator, RegexpAnnotator, SimpleRedactor
deidentifier = DocDeid()
deidentifier.tokenizers["default"] = WordBoundaryTokenizer()
deidentifier.processors.add_processor(
"name_lookup",
SingleTokenLookupAnnotator(lookup_values=["John", "Mary"], tag="name"),
)
deidentifier.processors.add_processor(
"name_regexp",
RegexpAnnotator(regexp_pattern=re.compile(r"[A-Z]\w+"), tag="name"),
)
deidentifier.processors.add_processor(
"redactor",
SimpleRedactor()
)
text = "John loves Mary, but Mary loves William."
doc = deidentifier.deidentify(text)
Find the relevant info in the Document
object:
print(doc.annotations)
AnnotationSet({
Annotation(text='John', start_char=0, end_char=4, tag='name', length=4),
Annotation(text='Mary', start_char=11, end_char=15, tag='name', length=4),
Annotation(text='Mary', start_char=21, end_char=25, tag='name', length=4),
Annotation(text='William', start_char=32, end_char=39, tag='name', length=7)
})
print(doc.deidentified_text)
'[NAME-1] loves [NAME-2], but [NAME-2] loves [NAME-3].'
Additionally, docdeid
features:
Annotator
, AnnotationProcessor
, Redactor
and Tokenizer
componentsDocDeid.deidenitfy()
)For a more in-depth tutorial, see: docs/tutorial
For full documentation and API, see: https://docdeid.readthedocs.io/en/latest/
For setting up dev environment, see: docs/environment
For contributing, see: docs/contributing
Vincent Menger - Author, maintainer
This project is licensed under the MIT license - see the LICENSE.md file for details.
FAQs
Create your own document de-identifier using docdeid, a simple framework independent of language or domain.
We found that docdeid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.