Uma biblioteca para anonimização de informações sensíveis em textos.
Project description
Hyrule Shield
Hyrule Shield is a Python library for anonymizing sensitive information in texts. The library uses Natural Language Processing (NLP) techniques to identify and anonymize data such as personal names, CPF, CNPJ, addresses, phone numbers, and more.
Features
- Anonymization of personal information such as CPF, RG, CNPJ, phone numbers, and addresses.
- Uses pre-trained SpaCy models for entity recognition in Portuguese.
- Easy integration with other projects.
Installation
You can install the library directly from PyPI (when available):
pip install hyrule_shield
Or install it locally after cloning this repository:
pip install -e .
Usage
Here is a simple example of how to use the library to anonymize a message:
from hyrule_shield.anonymizer import anonymize_message_spacy
message = "My name is Carlos Eduardo, my CPF is 111.222.333-44."
anonymized_message = anonymize_message_spacy(message)
print(anonymized_message)
Output:
My name is <PER>, my CPF is <CPF>.
Dependencies
- Python 3.7, 3.8, 3.9, 3.10, 3.11
- spacy>=3.0.0
- transformers>=4.0.0
Development
If you want to contribute to the development of this library, follow the steps below:
-
Clone the repository:
git clone https://github.com/jadercampos/hyrule_shield.git
-
Install the dependencies:
pip install -r requirements.txt
-
Run the tests:
python -m unittest discover tests
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions
Contributions are welcome! Feel free to open issues or submit pull requests.
Author
- Jader Campos - jadercampos@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hyrule_shield-0.1.1.tar.gz.
File metadata
- Download URL: hyrule_shield-0.1.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
444d4371700963d3e996fe2f8a0bd3f49e2b9eadad8ba3dbf409b46fcd73182f
|
|
| MD5 |
41ddec0ca7890bef6f143a04949958ba
|
|
| BLAKE2b-256 |
7682a41739af4bc64f398c7f9ea4997fc466b64b1a50b08c67eed48a2243bcf3
|
File details
Details for the file hyrule_shield-0.1.1-py3-none-any.whl.
File metadata
- Download URL: hyrule_shield-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf6c66b0335b6a7c789d7fc3fd392938b28259b386132ad6fcdcefb38daab89a
|
|
| MD5 |
9fc87899596b34cccddd1de31aa8500b
|
|
| BLAKE2b-256 |
e935152c14d92b759fd1aed6faa318932b3fdfac11d4791643a6d0729a2954ae
|