Not working ok in spanish
I'm trying very simple words in spanish and I get lots of errors. For example:
ma-r-tes (should be mar-tes) re-s-tar (should be res-tar) di-cie-m-bre (should be di-ciem-bre)
Is this a problem with phpSyllable or with the spanish patterns? I'm trying these same words here https://www.ushuaia.pl/hyphen/?ln=en (this resource is linked from https://hyphenation.org/) and they are hyphenated correctly.
The ushuaia.pl implementation appears to prevent single-letter syllables. This is not part of the core algorithm.
It appears to incorrectly parse the Dutch (my native language) "diadeem" as "dia-deem" instead of the correct "di-a-deem".
Can you try Spanish words which should have single-letter syllables (if such even exist in that language). Perhaps an option could be added to prevent single-letter syllables.
Yes, there are single letter syllables in spanish, but they can never be single consonants, only vocals. I tested and you are correct, ushuaia.pl parses them incorrectly, but phpSyllable also does it! So phpSyllable seems to prevent single vocal syllables, but not single consonant syllables. I tested with these words:
"día" = incorrect "día" (correct "dí-a") "abierto" = incorrect "abier-to" (correct "a-bier-to") "caótico" = incorrect "caó-ti-co" (correct "ca-ó-ti-co")
This website does it ok every time https://www.separarensilabas.com (you need to check the first option "Contar sílabas")