syllabize-es

Turns Spanish words into syllables, and much more.

Example

```rust use syllabize_es::{syllable::Syllable, Word, StressType, DiphthongType};

// Convert a word into syllabized struct let word: Word = "construir".into();

// Number of syllables assert_eq!(word.syllables.len(), 2);

// First syllable, in string form asserteq!(word.syllables[0].tostring(), "cons");

// Second syllable, in struct form asserteq!( word.syllables[1], Syllable { onset: "tr".tostring(), nucleus: "ui".tostring(), coda: "r".tostring() } );

// Get syllabified string, using "-" as delimiter assert_eq!(word.syllabify("-"), "cons-truir");

// Index of the stressed syllable of word.syllables asserteq!(word.stressindex, 1);

// Named type of the stress assert_eq!(word.stress(), StressType::Oxytone);

// All existing vowel combinations let vowelcombos = word.vowelcombos();

// The word doesn't contain hiatuses or triphthongs asserteq!(vowelcombos.hiatuses.len(), 0); asserteq!(vowelcombos.triphthongs.len(), 0);

// But it contains a diphthong asserteq!(vowelcombos.diphthongs.len(), 1);

let dp = &vowelcombos.diphthongs[0]; // All its attributes asserteq!(dp.syllableindex, 1); asserteq!(dp.kind, DiphthongType::Homogenous); assert_eq!(dp.composite, "ui");

// The rhyming part of the word assert_eq!(word.rhyme(), "ir"); ```