Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working ok in spanish #78

Open
mariavilaro opened this issue Dec 9, 2024 · 2 comments
Open

Not working ok in spanish #78

mariavilaro opened this issue Dec 9, 2024 · 2 comments

Comments

@mariavilaro
Copy link

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.

@vanderlee
Copy link
Owner

vanderlee commented Dec 10, 2024

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.

@mariavilaro
Copy link
Author

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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants