Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 04-19-2014, 06:44 AM   #46
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
I am finally figuring it out. It is remarkable that when confronted with something new it takes me a while to absorb it all. I was looking for user dictionary yesterday and couldn't find it, but the button was there all the time.

Anyway, I am finding that after some replacements of some words, other words on the list don't respond when double clicked. I refreshed and they did respond. Can work with it this way, I am just happy to have it built in now.
mrmikel is offline   Reply With Quote
Old 04-19-2014, 07:58 AM   #47
dicollecte
Junior Member
dicollecte began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Apr 2014
Device: none
Dealing with French apostrophes

Quote:
Originally Posted by kovidgoyal View Post
@roger64: I can probably do what you are asking, but this sort of thing really should be done by the spell check library, which is hunspell in this case. I wonder why it does not do this itself? I am worried that doing so may have some unintended side effects.
Hi,

I’m the French spelling dictionary maintainer. Hunspell handles properly apostrophes but cannot solve our issue here.

Most of French uses for apostrophes are to create elided forms, i.e.
l’animal = the animal
j’aime = I like

There is hundred thousands of these words with elided forms in the French language. Hunspell recognizes these words as it should.

But when a word is not recognized by the dictionary, there is no reason to list several times this word with different elided forms.

Example with articulateur. This word is not present in the dictionary. But when Calibre encounters it in forms like l’articulateur, d’articulateur, articulateur, it considers them as 3 different words whereas it’s the same with or without elided forms.

That’s why these prefixed elided forms should be removed when counting unrecognized words.

Here is a simple algorithm in Python which explains what would be useful for the French language:

Code:
import re
rElidedPrefix = re.compile(u"(?i)^(l|d|m|t|s|j|c|ç|lorsqu|puisqu|quoiqu|qu)['’]")  # needed for FR locale
dict_of_unknown_words = {}

for word in list_of_all_words_in_text:
    if not Hunspell.isvalid(word):
        word = rElidedPrefix.sub("", word) # needed for FR locale
        dict_of_unknown_words[word] = dict_of_unknown_words.get(word, 0)+1
HTH.
dicollecte is offline   Reply With Quote
Advert
Old 04-19-2014, 08:05 AM   #48
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Ah, I see what you are saying. You want the unrecognized variants to be listed as a single word. That is somewhat harder to do, since it means that the replace code can no longer do a simple replace but must check for an elision and do a smart replace. Certainly possible, but more work.
kovidgoyal is offline   Reply With Quote
Old 04-19-2014, 06:34 PM   #49
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
It appears that the spell check works even on that document. What stops it is having the word start or end with a bracket, which this document does a lot in its footnotes.
mrmikel is offline   Reply With Quote
Old 04-20-2014, 07:07 AM   #50
BobC
Guru
BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.
 
Posts: 691
Karma: 3026110
Join Date: Dec 2008
Location: Lancashire, U.K.
Device: BeBook 1, BeBook Pure, Kobo Glo, (and HD),Energy Sistem EReader Pro +
One "enhancement" to the spelling checker which would be particularly helpful to me would be the addition of a "minimise" control to the Spell Check window.

Even when I reduce the size of the window to the minimum needed to see all the fields etc it still takes up quite a bit of screen real estate and means if I want to see the misspelled word in context I have to do a lot of moving windows about.

The ability to minimise the window would allow me to "hide" the dialogue temporarily while examining the context and then quickly return to it once I had decided if/how I wanted to correct the offending word.

I would hope this is a relatively trivial change.

BobC
BobC is offline   Reply With Quote
Advert
Old 04-20-2014, 07:28 AM   #51
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
I just resized it to make it fit over the preview window. I would want any minimizing to be voluntary rather than automatically disappearing when the focus was back on the code editor window. That behavior in Sigil did not work for me.
mrmikel is offline   Reply With Quote
Old 04-20-2014, 08:02 AM   #52
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,575
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by BobC View Post
One "enhancement" to the spelling checker which would be particularly helpful to me would be the addition of a "minimise" control to the Spell Check window.

Even when I reduce the size of the window to the minimum needed to see all the fields etc it still takes up quite a bit of screen real estate and means if I want to see the misspelled word in context I have to do a lot of moving windows about.

The ability to minimise the window would allow me to "hide" the dialogue temporarily while examining the context and then quickly return to it once I had decided if/how I wanted to correct the offending word.

I would hope this is a relatively trivial change.

BobC
@BobC - In Windows I have something that puts a roll-up/down button (and others) on all windows (rolls the window into the title bar), its part of the multiple monitor support package I use from Actual Tools. There's a free utility called Extra Buttons that seems to provide the same features. I find them useful everywhere - especially stay on top, can't really imagine life without it.

There's something that does similar for Mac but I forget its name.

