Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-16-2020, 04:30 AM   #1
klover137006
Member
klover137006 began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jul 2020
Device: Kobo Clara HD
Does hyphenation work or not?

After a first feeling of triumph from successfully enabling Swedish hyphenation on my Kobo (by adding a new hyph_sv_SE.dic file onto it) I gradually became more and more distracted by obvious hyphenation errors (for instance förm-ögenhet instead of för-mögenhet or anmärkn-ing instead of anmärk-ning).

At first I blamed the .dic files I had aquired so I spent days making my own, but errors of the same kind were still made.

Now before spending more time trying to fix this I would like to know: is it even possible to get correct hyphenation on Kobo. I looked in an English book that's on my Kobo and it seems to have correct hyphenations (I did find one possible error: untrac-table instead of untract-able, but I am not sure about that one) which indicates that it might indeed be possible.

What's the current consensus on this subject?
klover137006 is offline   Reply With Quote
Old 07-16-2020, 04:57 AM   #2
Simboubou
Connoisseur
Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.
 
Posts: 58
Karma: 2112464
Join Date: Aug 2014
Device: Kobo Glo HD
Quote:
Originally Posted by klover137006 View Post
After a first feeling of triumph from successfully enabling Swedish hyphenation on my Kobo (by adding a new hyph_sv_SE.dic file onto it) I gradually became more and more distracted by obvious hyphenation errors (for instance förm-ögenhet instead of för-mögenhet or anmärkn-ing instead of anmärk-ning).

At first I blamed the .dic files I had aquired so I spent days making my own, but errors of the same kind were still made.

Now before spending more time trying to fix this I would like to know: is it even possible to get correct hyphenation on Kobo. I looked in an English book that's on my Kobo and it seems to have correct hyphenations (I did find one possible error: untrac-table instead of untract-able, but I am not sure about that one) which indicates that it might indeed be possible.

What's the current consensus on this subject?
Been there, done that. Eventually gave up. While I could find dictionaries that made things slightly better, I kept getting distracted by every hyphenation mistake. So I just disabled it entirely.

Problem was even worse in French, since words tend to be longer than English ones, thus leading more frequent hyphens. Don't know about swedish, but it could have a similar issue.

Turned out that justified text with no hyphenation is good enough unless you have a very big font size. I find to occasional overstretched line to be less annoying that wrong hyphens.

Also, if you want to avoid hyphens and over-stretched spaces, one solution is to set you device in Landscape mode (it can be enable through a firmware patch, easy enough).

Last edited by Simboubou; 07-16-2020 at 05:13 AM.
Simboubou is offline   Reply With Quote
Advert
Old 07-16-2020, 05:10 AM   #3
klover137006
Member
klover137006 began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jul 2020
Device: Kobo Clara HD
I see.

Yes, Swedish has a lot of long words so without hyphenation there are a lot of stretched lines, which I find distracting (but, like you, not as distracting as hyphenation errors).

Did you experience the errors in English too, or just French?
klover137006 is offline   Reply With Quote
Old 07-16-2020, 05:24 AM   #4
Simboubou
Connoisseur
Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.Simboubou ought to be getting tired of karma fortunes by now.
 
Posts: 58
Karma: 2112464
Join Date: Aug 2014
Device: Kobo Glo HD
French was definitely worse, but English was not perfect either. I read a few chapters of the Lord of the Rings with hyphens and it was okayish, but I eventually went back to no-hyphens.

One thing I noticed is that all the english hyphens dict that I could find were much longer than french ones. So maybe the english ones are more complete, I don't know.

Here are some things you can try:
  • Increase the minimum number of characters before and after hyphens, so that the system only hyphens long words that would lead to visibly stretched lines.
  • Activate landscape mode. You'll get longer lines, and the kobo won't need to stetch spaces as much.
  • Try using an alternate reader like Koreader or Plato.
Simboubou is offline   Reply With Quote
Old 07-16-2020, 10:41 AM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,495
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Are you reading ePub or KePub? If it's KePub, then hyphenation can be spotty depending on the hyphenation dictionary settings. if it is KePub, try ePub. If it is ePub, what are the hyphenation left/right settings in the dictionary file?
JSWolf is offline   Reply With Quote
Advert
Old 07-16-2020, 10:51 AM   #6
npr
Zealot
npr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five words
 
Posts: 105
Karma: 37418
Join Date: Jan 2013
Device: Kobo Glo, Aura, H2OE2, Libra 2
Have you checked the language code you've used in the hyph_??.dic file name is the same as that in your books metadata (content.opf file).
npr is offline   Reply With Quote
Old 07-16-2020, 11:35 AM   #7
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by klover137006 View Post
What's the current consensus on this subject?
I'm no expert in hyphenation issues but, offhand, I can't remember anyone talking about successfully installing a hyphenation dictionary for a language which is not in Kobo's built-in supported language list. Quite a lot is known and documented about how to make custom lookup/translation dictionaries work, but not custom hyphenation dictionaries.

