Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jdevera/pylabeador
A Python library and CLI tool to do automatic syllabification of Spanish words
https://github.com/jdevera/pylabeador
hyphenation library natural-language-processing python spanish syllabification syllable
Last synced: 24 days ago
JSON representation
A Python library and CLI tool to do automatic syllabification of Spanish words
- Host: GitHub
- URL: https://github.com/jdevera/pylabeador
- Owner: jdevera
- License: gpl-3.0
- Created: 2020-04-07T22:35:49.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-02T20:41:35.000Z (over 4 years ago)
- Last Synced: 2024-08-04T06:02:34.543Z (3 months ago)
- Topics: hyphenation, library, natural-language-processing, python, spanish, syllabification, syllable
- Language: Python
- Size: 294 KB
- Stars: 14
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.markdown
- Changelog: CHANGELOG.markdown
- License: COPYING
Awesome Lists containing this project
README
[![](https://img.shields.io/github/workflow/status/jdevera/pylabeador/Python%20package)](https://github.com/jdevera/pylabeador/actions?query=workflow%3A%22Python+package%22+branch%3Amaster)
[![codecov](https://codecov.io/gh/jdevera/pylabeador/branch/master/graph/badge.svg)](https://codecov.io/gh/jdevera/pylabeador)
![](https://img.shields.io/pypi/pyversions/pylabeador)
[![](https://img.shields.io/pypi/v/pylabeador)](https://pypi.org/project/pylabeador/)
![](https://img.shields.io/pypi/l/pylabeador)
![](https://img.shields.io/pypi/dm/pylabeador)
# Pylabeador: Automatic Syllabification of Spanish Words# Install
```
pip install pylabeador
```# Use
You can use it as a Python library:
```python
>>> import pylabeador
>>> pylabeador.syllabify("silabear")
['si', 'la', 'be', 'ar']
```And you can use it as a command line tool:
```sh
$ pylabeador interesante
in-te-re-san-te
```
# AccuracyAutomatic syllabification without additional lexical or and semantic *knowledge* of the words can only go so far. This syllabifier does not have such knowledge. Because of this, words such as *transatlántico*, whose correct hyphenation is *trans-a-tlán-ti-co* or even *trans-at-lán-ti-co*, end up being divided here into *tran-sa-tlán-ti-co*. To hyphenate this correctly, it is necessary to know that the word without the prefix exists in Spanish with similar semantics to the one of the original word. This is better and further explained in this paper: [Automatic syllabification for Spanish using lemmatization and derivation to solve the prefix’s prominence issue](http://dx.doi.org/10.1016/j.eswa.2013.06.056)
# Inspiration / Original source
This work is inspired by the excellent online tool [Silabeador TIP](https://tulengua.es/syllables/). This tool considers the semantics of the words and correctly separates syllables in the presence of prefixes. They also provide a C++ library that performs the naive syllable separation that *pylabeador* does. In fact, *pyleabeador* started as a Python port of that library.