Skip to main content

Phonetic transcription of Spanish

Project description

License: LGPL Version: 2.0.1 Python versions: 3.5, 3.6, 3.7, 3.8, 3.9

Fonemas

A Python phonologic transcription library for Spanish

fonemas is a Python library of methods and functions for phonologic and phonetic ranscription of Spanish words.

This library is part of the research project Sound and Meaning in Spanish Golden Age Literature. Automatic verse scansion required identifying phonologic features that can be used using this library.

Installation

pip3 install fonemas

Use

The library provides the class transcription(sentence, mono, epenthesis). The class takes the obligatoy argument sentence, which is a string of characters with a Spanish word or words. It optionally takes two Boolean arguments mono and epenthesis set to False as default. The argument mono sets whether the output shows graphic stresses for monosyllabic words and epenthesis set the behaviour S bfore consonant in onset (spiritu -> es pi ri tu|spi ri tu).

transcription() has three dictionary attributes: phonology for the phonological transcription, phonetics for the phonetic transcription in IPA symbols (requires UNICODE support), and sampa for the phonetic transcription SAMPA transliteration. All attributes are dictionaries with two keys {sentence, syllables} containing each a list of strings, which may be words or syllables, respectively.

>>> from fonemas import transcription
>>> object = transcription('Averigüéis')
>>> object.phonology
{'words': ["abeɾig'wejs"], 'syllables': ['a', 'be', 'ɾi', "'gwejs"]}
>>> object.phonetics
{'words': ["aβe'ɾiɣwejs"], 'syllables': ['a', 'βe', "'ɾi", 'ɣwejs']}
>>> object.sampa
{'words': "aBeri'Gwejs", 'syllables': "a Be ri 'Gwejs"}

Description

The transcription is done according to the Spanish phonology and phonotactics described by Quilis (2019).

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, Tratado de fonología y fonética españolas. Madrid, Gredos, 2019.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fonemas-2.0.1.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

fonemas-2.0.1-py3-none-any.whl (15.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page