Skip to main content

License: LGPL Version: 1.0.2-15 Python versions: 3.5, 3.6, 3.7, 3.8, 3.9

Silabeador

A Python library for syllabic division and stress detection for Spanish

silabeador is a Python library of methods and functions for syllabic division and prosodic stress detecting for Spanish. This library is part of the research project Sound and Meaning in Spanish Golden Age Literature. Automatic verse scansion required a syllable separator tolerant to non-Spanish consonant clusters and unusual and non-Spanish diacritics. Other libraries available take for granted that the words are well-constructed according to the Spanish grammar. This is not always the case in particular text types, as in ü as regularly used or as a metric diacritic (e.g., Si-güen-za vs crü-el).

Installation

pip3 install silabeador

Use

The library provides functions and methods that can be called idependently:

>>> import silabeador

The syllabic division function accepts a string as a single argument and returns a list of syllables.

>>> silabeador.silabea('Uvulopalatofaringoplastia')
['U', 'vu', 'lo', 'pa', 'la', 'to', 'fa', 'rin', 'go', 'plas', 'tia']

The function to recover the stressed syllable's index takes a string as s single argument and returns the stressed syllable's index.

>>> silabeador.tonica('Uvulopalatofaringoplastia')
-2

An alternative version accepts a list of syllables and returns the stressed syllable's index.

>>> silabeador.tonica_s(['U', 'vu', 'lo', 'pa', 'la', 'to', 'fa', 'rin', 'go', 'plas', 'tia'])
-2

An object with those values can also be created:

>>> objeto_silabas = silabeador.silabas('Uvulopalatofaringoplastia')
>>> objeto_silabas.palabra
'Uvulopalatofaringoplastia'
>>> objeto_silabas.silabas
['U', 'vu', 'lo', 'pa', 'la', 'to', 'fa', 'rin', 'go', 'plas', 'tia']
>>> objeto_silabas.tonica
-2

Description

Sillabification

The syllabic division follows the principles described by Quilis (1984/2013, p. 47-49).

Firstly, syllabic nuclei are detected looking for the vowels. Unstressed close vowels join the adjacent vowels in coda or onset to form a diphthong or a triphthong, whilst stressed ones are considered standalone syllabic nuclei. Contiguous consonants are grouped to be parsed apart.

Secondly, consonant clusters are divided considering whether their components are separable and joined to the neighbour nuclei in coda or onset accordingly.

Prosodic stress

Prosodic stress detection follows the Spanish rules described by the Real Academia ("tilde"). Proparoxytone words are always orthographically signalled with an acute accent on the nucleic vowel of the antepenultimate syllable. Paroxytones are not marked unless the word ends with n, s or vowel, in which case they have an acute accent on the nucleic vowel of the penultimate syllable. Oxytone words are only marked if they end in n, s or vowel with an acute accent on the nucleic vowel of the last syllable.

Known problems

Adverbs in -mente have primary and secondary stress. Therefore, they must be divided, and each of their parts parsed independently.

Contributions

Feel free to contribute using the GitHub Issue Tracker for feedback, suggestions, or bug reports.

Licence

This project is under GNU LGPL 2.1. See LICENCE for details.

References

Quilis, Antonio, Métrica española. 1984. Barcelona, Ariel, 1996. "tilde". Diccionario panhispánico de dudas, 2005. https://www.rae.es/dpd/tilde

Metadata

Release files for silabeador 1.0.2.post16

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

Source distribution (sdist)

Source distribution for silabeador 1.0.2.post16
File Size Uploaded Provenance Actions
silabeador-1.0.2.post16.tar.gz 4.8 kB Without provenance Details for silabeador-1.0.2.post16.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for silabeador 1.0.2.post16
File Interpreter ABI Platform Actions
silabeador-1.0.2.post16-py3-none-any.whl Python 3 none any Details for silabeador-1.0.2.post16-py3-none-any.whl

Total release size: 19.2 kB

Release files / silabeador-1.0.2.post16.tar.gz

Download URL silabeador-1.0.2.post16.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
aedb07f216013db17f61db30d3098ec0e705339dce7ed3d83a17cea6b88e6a68
BLAKE2b-256 checksum
How to use checksums
0545957d8e3f299e24a315b9daf132499f81af81f199c90345b1c46c087fa4d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.2

Release files / silabeador-1.0.2.post16-py3-none-any.whl

Download URL silabeador-1.0.2.post16-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5179b7ff84470158ce773d81547d53d2b6a9855a8477f992c492dd0d8ea530c3
BLAKE2b-256 checksum
How to use checksums
ccc2cfa3bf7bf4f96ca4b2372b9818e0a26afcef4a308b0db57196602befec9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.2

Security for silabeador 1.0.2.post16

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

1.0.2.post16 This release

2 release files No provenance

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