Skip to main content
Pre-release

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

o2i-lexicons

o2i-lexicons ships pronunciation data for orthography2ipa (o2i). Each lexicon holds words that the o2i rules transcribe wrong, with the source of each reading. The package changes no output when you install it. You give a lexicon to an engine in code.

Install

uv pip install --prerelease=allow o2i-lexicons

The project publishes alpha releases, so the install needs --prerelease=allow.

Usage

from orthography2ipa import G2P, Pipeline, packaged_lexicon

g2p = G2P("pt-BR", pipeline=Pipeline(lexicon=packaged_lexicon("pt-BR")))
print(g2p.transcribe("afeto"))    # aˈfɛtu, where the rules alone give aˈfetu

g2p = G2P("pt-BR", pipeline=Pipeline(lexicon=packaged_lexicon("pt-BR", patches=True)))
print(g2p.transcribe("colocam"))  # koˈlɔkɐ̃w̃

Exceptions and patches

An exception is a word that no spelling rule can reach, and it carries a citation. packaged_lexicon(code) always returns the exceptions. A patch is a word that a rule could reach but that the rules do not read right yet. Each patch records its gap, and a patch leaves the package when its rule lands. You get the patches only with patches=True. docs/kinds.md states the full contract.

Languages

Code Source Page
en-GB WikiPron, from Wiktionary, checked against Britfone 3.0.1 docs/languages/en-GB.md
pt-BR the NILC Aeiouadô training file docs/languages/pt-BR.md
pt-PT the Infopédia rows of portuguese-unified-pronunciation-lexicon docs/languages/pt-PT.md

Documentation

docs/index.md is the entry point. It links the file format, the build scripts and the rules for contributors.

License

The code is Apache-2.0. Each data file keeps the license of its source, which its .meta.json sidecar names. The three data sets are CC BY-SA 4.0, and the pt-BR files also keep the BSD notice of the NILC data in LICENSE.nilc.

Metadata

Release files for o2i-lexicons 0.7.14a1

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

Source distribution (sdist)

Source distribution for o2i-lexicons 0.7.14a1
File Size Uploaded Provenance Actions
o2i_lexicons-0.7.14a1.tar.gz 265.1 kB Without provenance Details for o2i_lexicons-0.7.14a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for o2i-lexicons 0.7.14a1
File Interpreter ABI Platform Actions
o2i_lexicons-0.7.14a1-py3-none-any.whl Python 3 none any Details for o2i_lexicons-0.7.14a1-py3-none-any.whl

Total release size: 438.0 kB

Release files / o2i_lexicons-0.7.14a1.tar.gz

Download URL o2i_lexicons-0.7.14a1.tar.gz
Size 265.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c2aa690e792e8fbc80356710e7cee8467f49fbbdbd4517eb08af5cd68edfef7c
BLAKE2b-256 checksum
How to use checksums
c0cb592ce0af110f075a7c3d5b6ea8a945cd069dfb92292ff08526c5ec44c975
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / o2i_lexicons-0.7.14a1-py3-none-any.whl

Download URL o2i_lexicons-0.7.14a1-py3-none-any.whl
Size 173.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
861d64063be8366f7f8330501d3c80f76aca1a29771e015624c463d17eae99a8
BLAKE2b-256 checksum
How to use checksums
ccc564d69a6ad43a71e1e3f7ecd9f8c5f2a9484cf51587265e3a6a382db0d594
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for o2i-lexicons 0.7.14a1

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