Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

desacordo_ortografico

desacordo_ortografico converts Portuguese text between spelling norms: the pre-1911 etymological writing, the Reforma de 1911, the Brazilian norms of 1943 and 1971, the European norms of 1945 and 1973, and the Acordo Ortográfico de 1990 (AO1990) in its European and Brazilian forms. It also detects which norm a text follows, and it flags Mirandese, Galician and Barranquenho text instead of converting it.

Try it in your browser: TigreGotico/desacordo_ortografico on Hugging Face.

Install

pip install desacordo_ortografico

Quick start

>>> from desacordo_ortografico import detect, convert
>>> detect("a pharmacia do theatro").id
'etymological'
>>> detect("o facto é óptimo").id
'pt_1973'
>>> convert("pharmacia", "etymological", "ao1990-br")
'farmácia'
>>> convert("a acção directa", "pre-ao1990-pt", "ao1990-pt")
'a ação direta'

The command line does the same:

desacordo convert --from pre-ao1990-pt --to ao1990-pt "a acção directa"

The pt-BR and pt-PT word swap is a separate function, convert_vocabulary:

>>> from desacordo_ortografico import convert_vocabulary
>>> convert_vocabulary("Pego o ônibus e tomo café da manhã.", "pt-BR", "pt-PT")
'Pego o autocarro e tomo pequeno-almoço.'

Documentation

The documentation starts at docs/index.md.

Page You get
docs/quickstart.md Install, detection, conversion, the command line and the full result object, with real output
docs/api.md Every public name, its signature and its default
docs/features.md The 28 conversion features and what each one changes
docs/orthographies.md The eight norms, their graph and the official source of each rule
docs/data.md The JSON data files and the Hugging Face datasets
docs/vocabulary.md convert_vocabulary: the pt-BR and pt-PT word and phrase swap and the words it never changes
docs/grammar.md convert_grammar: the pt-BR to pt-PT swap of auxiliary haver for ter before a participle
docs/sources.md The saved official texts and the quote behind each conversion rule
docs/portal_benchmark.md The scores of convert() on the ILTEC Portal word lists

License

Apache-2.0.

Metadata

Release files for desacordo-ortografico 0.9.2a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for desacordo-ortografico 0.9.2a1
File Size Uploaded Provenance Actions
desacordo_ortografico-0.9.2a1.tar.gz 1.3 MB Without provenance Details for desacordo_ortografico-0.9.2a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for desacordo-ortografico 0.9.2a1
File Interpreter ABI Platform Actions
desacordo_ortografico-0.9.2a1-py3-none-any.whl Python 3 none any Details for desacordo_ortografico-0.9.2a1-py3-none-any.whl

Total release size: 2.4 MB

Release files / desacordo_ortografico-0.9.2a1.tar.gz

Download URL desacordo_ortografico-0.9.2a1.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
2a0ede13063c96c1c17f69cdd3a7b72544ab1b3361f940d200e2a2888fde209f
BLAKE2b-256 checksum
How to use checksums
03036c5ad8223f02a50d9816a70f3e54a64b96f0a6774fd40bac32b2ab9ee843
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / desacordo_ortografico-0.9.2a1-py3-none-any.whl

Download URL desacordo_ortografico-0.9.2a1-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
19fc5d834e4954dc0ff882e6905a77a287e81d48a6ca377f37803a42f41cc401
BLAKE2b-256 checksum
How to use checksums
a10fb164fd46e20e18a535eb01efa76f80de8fa01f28fca696568f9b669f34ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for desacordo-ortografico 0.9.2a1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page