tarja-presidio
EN · Brazilian identifiers for Presidio, powered by tarja. One PatternRecognizer per tarja entity (CPF, alphanumeric CNPJ, CNS, CNJ, CNM, CIB...), with check-digit validation and Portuguese context words.
PT · Identificadores brasileiros p/ o Presidio, via tarja. 1 PatternRecognizer por entidade do tarja, c/ validação de DV e palavras de contexto em pt-BR.
EN: install / PT: instalar:
pip install tarja-presidio
EN: from a clone, for development / PT: a partir de um clone, p/ desenvolver:
pip install -e . -e "packages/tarja-presidio[dev]"
from presidio_analyzer import AnalyzerEngine, RecognizerRegistry
import tarja_presidio
registry = RecognizerRegistry(supported_languages=["pt"])
registry.load_predefined_recognizers(languages=["pt"]) # EN: optional / PT: opcional
tarja_presidio.register(registry) # EN: all tarja entities / PT: todas as entidades do tarja
engine = AnalyzerEngine(registry=registry, supported_languages=["pt"]) # EN: needs a pt NLP config / PT: precisa de config NLP pt
engine.analyze("Paciente CPF 529.982.247-25, cartao SUS 898 0000 0004 3208", language="pt")
EN: scores, from 0.1.1 on. A verified check digit reaches Presidio at 1.0, which is the 8 tier-N1
entities that need no context word. A wrong check digit is dropped. Everything else keeps a base score and
relies on Presidio's context enhancer, so filter with score_threshold: the entities that need context in
tarja (CEP, CNH, RENAVAM, PIX key, CIB, IPTU, matricula) start at 0.1, and the two that are format-only
without context (plate, phone) start at 0.5. Until 0.1.0 those two arrived at 1.0, which told Presidio a
format match had been verified. Full walkthrough: https://macmaia.github.io/tarja/presidio.html
PT: scores, da 0.1.1 em diante. DV conferido chega com 1.0, q são as 8 entidades N1 sem contexto. DV errado é
descartado. O resto mantém score base e depende do enhancer de contexto, então filtre c/ score_threshold.
Até a 0.1.0 placa e telefone chegavam com 1.0, dizendo ao Presidio q formato tinha sido verificado.
Metadata
Release files for tarja-presidio 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tarja_presidio-0.1.1.tar.gz | 8.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tarja_presidio-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.5 kB
Release files / tarja_presidio-0.1.1.tar.gz
| Download URL | tarja_presidio-0.1.1.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22cfd75b2af97f3aff34ff8b98c190224bb5d896e252192fa5afff8efeb7d118
|
|
BLAKE2b-256 checksum How to use checksums |
be3380817cdd70a4e1c6b94292b843f7971588f7ca4dd05d5b53f533b8c13ffa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logRelease files / tarja_presidio-0.1.1-py3-none-any.whl
| Download URL | tarja_presidio-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66d1efaf9a7d9478c497b48f8753c8dc754e714928510b82683ceaad3723f9a7
|
|
BLAKE2b-256 checksum How to use checksums |
e3fdbdc74837402a472729779adacf5b702b16f2174a889560b31a788eb89553
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency log