View Single Post
Old 08-01-2025, 09:28 AM   #523
Moonbase59
Addict
Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.Moonbase59 ought to be getting tired of karma fortunes by now.
 
Moonbase59's Avatar
 
Posts: 234
Karma: 1000244
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8", Pocketbook Era (16GB)
So I did a quick check. "Hyphenate This!" uses the Python hyphenator which is from Dec 2019.

This apparently doesn’t work well with the NOHYPEN replacement stuff I added for OpenOffice and RMSDK a long time ago, while, as @BeckyEbook pointed out, it works fine with that "special part" left off:

Code:
>>> from hyphenator import Hyphenator
>>> h = Hyphenator("/home/matthias/Projekte/wortliste/build-patterns-2-2/dehyph\
n-x/hyph_de_DE.dic")
>>> h.left = 3
>>> h.right = 3
>>> h.inserted('Donaudampfschifffahrtsgesellschaft')
'Donaudampfschifffahrtsgesellschaft'
>>> 
>>> h = Hyphenator("/home/matthias/Projekte/wortliste/build-patterns-2-2/dehyph\
n-x/hyph_de_DE_nohyphen.dic")
>>> h.left = 3 # recommended for German
>>> h.right = 3 # recommended for German
>>> h.inserted('Donaudampfschifffahrtsgesellschaft')
'Donau-dampf-schiff-fahrts-ge-sell-schaft'
>>> h.left = 2 # not recommended for German
>>> h.right = 2 # not recommended for German
>>> h.inserted('Donaudampfschifffahrtsgesellschaft')
'Do-nau-dampf-schiff-fahrts-ge-sell-schaft'
>>>
So, for the time being, I include my current German hyph_de_DE.dic (for all normal uses) as well as hyph_de_DE_nohyphen.dic (for everything that uses the Python hyphenator, like the Calibre "Hyphenate This!" plugin).

Many thanks to @BeckyEbook for finding the issue!

Happy hyphenating!

N.B.: I still don’t recommend adding soft hyphens to files—hyphenation should be done by the reader software (as KOReader shows nicely, or even RMSDK using my hyph_de.dic). But I do know there are some readers where this is almost impossible (or at least not easy), so now we at least have the choice.
Attached Files
File Type: zip hyph_de_DE.dic.zip (160.7 KB, 24 views)
File Type: zip hyph_de_DE_nohyphen.dic.zip (154.5 KB, 33 views)

Last edited by Moonbase59; 08-01-2025 at 09:58 AM.
Moonbase59 is offline   Reply With Quote