The successes I have read about are when someone has improved one of the 8 standard Kobo languages, e.g. hyph_en.dic.

Also, I'm not sure that it's as simple as just adding a new file to the /usr/local/Kobo/hyphenDicts directory. There appear to be some related entries in /usr/share/hyphen, maybe other places, too.

This is less than ideal but have you tried renaming your custom hyphenation dictionary to one of the default language names that you'll never want to use? Unfortunately you'd also need to change the language to match in each of your epub/kepubs.

Hopefully, someone with more expertise will chip in soon.

Last edited by jackie_w; 07-16-2020 at 11:38 AM.
jackie_w is offline   Reply With Quote
Old 07-16-2020, 11:50 AM   #8
klover137006
Member
klover137006 began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jul 2020
Device: Kobo Clara HD
Quote:
Originally Posted by JSWolf View Post
Are you reading ePub or KePub? If it's KePub, then hyphenation can be spotty depending on the hyphenation dictionary settings. if it is KePub, try ePub. If it is ePub, what are the hyphenation left/right settings in the dictionary file?
It's KePub, or rather, it's a renamed ePub so the extension is .kepub.epub. If I keep the extension as .epub there's no hyphenation at all. I haven't experimented with any settings like left/right since the errors didn't seem to have anything to do with those.

Quote:
Originally Posted by npr View Post
Have you checked the language code you've used in the hyph_??.dic file name is the same as that in your books metadata (content.opf file).
Yes, and also, I did some experiments just to verify that it reads the .dic files I add (I removed the file completely and the hyphenation disappeared, I also tried different files which generated different hyphenations.)

Quote:
Originally Posted by jackie_w View Post
This is less than ideal but have you tried renaming your custom hyphenation dictionary to one of the default language names that you'll never want to use? Unfortunately you'd also need to change the language to match in each of your epub/kepubs.
No, I haven't, but obviously, considering the amount of suggestions I've received, there seems to be a lot of things to try.
klover137006 is offline   Reply With Quote
Old 07-16-2020, 11:53 AM   #9
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,792
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by jackie_w View Post
I'm no expert in hyphenation issues but, offhand, I can't remember anyone talking about successfully installing a hyphenation dictionary for a language which is not in Kobo's built-in supported language list.
Has anyone tried using ExtraLocales in the config file? This appears to apply to everywhere a language list is needed.
geek1011 is offline   Reply With Quote
Old 07-16-2020, 01:18 PM   #10
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,557
Karma: 14325282
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by Simboubou View Post
French was definitely worse, but English was not perfect either. I read a few chapters of the Lord of the Rings with hyphens and it was okayish, but I eventually went back to no-hyphens.

One thing I noticed is that all the english hyphens dict that I could find were much longer than french ones. So maybe the english ones are more complete, I don't know.

Here are some things you can try:
  • Increase the minimum number of characters before and after hyphens, so that the system only hyphens long words that would lead to visibly stretched lines.
  • Activate landscape mode. You'll get longer lines, and the kobo won't need to stetch spaces as much.
  • Try using an alternate reader like Koreader or Plato.
Yet another example of how justified sucks fails.

You didn't include my favorite solution which is to "fix" the CSS and change it to ragged-right instead of justified; i.e., text-align:left instead of text-align:justified. For the Kobo you can just delete all text-align:justified (i.e., no need for text-align:left, but leave the ones that are right and center) and then you can select either ragged right or justified in the Kobo's font menu.

Last edited by hobnail; 07-16-2020 at 01:22 PM.
hobnail is offline   Reply With Quote
Old 07-16-2020, 03:58 PM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,495
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by hobnail View Post
Yet another example of how justified sucks fails.

You didn't include my favorite solution which is to "fix" the CSS and change it to ragged-right instead of justified; i.e., text-align:left instead of text-align:justified. For the Kobo you can just delete all text-align:justified (i.e., no need for text-align:left, but leave the ones that are right and center) and then you can select either ragged right or justified in the Kobo's font menu.
Sorry, but that may not work properly. With ePub, that works properly. With KePub, that doesn't work well. Some centering with KePub don't center. So you are best to edit the CSS for use as KePub. For KePub, you are best to set justification in Aa to off and let the CSS decide how the justification works.

Using the better English hyphenation dictionary I posted int he Kobo Developer forum, you do get much better hyphenation. I'm going to play with it some and see how I get on.

Last edited by JSWolf; 07-16-2020 at 04:00 PM.
JSWolf is offline   Reply With Quote
Old 07-16-2020, 04:17 PM   #12
Anak
Fanatic
Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.
 
Posts: 599
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
It is impossilbe to get (perfectly) correct hyphenation files, but maybe you can find updated/improved hypenation files from LibreOffice or OpenOffice.

Add the following to the .dic (after UTF-8):
Code:
LEFTHYPHENMIN 3
RIGHTHYPHENMIN 3
Change the values, and make sure that file is saved as UTF-8.

