Skip to main content

find syllables and rhymes of words/verses in spanish

Project description

codecov

Pyverse

A automatic syllabification algorithm for Spanish verses written in Python

Pyverse comes from Python & Verso. Verso beeing verse in Spanish.

=======

  • It separates every syllable of words and verses. It counts the syllables of verses as it's done in the spanish language poetry tradition.

Description

silabizador syllabifies words and verses taking into account synalephas and the accentuation of the final word in the verse.

  • The prosodic metre of a verse in Spanish poetry differs from the rules of syllabification specified by the RAE for the counting of syllables. Depending on the accentuation of the last word of the verse we encounter different cases:

    1. If the last word is oxytone, the prosodic perception will impose the addition of an extra syllable to the syllable count of the verse.
    2. If it's paroxytone we leave as it is: we neither add nor substract a syllable to the counting.
    3. If it's proparoxytone we substract one syllable.
    4. If it's superproparoxytone we substract two.

Instalation

pip install pyverse

Use

You can either use Pyverse in the command line:

pyverso "un velero bergantín;"

        Syllabified Text | -un -ve-le-ro -ber-ga-tín;
        Count            | 8
        Consonant Rhyme  | atin
        Assonant Rhyme   | ai

or as a python package

>>> from pyverse import Pyverse
>>> verse = Pyverse("un velero bergantín;")
>>> print(verse.get_syllables())
'-un -ve-le-ro -ber-gan-tín;'
>>> print(verse.count)
8

Pyverse en Español

Un algoritmo silabeador de versos en español escrito en Python.

[silabear](https://dle.rae.es/silabear)
1. Ir pronunciando separadamente cada sílaba.

Descripcion

Pyverse silabea palabras y versos en Español. Cuenta las sílabas a la manera de la tradición poética en lengua española. Es decir: tiene en cuenta sinalefas y finales de verso.

  • Según la acentuación fonética de la última palabra del verso se dan varios casos:

    1. Si la última palabra tiene una acetuación aguda u oxítona, la perceptión prosódica del verso impone que se le sume una sílaba al número de sílabas ortográficas del verso.
    2. Si es llana o paroxítona se deja como está: ni se le resta ni se le suman sílabas al verso.
    3. Si la última palabra del verso es esdrújula o proparoxítona se le resta una sílaba al verso.
    4. Si es superproparoxítona o sobresdrújula se le restan dos sílabas al verso.
  • Sinalefas

    • La sinalefa es un fenómeno prosódico mediante el cual se juntan en una sola sílaba fonética la última sílaba de una palabra y la primera de la siguiente en caso de ser las dos vocales.

      -el -ar-ma_an-ti-gua
      -el -vien-to_a-zul
      
    • No se produce sinalefa si la segunda palabra empieza con vocal acentuada:

      -el -ar-la -á-ri-da
      -el -vien-to -ár-ti-co
      
  • Rimas

Instalación

pip install Pyverse

Uso

puedes usar Pyverse desde el terminal:

$ pyverse "un velero bergantín;"

        Syllabified Text | -un -ve-le-ro -ber-ga-tín;
        Count            | 8
        Consonant Rhyme  | atin
        Assonant Rhyme   | ai

o como una librería de Python

from pyverse import Pyverse
verse = Pyverse("un velero bergantín;")
print(verse.get_syllables())
>>> '-un -ve-le-ro -ber-gan-tín;'
print(verse.count)
>>> 8

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

pyverse-1.1.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

pyverse-1.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file pyverse-1.1.0.tar.gz.

File metadata

  • Download URL: pyverse-1.1.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/67.8.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.12

File hashes

Hashes for pyverse-1.1.0.tar.gz
Algorithm Hash digest
SHA256 038fe6b785051ab6bb9ddc5bac040087d6dd3b91e3e02fada22403980afc2895
MD5 e4bac5db7709a545f711f8b022e297d6
BLAKE2b-256 eee1445e518528b001143a52d5b15598e93e77129859e743cf62ddd9d39fe9a7

See more details on using hashes here.

File details

Details for the file pyverse-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyverse-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/67.8.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.12

File hashes

Hashes for pyverse-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 204820c9a7cd438a960bb003c245e4e421c5643f81ee07e008d6353f6fec3ef8
MD5 432ae56980e20d224e7e1361ba387c91
BLAKE2b-256 2e17ae2855ec8fe47d530b5d17b7b5c0ade6c3d3aa50177da347e9bce95af95c

See more details on using hashes here.

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