Open TheChilliPL opened 6 months ago
Typically, in TeX hyphenation patterns the digits handle the priority among the patterns (see the blog post on hypher). I don't think that this automatically implies a rating of the opportunities, so I'm not sure whether this would really make sense.
Oh, I might have actually misunderstood how the patterns work, the blog post cleared things up. However, in Affinity Publisher there is this minimum hyphenation value setting which makes words more or less likely to be hyphenated, and it uses Hunspell-like dictionaries as well 🤔
It would be amazing if this could support dictionaries with variable penalties for hyphenation, like in Hunspell-like dictionaries.
For example,
hyph_pl_PL.dic
might include entries like:where
.
I believe mean word boundaries (as there might be more generic rulesand digits mean the penalties, thus
niechżewith the minimum value of 8 might be hyphenated as
nie-ch-żeand 9 as
niech-że` only.One could also implement a weighted approach, with the library trying to find the lowest penalty hyphenation along with the best alignment of the text.