This prevents breaking shorter words: jus-tificat-ion, jus-tificati-on.
This doesn't fix breaking words at the correct position. Note: interpunction is also 'counted' as a character.

Example:
Code:
UTF-8
LEFTHYPHENMIN 3
RIGHTHYPHENMIN 3
.a4
.aan5
.a4a4
…
Replace the Dutch hyphenation dictionary with a hyphenation dictionary that matches your language (try hyphenation files for OpenOffice/LibreOffice)
and change the symlink too.
Use 7-zip so you can drag and drop a hyphenation file in
Code:
\usr\local\Kobo\hyphenDicts\
and change the symlink by pressing F2 in
Code:
\usr\share\hyphen\
Note: the attached file isn't a rar file. remove .rar (KoboRoot-nl-hyp-dic.tgz) and rename it to KoboRoot.tgz to install it.
Attached Files
File Type: rar KoboRoot-nl-hyp-dic.tgz.rar (49.6 KB, 327 views)
Anak is offline   Reply With Quote
Old 07-17-2020, 08:23 AM   #13
klover137006
Member
klover137006 began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jul 2020
Device: Kobo Clara HD
Does anyone know if the Kobo fully supports the .dic format? That is, every instruction that's possible in the .dic file is also understood by the Kobo. And does someone have a link to a page that explains how the patterns are constructed – for instance, what ".aan5" means?

I have a hard time believing that the .dic files I've tried would allow for such glaring mistakes as the ones I discovered, which leads me to believe that the Kobo isn't listening to what the .dic file really says, but it's hard for me to know if I don't know exactly how that file is constructed.

Or maybe it's because Swedish is not one of the listed languages, I will try to replace one of the official .dic files and see if the result differs.

Quote:
\usr\share\hyphen\
I wasn't aware of this symlink, but I've used a patch posted in here somewhere that moves the hyphendicts folder onto the readable partition (in .addons/hyphenDicts/) but I have to restart the Kobo before the new dictionary file is read... maybe that's because of that symlink???
klover137006 is offline   Reply With Quote
Old 07-17-2020, 01:16 PM   #14
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,495
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Anak View Post
It is impossilbe to get (perfectly) correct hyphenation files, but maybe you can find updated/improved hypenation files from LibreOffice or OpenOffice.

Add the following to the .dic (after UTF-8):
Code:
LEFTHYPHENMIN 3
RIGHTHYPHENMIN 3
Change the values, and make sure that file is saved as UTF-8.

This prevents breaking shorter words: jus-tificat-ion, jus-tificati-on.
This doesn't fix breaking words at the correct position. Note: interpunction is also 'counted' as a character.

Example:
Code:
UTF-8
LEFTHYPHENMIN 3
RIGHTHYPHENMIN 3
.a4
.aan5
.a4a4
…
Replace the Dutch hyphenation dictionary with a hyphenation dictionary that matches your language (try hyphenation files for OpenOffice/LibreOffice)
and change the symlink too.
Use 7-zip so you can drag and drop a hyphenation file in
Code:
\usr\local\Kobo\hyphenDicts\
and change the symlink by pressing F2 in
Code:
\usr\share\hyphen\
Note: the attached file isn't a rar file. remove .rar (KoboRoot-nl-hyp-dic.tgz) and rename it to KoboRoot.tgz to install it.
How you setup the left/right numbers depends on if you are reading ePub or KePub. KePub resing the L/R numbers one off from ePub.

With ePub, 3/3 is 3/3. With KePub, 3/3 is really 2/2. So to do 2/3 with KePub you want 3/4 and for ePub you want 2/3.
JSWolf is offline   Reply With Quote
Old 07-17-2020, 01:52 PM   #15
klover137006
Member
klover137006 began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jul 2020
Device: Kobo Clara HD
Quote:
Originally Posted by JSWolf View Post
How you setup the left/right numbers depends on if you are reading ePub or KePub. KePub resing the L/R numbers one off from ePub.

With ePub, 3/3 is 3/3. With KePub, 3/3 is really 2/2. So to do 2/3 with KePub you want 3/4 and for ePub you want 2/3.
Haha, god, it's always frustrating when computers simply cannot do what they're supposed to do best: follow instructions.

(Of course, I do realize that they're in fact following someone's instructions to not follow instructions... even more frustrating!)

OK, so with KePub, 3/3 is really 2/2, but if a word contains a comma at the end, does that in fact mean 2/1, if the comma counts as one?
klover137006 is offline   Reply With Quote
Reply

Tags
hyphenation, kobo


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyphenation skr1107 Calibre 1 09-27-2018 12:28 PM
Hyphenation Simboubou PocketBook 9 09-15-2014 06:21 AM
Hyphenation does not work in E-book Viewer Elancrom Calibre 2 06-18-2014 07:19 AM
Hyphenation Siard Kobo Reader 6 08-09-2013 08:40 AM
hyphenation CPatrick OpenInkpot 3 03-22-2010 07:06 AM


All times are GMT -4. The time now is 10:33 PM.


MobileRead.com is a privately owned, operated and funded community.