BR
BetterRed is offline   Reply With Quote
Old 04-20-2014, 08:15 AM   #53
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Thanks for the try on the dictionary, but it fails when I try to install to calibre with:
calibre, version 1.33.0
ERROR: Failed to import dictionaries: Failed to import dictionaries from J:/Our Documents/Etexts/en_gb_us.oxt. Click "Show Details" for more information

Traceback (most recent call last):
File "site-packages\calibre\gui2\tweak_book\spell.py", line 112, in accept
File "site-packages\calibre\spell\import_from.py", line 70, in import_from_oxt
File "site-packages\calibre\utils\zipfile.py", line 1008, in open
File "site-packages\calibre\utils\zipfile.py", line 970, in getinfo
KeyError: "There is no item named u'META-INF/manifest.xml' in the archive"
mrmikel is offline   Reply With Quote
Old 04-20-2014, 07:03 PM   #54
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,575
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by mrmikel View Post
Thanks for the try on the dictionary, but it fails when I try to install to calibre with:
See https://www.mobileread.com/forums/sho...64&postcount=6

BR
BetterRed is offline   Reply With Quote
Old 04-21-2014, 05:04 AM   #55
BobC
Guru
BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.
 
Posts: 691
Karma: 3026110
Join Date: Dec 2008
Location: Lancashire, U.K.
Device: BeBook 1, BeBook Pure, Kobo Glo, (and HD),Energy Sistem EReader Pro +
Quote:
Originally Posted by BetterRed View Post
@BobC - In Windows I have something that puts a roll-up/down button (and others) on all windows (rolls the window into the title bar), its part of the multiple monitor support package I use from Actual Tools. There's a free utility called Extra Buttons that seems to provide the same features. I find them useful everywhere - especially stay on top, can't really imagine life without it.

BR
@BR - Thanks for the info on this. I had a look at it but TBH it's a bit of a sledgehammer to crack a nut for me - I really don't want another process affecting all my programs just to overcome an issue with a single dialogue.

BobC
BobC is offline   Reply With Quote
Old 04-21-2014, 06:03 AM   #56
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,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

A proposal

Many times, we use search and replace to modify, either some parts of the code or of the text.

Imagine we would like to check all composed names including a hyphen: like plate-forme, cerf-volant. Or to look after all the superscripts, or all the elided forms beginning with l'. The list is endless.

Now, if our search yields hundreds of occurrences, what are we supposed to do? Check them one by one? This is not very handy.

Proposal

As long as we are dealing with words, would it be possible to find a way to display the results of a search -a list of words- in the window of the spellchecker? (or in a different window of this kind) This would make the control much easier.

Last edited by roger64; 04-21-2014 at 06:11 AM.
roger64 is offline   Reply With Quote
Old 04-21-2014, 07:30 AM   #57
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the filter list of words control at the top of the spell check dialog.
kovidgoyal is offline   Reply With Quote
Old 04-21-2014, 08:41 AM   #58
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Other than the obvious putting of starts of words etc, are there any non obvious ways to use it with regex or something like that? I am not suggesting there should be only asking if there might be.
mrmikel is offline   Reply With Quote
Old 04-21-2014, 08:53 AM   #59
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by kovidgoyal View Post
Use the filter list of words control at the top of the spell check dialog.
I've tried to get a list of all hyphenated words. If I type a hyphen in the Filter box I get zero words displayed. It makes no difference whether the 'Show only misspelled' box is checked or not. I've also tried with both UK and US set as the preferred English variant, still no joy.

What am I missing?
jackie_w is offline   Reply With Quote
Old 04-21-2014, 08:59 AM   #60
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,575
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by mrmikel View Post
Other than the obvious putting of starts of words etc, are there any non obvious ways to use it with regex or something like that? I am not suggesting there should be only asking if there might be.
@mrmikel - it will find words that contain the search string, same as Sigil - so ' hor ' will find horror, horse, plethora, short, thorn, and whore. And ' ’s ' will find possessives - etc

@jackie_w - maybe you've tripped up on something I've been puzzling about - Sigil has dictionaries like hyph_en_GB.dic and hyph_en_US.dic but calibre doesn't - and Sigil will find all the words with a hyphen. But they may have nothing to do with it because Sigil will find nonsensical words with a hyphen eg hghgjgklkdl-reryenaj

BR

Last edited by BetterRed; 04-21-2014 at 09:29 AM.
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Spelling anomalies DMB General Discussions 71 06-19-2012 07:55 AM
Are DRM books with check in/check out allowed? i8abug Library Management 4 05-31-2012 02:27 PM
Spelling errors and such starrlamia General Discussions 29 11-29-2010 03:59 AM
Seriously thoughtful Spelling contractions SameOldStory Lounge 47 09-08-2010 09:08 PM
Spelling Macro PieOPah Workshop 36 12-13-2008 02:27 AM


All times are GMT -4. The time now is 02:30 PM.


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