![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
adjusting a function
Hi
Some months ago, you gave us a nice function which allowed to split words "glued" together. After a mistake of mine, I had the opportunity to use this function on a lot of words on a French EPUB. I have of course installed a French dictionary. Please read on... ![]() The results were amazingly good and quick. Spoiler:
Using the Calibre Editor spell checker before and after the use of this function, I could see that the number of words unknown to the dictionary went down from 1167 to 261. Taking into account the fact that probably 2/3 of the remaining ones were "noms propres" (proper nouns ?), I nevertheless realized that some few words had not been split (50 to 70 probably). The cause was related with some kind of elided form. Here are some of them. One can easily discern the same pattern: a word followed by one letter and one curved apostrophe (in red here); these last two elements being characteristic of elided forms in French. accompagnentn’auront àl’origine dansl’entrée dem’expliquer des’opposer Etj’écrasai ils’attendait manueld’algèbre What makes me hope that the function could be improved so as to take care of elided forms is that for all of them, the first suggestion of the dictionary of the Calibre editor is to split them correctly. Last edited by roger64; 09-19-2016 at 03:39 PM. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@roger64: Sorry, I'm a little swaamped at the moment, so I dont have time to look at this, hopefully someone else will be able to help you.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Thanks for your reply. I hope too.
![]() |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
@roger64 - what is a link to the post that had the function?
My Search didn't turn up anything |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Here is the thread.
https://www.mobileread.com/forums/sho...d.php?t=251941 |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Hi
and here is a new version of this function taking into account the elided forms (at least for French language) thanks to Olivier, the author of -opensource- Grammalecte. ![]() Spoiler:
or here: http://pastebin.com/quGQQzcN Last edited by roger64; 09-21-2016 at 06:10 AM. Reason: pastebin |
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Thanks.
Small issue If there's <style> in the html file, the [Replace All] will process that text and generate errors For example, I had a jacket.xhtml file in an epub, and the RE split some things that generated errors (not typos or mis-spellings) Spoiler:
Any way to make the function a little smarter? I can always regenerate the jacket.xhtml file, but any other files that have <style> in would probably be changed also Last edited by phossler; 09-21-2016 at 11:45 AM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adjusting NOOK sensitivity | SKYRIDER | Barnes & Noble NOOK | 7 | 02-28-2016 12:32 PM |
Aura HD Adjusting font color | joanmed | Kobo Reader | 17 | 10-24-2014 12:53 AM |
Adjusting Cover Size | jhempel24 | ePub | 17 | 01-20-2012 05:20 PM |
Adjusting contrast on ereader? | aidren | enTourage Archive | 3 | 10-06-2010 06:31 PM |
Help adjusting line size, please. | Stitchawl | Calibre | 4 | 04-05-2009 10:53 PM |