Skip to main content

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:

  1. Clone the repository:

    git clone https://github.com/jadercampos/hyrule_shield.git
    
  2. Install the dependencies:

    pip install -r requirements.txt
    
  3. 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyrule_shield-0.1.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyrule_shield-0.1.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file hyrule_shield-0.1.2.tar.gz.

File metadata

  • Download URL: hyrule_shield-0.1.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for hyrule_shield-0.1.2.tar.gz
Algorithm Hash digest
SHA256 14430443229e9264b9448257ec39be174a80c6807c91d9ece8cc41a392c5ab63
MD5 0da814c89d81300aaeeee5ac89e5eba1
BLAKE2b-256 9e4f103aa23a3decbf6a6cae6764e35b87a1276cdac19a6078088c99d33a300c

See more details on using hashes here.

File details

Details for the file hyrule_shield-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: hyrule_shield-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for hyrule_shield-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2c775fac46df7fc8e7261ea0c4cc15c0501df1be2810a50b2f4014c9ebc7e02d
MD5 8ff794482a381bac64ea6a341cc995da
BLAKE2b-256 c1e7f7c33217aad4c571694c7ed07392257e50d565fa4ecb9a3642436dee3747

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page