Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-17-2013, 05:34 AM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,607
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Improve hyphenation (French)

Hi

Hyphenation in French on my Glo is working but, I would say sluggish. I mean it leaves some unwanted white "holes" and could be more agressive.

JC Goguen proposes one solution with his nice calibre plugin, however I dislike the KEPUB renderer and I will not follow him this way.

I would just like to be able to change a file in my Glo to get a stronger hyphenation (I am a Linux user) but I am afraid to brick my Glo, so I would need precise explanations.

This is what you can read here and this explanation is suited to the users of his plugin. I dare not ask him a question out of his plugin...

Spoiler:

Hyphenation

Both plugins includes the ability to add a CSS file to each book enabling KePub hyphenation. The standard hyphenation dictionaries provided on Kobo devices are somewhat deficient for some languages; fixing this (or adding your own dictionary) requires a little work and requires that you can create gzipped tarballs (.tgz files). Note that you can only update existing dictionaries, you cannot add new ones.

Somewhere on your computer, create the directory structure usr/local/Kobo/hyphenDicts
Download the LibreOffice (or OpenOffice) hyphenation dictionary for your language
This will be a file with the 'oxt' extension. This is just a ZIP archive with a different name.
Unzip the OXT file and look for the file named as hyph\_[language].dic.
Copy the hyphenation dictionary to the hyphenDicts folder without changing the name.
Add the usr folder to KoboRoot.tgz
UNIX users (Linux, Solaris, BSD, Mac) can, from the command line, run tar czf KoboRoot.tgz usr/ from wherever you put the usr directory.
Windows users, you're on your own. Contributions of reliable Windows directions are welcome!

Once you have created KoboRoot.tgz copy it to the .kobo directory on your Kobo device, unmount/eject the drive, and unplug the device. You will see a screen indicating that the Kobo device is updating; it is not, but this method takes advantage of the Kobo update mechanism to load the necessary dictionary files. Make sure you keep your version of KoboRoot.tgz around, you will need to re-apply it after every Kobo software update!

Provided languages are:

English (en_US)
French (fr_FR)
Spanish (es_ES)
German (de_DE)
Italian (it_IT)
Portugese (pt_PT)

Please note that even with this feature, hyphenation is not exact. Also remember that you can only update existing dictionaries.

roger64 is offline   Reply With Quote
Old 08-17-2013, 08:06 AM   #2
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: 598
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
Default Adobe and OpenOffice hyphenation dictionaries contain
Code:
LEFTHYPHENMIN 3
RIGHTHYPHENMIN 3
The numbers means the minimum number of characters before and after the inserted hyphen.
Just adjust the numbers. Lower means more agressive.

There is also a slightly more complex variant available for some languages.
Code:
LEFTHYPHENMIN 2
RIGHTHYPHENMIN 3
COMPOUNDLEFTHYPHENMIN 2
COMPOUNDRIGHTHYPHENMIN 3
Use a search engine to learn what it does.

Last edited by Anak; 08-17-2013 at 08:09 AM.
Anak is offline   Reply With Quote
Advert
Old 08-17-2013, 09:44 AM   #3
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,607
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

I do not intend to change hyphenation rules but hyphenation dictionnary (as written in the spoiler of my first message). I extracted and got it but I do not know how to put it in place on the Kobo without breaking anything...
roger64 is offline   Reply With Quote
Old 08-17-2013, 10:06 AM   #4
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,103
Karma: 73447988
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
You put it in place using the instructions provided; ie you need to create a KoboRoot.tgz file that contains usr/local/Kobo/hyphenDicts/hyph_FR.dic then copy that file to .kobo on your device and allow it be processed.

If you want to revert, either reinstall the same version of firmware as you had manually, or, make a new KoboRoot.tgz that just contains the original hyph_FR.dic that you can obtain by downloading the firmware for your device and extracting that file from it.
PeterT is offline   Reply With Quote
Old 08-17-2013, 12:50 PM   #5
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,607
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Thanks Peter

