fave-syllabify
Syllabify a force-aligned TextGrid
Installation
pip install fave-syllabify
Usage
Import classes and functions
from aligned_textgrid import AlignedTextGrid, custom_classes
from fave_syllabify import syllabify_tg
from pathlib import Path
Read in a textgrid
tg = AlignedTextGrid(
textgrid_path=Path(
"docs",
"data",
"josef-fruehwald_speaker.TextGrid"
),
entry_classes=custom_classes(
["Word", "Phone"]
)
)
print(tg)
AlignedTextGrid with 1 groups named ['group_0'] each with [2] tiers. [['Word', 'Phone']]
Syllabify the textgrid
syllabify_tg(tg)
print(tg)
AlignedTextGrid with 1 groups named ['group_0'] each with [4] tiers. [['Word', 'Syllable', 'SylPart', 'Phone']]
Exploring the syllabification
word_tier = tg.group_0.Word
raindrops = word_tier[5]
print(raindrops.label)
raindrops
Each syllable is labelled with its stress.
print([
syl.label
for syl in raindrops.contains
])
['syl-1', 'syl-2']
Each syllable contains its constituent parts in a flat hierarchy (there’s no rhyme constituent).
syl = raindrops.first.fol
print([
part.label
for part in syl.contains
])
['onset', 'nucleus', 'coda']
Each constituent contains its relevant phone.
onset = syl.onset
print([
phone.label
for phone in onset
])
['D', 'R']
Metadata
Release files for fave-syllabify 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fave_syllabify-0.1.3.tar.gz | 16.0 kB | Without provenance | Details for fave_syllabify-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fave_syllabify-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for fave_syllabify-0.1.3-py3-none-any.whl |
Total release size: 32.0 kB
Release files / fave_syllabify-0.1.3.tar.gz
| Download URL | fave_syllabify-0.1.3.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a565db9c6faeee9b7943c4c2cca6b014b64a9b0df0ddfa1bb7a8cd3ef0952177
|
|
BLAKE2b-256 checksum How to use checksums |
e01306e19f74ed0f73f3ce52d6ff421cef31f0bce792e2042ac92076bc1b2c65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.10.7 Darwin/23.2.0
|
Release files / fave_syllabify-0.1.3-py3-none-any.whl
| Download URL | fave_syllabify-0.1.3-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
331d97b6c8e3f3baac318aa4d22797593f65717e4474a426c174c2c66e6b112f
|
|
BLAKE2b-256 checksum How to use checksums |
cac292c895654306fc6515f5e4748cc441c493bff99a2c847d90ff47faa30bce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.10.7 Darwin/23.2.0
|
Security for fave-syllabify 0.1.3
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.