This release is a pre-release and may not be stable for production use.
🧩 Silabificador
A Portuguese syllabifier built from Portuguese phonotactics. Rule-based, dependency-free, no model to load.
📦 Features
- Syllabification for Portuguese, derived from the licit onset inventory and the diphthong/hiatus rules rather than from a table of special cases.
- Syllable structure, not just strings: onset, glide, nucleus, coda.
- The output always reconstructs the input — hyphens, spaces and apostrophes are kept, never dropped.
- No dependencies.
🚀 Installation
pip install git+https://github.com/TigreGotico/silabificador
🧠 Usage
from silabificador import syllabify
syllabify("computador") # ['com', 'pu', 'ta', 'dor']
syllabify("guarda-chuva") # ['guar', 'da-', 'chu', 'va']
Need the constituents rather than the strings?
from silabificador import analyze
for s in analyze("transportar"):
print(s.onset, s.nucleus, s.coda)
# tr a ns
# p o r
# t a r
See docs/api.md for the full surface and
docs/advanced.md for the rules and the known limits.
📊 Accuracy
Measured against the Portuguese Unified Pronunciation Lexicon, which carries syllabifications from two independent authorities — Infopédia (Porto Editora) and the Portal da Língua Portuguesa.
The gold is the set of words the two sources independently agree on (35,181), after discarding any entry whose syllables do not reconstruct its headword. It is split by content hash, and the rules were only ever tuned on the dev half:
| set | exact match | |
|---|---|---|
| agreement — held-out test | 99.83% | 7,082 / 7,094 |
| agreement — all | 99.87% | 35,137 / 35,181 |
| Infopédia — all | 99.34% | 99,619 / 100,279 |
| Portal — all | 99.81% | 51,763 / 51,861 |
Every one of the 116,959 scoreable words reconstructs exactly.
Where the two authorities disagree (135 words — on prefix boundaries, and on etymological hiatus) neither answer is scored against, because there is no fact of the matter to be right about.
Reproduce it, and see every remaining failure bucketed by cause:
pip install -e ".[benchmark]"
python -m benchmark.report
📄 License
MIT License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file silabificador-2.0.0a1.tar.gz.
File metadata
- Download URL: silabificador-2.0.0a1.tar.gz
- Upload date:
- Size: 23.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82f19ab9912f15bbd33dec9b0b56ad3f1e0733211fa35743f8218390b305e165
|
|
| MD5 |
7b620207effb020e834ab2f3015fda82
|
|
| BLAKE2b-256 |
a593695e248b49260dafa91f025ecdef0fe81487c78678de053dfc554ba49d64
|
File details
Details for the file silabificador-2.0.0a1-py3-none-any.whl.
File metadata
- Download URL: silabificador-2.0.0a1-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46c9f9220a9ed260abc3a48fd92156f8edd21252692a46a28d64f9d06c6c0674
|
|
| MD5 |
f2b1e9a62b55b8dd97f0e71a17777422
|
|
| BLAKE2b-256 |
35fdcf653403583558a06de90d7aff49b04726ae36e87ca577e6fac3701a190b
|