I struggle to understand here (red spots) and I try to confirm:

This is the text of the law:

"Unzip the OXT file and look for the file named as hyph\_[language].dic.
Copy the hyphenation dictionary to the hyphenDicts folder without changing the name.
Add the usr folder to KoboRoot.tgz
UNIX users (Linux, Solaris, BSD, Mac) can, from the command line, run tar czf KoboRoot.tgz usr/ from wherever you put the usr directory."

- For the first red item why do we have an antislash? \

- For the second red item, once I have built my new KoboRoot.gz, I just drop it anywhere in the .kobo folder of my device, it does not replace anything?

Last edited by roger64; 08-17-2013 at 12:59 PM.
roger64 is offline   Reply With Quote
Advert
Old 08-17-2013, 01:39 PM   #6
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,103
Karma: 73447988
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Ignore the slash in the first example I think he copied the text he pasted from another location where the _ was "escaped" by the \ character. When you look in the KoboRoot.tgz file from a full upgrade, the file name is hyph_FR.dic .

The file has to be placed directly in the .kobo directory. All that is being done is that we are leveraging the Kobo update procedure to replace a file on the "hidden" side of the Kobo.

A full upgrade for Kobo includes 3 entities; the KoboRoot.tgz (which includes all the non linux kernel portions), the upgrade folder that appears to be more kernel related, and finally manifest.md5sum which is an MD5 checksum of the contents of the upgrade folder.

If only the KoboRoot.tgz is present, then it's contents are extracted and Nickel restarted. Otherwise the unit is rebooted after the upgrade folder is processed as well.

In either case, KoboRoot.tgz, the upgrade folder and the manifest.md5sum are deleted.

Now just to be safe, I have opened a bug report with the author and hope to hear back from him.
PeterT is offline   Reply With Quote
Old 08-17-2013, 03:21 PM   #7
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,607
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
@Peter

Your precise explanations give me confidence. It's a convoluted process to add a file to the main -hidden- KoboRoot.tgz but so be it.

I'll report back later on this.
roger64 is offline   Reply With Quote
Old 08-17-2013, 03:41 PM   #8
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,103
Karma: 73447988
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
The KoboRoot.tgz isn;t hidden. Think of yoiur linux box. On it if you open a command prompt you can see locations like /bin, /sbin, /usr etc.

On the Kobo those locations are not accessible to you unless you either enable telnet on the device OR use the same method as the Kobo updates use to appluy updates.
PeterT is offline   Reply With Quote
Old 08-17-2013, 03:43 PM   #9
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,103
Karma: 73447988
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Turns out the \_ was not meant to be there It is meant to be simply _ so hyph_{lang}.dic is correct.
PeterT is offline   Reply With Quote
Old 08-18-2013, 04:59 AM   #10
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,607
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
This is to report full success and extend thanks to Peter and Anak.

The hyphenation in French is now working fine (I can see four words cut on a page where it hardly occurred once).

You'll find enclosed the Kobo uncompress folder I prepared for MobileRead. It includes, the KoboRoot.tgz file you have to use, and for information purposes only the file hyph_fr.dic (in lowercase). Once unplugged, the update took place without a hitch on my Kobo Glo 2.8.1.

To use it: unzip and put directly the KoboRoot.tgz file into your .kobo folder. Once the update has taken place, this file will have disappearred...

Attached Files
File Type: zip Kobo uncompress.zip (17.8 KB, 225 views)
roger64 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyphenation Siard Kobo Reader 6 08-09-2013 07:40 AM
Best eBook reader for reading French (English speaker learning French) eVeNtInE Which one should I buy? 13 08-24-2012 04:25 AM
Hyphenation Jini ePub 3 04-05-2012 11:48 AM
French-French dictionary in iPad Kindle App Clif Apple Devices 2 12-20-2011 11:51 PM
hyphenation CPatrick OpenInkpot 3 03-22-2010 06:06 AM


All times are GMT -4. The time now is 11:57 PM.


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