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.0.tar.gz (3.0 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.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hyrule_shield-0.1.0.tar.gz
  • Upload date:
  • Size: 3.0 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.0.tar.gz
Algorithm Hash digest
SHA256 7e41ed9b38f10589f94c252ae97dd89aecb6627f4f7840898a21c6f2fdf6cdf6
MD5 535d204c6ef8cf7cb0c8ff6b81d8fc83
BLAKE2b-256 b36a67fb1da16c700a670926346e7249645d940d688ee23da8363e3b905cf05f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hyrule_shield-0.1.0-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

Hashes for hyrule_shield-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 099b5c2a94df3431392ef2d288415f86d7f868bccda011231a247e016aadc8ae
MD5 c4aab6d7dd3cdee31a208e4a3232584b
BLAKE2b-256 851e15eaa58fd89609652f170d48cf9ac56f9c2cc365004ebb1d22ec844adce0

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