Comments (2)
Hi. Thanks for reporting these.
From what I can see and test using other hyphenation implementations, the problem with these words seem to mostly stem with the Text files themselves; I can't find any other hyphenator (excluding dictionary lookups) that handle these cases any better.
As for the words ending with a syllable of only a single letter, these are expressly forbidden by the min.json file (which is itself compiled from lots of "official" Tex files). The second 2
in "es": [2, 2],
explicitely states that the last syllable must be atleast two characters long. Similar for words starting with a single-letter syllable.
Possibly this is due to ambiguous hyphenation rules in the language itself; most language have some ambiguities, I'm assuming Spanish is no exception. The goal of the Tex files is to err on the safe side; preferably too few hyphens, but atleast at correct places, than too many as possibly incorrect places. Perhaps it's simply a matter of the Spanish Tex files being incomplete or outdated.
Since both issues seem to originate from the Tex files, your best bet is to contact either the authors of the Tex files (contact information in the file languages/hyph-ex.tex
) or the Tex-hyphen mailing list (http://tug.org/mailman/listinfo/tex-hyphen). I could do this myself, but since I have no clue about the Spanish language, I'm in no position to argue any issues that might arise.
from phpsyllable.
In Spanish only can be a different syllable in the end of word if is a vowel and the previous letter too (sabía -> sa-bí-a) and in beginning of word, only vowels followed by a consonant and vowel (erizo -> e-ri-zo). With [1, 1] in min.js works fine for most of initial syllables, but final vowels aren't separated.
I was tried to fix it updating Spanish Tex file from here https://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/tex/, but the 4.7 version only fix all my rare examples.
If you want I could update these changes in a new commit.
And I will send my doubts to this mailing list, thanks :)
from phpsyllable.
Related Issues (20)
- Not working with : abeyant , abraxas , abraxas , pipeline etc HOT 4
- Error when trying to use the functions HOT 2
- Split sentence into array of arrays of syllables of each word HOT 19
- hyphenateHtml messes up certain symbols HOT 1
- Showing the stress on syllables HOT 3
- no autoloader for PHP 7+ HOT 1
- Min word count after hyphenation
- Array and string offset access syntax with curly braces is deprecated HOT 2
- Results differ from syllable.toyls.com HOT 1
- Word does not syllablise correctly HOT 1
- Update language files HOT 4
- Replace / remove outdated German language file hyph-de.tex HOT 5
- Replace test execution by Travis CI with GitHub Action HOT 2
- Allow auto merge for this repository HOT 1
- Request for feedback; deprecated splitWord HOT 3
- Post-processing of first run of language update and tests workflow
- Need absolute path to cache language files HOT 24
- Cache version in JSON cache file can be infinite decimal HOT 1
- lowercase vs uppercase hyphenation word list HOT 2
- Cleanup HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpsyllable.