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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-18-2014, 12:47 PM   #31
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 889
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
Quote:
@DrChiper: The spell check most definitely is aware of tags. In fact it will only check text in tags (other than script and style) and in the attributes alt and title (which are used for tooltips/descriptions). If you are getting words from places other than tags, then it is likely a bug, attach the file.
I didn't realized this was the content.opf file (<dc:description>) in which most of this false hits did happen (sometimes there are meta-tags present there), which is sufficiently dealt with in this thread already.
DrChiper is offline   Reply With Quote
Old 04-18-2014, 12:49 PM   #32
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 889
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
Quote:
@DrChiper: calibre does not check the src attribute, since spelling is meaningless htere. The title and alt attributes are checked, however.
Interestingly as the hit was in the "src" part, the "alt" part was actually ignored.
DrChiper is offline   Reply With Quote
Advert
Old 04-18-2014, 05:07 PM   #33
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,457
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
@BR: I suggest setting up a user dictionary with your abbreviations. The correct solution for not flagging some words is not to simply ignore an entire file.
Done - created a FinLaw Jargon dictionary.

BR
BetterRed is offline   Reply With Quote
Old 04-18-2014, 06:42 PM   #34
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,457
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by roger64 View Post
Even on a full page window, I can, at most visualize 20 words. I should at least be able to see a healthy 50


Quote:
Originally Posted by roger64 View Post
and it seems really necessary to be able to narrow the fields.
I am able to change the width of the columns in the 'normal' way - by dragging the column header dividers left and right. And I can change the size of the window, and my adjustments are 'remembered'

BR
BetterRed is offline   Reply With Quote
Old 04-18-2014, 06:58 PM   #35
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,457
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
If I arrow down the list fast, then the spell checker list locks up to both keyboard and mouse input. I have to close and open it again.

If I hit enter on a word I get a "Checking Please Wait" screen, the code panel is positioned to first occurrence of the selected word, but the list is repositioned to the top of the list.

I can't find a way to get into the suggested word list via Tab or an Accelerator key.

BR
BetterRed is offline   Reply With Quote
Advert
Old 04-18-2014, 07:02 PM   #36
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
Were you able to go through that sample document with the fix in?
mrmikel is offline   Reply With Quote
Old 04-18-2014, 07:13 PM   #37
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,457
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by mrmikel View Post
I have been on the lookout for a British-american dictionary, since I work with a lot of British works and also american or works about WWII where both are used at the same time.
@mrmikel - maybe you could combine two (US & GB) dictionaries by doing a diff between them, deleting duplicates from one of them, merging it with the other one to create a new dictionary, re-sort the new dictionary, and update the word count.

Quote:
ADDED

You'd also have to merge the .aff (affix files) which would probably have to be done manually

Probably the best place to look/ask is at the libre/apache OO forums
BR

Last edited by BetterRed; 04-19-2014 at 05:00 PM.
BetterRed is offline   Reply With Quote
Old 04-18-2014, 09:31 PM   #38
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,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by DrChiper View Post
Interestingly as the hit was in the "src" part, the "alt" part was actually ignored.
That's actually a limitation of the show next occurrence code. It has to work with raw text, so it just finds the first occurrence, not the one that is actually marked. If you do a replace, it will replace the instance in the alt attribute.
kovidgoyal is offline   Reply With Quote
Old 04-18-2014, 10:19 PM   #39
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,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by BetterRed View Post
If I arrow down the list fast, then the spell checker list locks up to both keyboard and mouse input. I have to close and open it again.
I cannot replicate that.

Quote:
If I hit enter on a word I get a "Checking Please Wait" screen, the code panel is positioned to first occurrence of the selected word, but the list is repositioned to the top of the list.
That's because the refresh button had keyboard focus when you hit enter.

Quote:
I can't find a way to get into the suggested word list via Tab or an Accelerator key.
There isn't one. This dialog isn't really designed for keyboard use.EDIT: I have changed it so that you can use the Tab key, though IMO using tab to move between controls is rather cumbersome.

Last edited by kovidgoyal; 04-18-2014 at 10:51 PM.
kovidgoyal is offline   Reply With Quote
Old 04-18-2014, 11:14 PM   #40
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,457
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
What I thought was a lock is a long wait - 43 secs in one case, also happens in Mint on another computer, and in Windows safe mode.

Re keyboard focus - I was presuming that when a word was highlighted in the list of errors - white text on blue background - that it would have the keyboard focus.

BR
BetterRed is offline   Reply With Quote
Old 04-18-2014, 11:37 PM   #41
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,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by BetterRed View Post
What I thought was a lock is a long wait - 43 secs in one case, also happens in Mint on another computer, and in Windows safe mode.
That is entirely natural since every time you change the current word it has to build the list of suggested words, if you wish to scroll the list using keys, use page down and page up.
kovidgoyal is offline   Reply With Quote
Old 04-19-2014, 01:53 AM   #42
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

Dealing with French apostrophes

As you probably know, French need to use normally curly apostrophes (named also "typographic") in their texts, though many use also straight ones... so practically, there is a need for taking into account the two forms.

I gave an EPUB to the French author of Grammalecte, Olivier_R., to comment on the problem about elided forms. He gave me the following reply. I kept the original French text and gave under each paragraph an English translation.

Here it is:

Deux solutions :
Two solutions:
1. La plus simple, mais pas forcément adéquate dans tous les cas : lorsqu’un mot n’est pas reconnu par le dictionnaire français, demandez à ce que l’apostrophe soit considérée comme un séparateur et ne retenir que la deuxième partie (celle qui suit l’apostrophe) dans le décompte des mots.

1. The simplest, but maybe not the most precise for everything: when a word is not recognized by the french dictionary, ask that the apostrophe be considered as a divider ("séparateur") and only take into account the second part (the one after the apostrophe) in the word count.

Code:
if "’" in word: word = word[word.find("’")+1:]
if "'" in word: word = word[word.find("'")+1:]
Ce code n’est pas vraiment optimisé. Il faut le tester. Cela ira peut-être plus vite avec une expression régulière.
Les deux lignes ne sont pas forcément nécessaires; cela dépend de la façon dont sont gérées les apostrophes, si elles sont transformées avant de faire la demande à Hunspell.

This code is not really optimized and has to be tested. Maybe it would be quicker using a regex. The two lines maybe are not needed, it depends on how you are managing apostrophes, if you transform them before asking Hunspell.

2. Plus exact, mais plus coûteux en ressources, j’imagine : éliminer par expression régulière tout ce qui commence par l’, d’, j’, c’, s’, t’, m’, qu’, etc. avant de regarder si le mot existe et de le comptabiliser dans les mots inconnus. (Plus coûteux en ressources, mais ça ne devrait pas être rédhibitoire.)

2. More precise, but more taxing on resources, probably: dismiss using a regex whatever is beginning with l’, d’, j’, c’, s’, t’, m’, qu’, etc. before looking if it is an existing word and count it within the unknown words (though more taxing on resources, it should not be too hard).
Code:
rElidedPrefix = re.compile(u"(?i)^(l|d|m|t|s|j|c|ç|qu)['’]")
[...]
word = rElidedPrefix.sub("", word)
Et il faudrait spécifier au moteur de reconnaissance de ne faire ceci que pour le français.

It would be necessary to tell the engine to do this only for French.

Le code est générique et n’est vraisemblablement pas du tout adapté à son propre code. Je n’ai pas le temps de me plonger dans son programme. Mais avec ça, il comprendra ce qui est nécessaire pour le français.

This is generic code. He hopes you'll understand with this what is necessary.

Last edited by roger64; 04-19-2014 at 10:36 AM.
roger64 is offline   Reply With Quote
Old 04-19-2014, 03:13 AM   #43
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,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@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.
kovidgoyal is offline   Reply With Quote
Old 04-19-2014, 06:14 AM   #44
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,457
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
That is entirely natural since every time you change the current word it has to build the list of suggested words, if you wish to scroll the list using keys, use page down and page up.
I think I found the cause of the slow response.

In Sigil I had problems with apostrophes in possessives & contractions, they were always flagged as an error with the en-GB dictionary shipped with Sigil.

In Sigil\hunspell\about.txt I found American British Canadian - spelling/hyphen/thesaurus dictionaries from there I installed the British-English dictionary and the apostrophe problems were gone - I don't understand why.

That dictionary is a lot bigger (670K words v 98K) than the one shipped with Sigil and calibre. Using it in Sigil had some impact on performance, but for me at least it was not dramatic, but using that dictionary in calibre has a very significant impact on performance.

In calibre I don't get the problems with apostrophes with the smaller dictionary, so I could use it. That would mean I'd have to forego the other benefits of using the larger dictionary - which I had found to be useful.


If I use Page Down & Page Up, it moves the current item, but it doesn't move the list, so I have to use the mouse to scroll the list to see the new current item.

What really I'd really like is a context menu on misspelled words (right click or Menu key), e.g. :

Code:
Ignore
Add to dictionary...
    Default
    User dictionary 1
    User dictionary 1
Show next occurrence
Change selected word to...
    alternative 1
    alternative 2
    alternative 3
    alternative .
    alternative n
BR
BetterRed is offline   Reply With Quote
Old 04-19-2014, 06:31 AM   #45
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,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I have no objections to implementing a context menu. Other than that I am rather swamped at the moment. Who knew there were going to be so many feature requests/bugs just for the spell checker.

I currently have the following on my spell checker todo list:

1) Improve the goto next occurrence algorithm to ensure it only goes to matches in correct places ... see DrChiper's bug report (This is a big one, going froma parsed XML tree to a location in raw text accurately is far from easy)

2) Add an import word list into user dictionary tool

3) create a context menu

4) Investigate roger64's suggestion about elisions in French

I think I have already implemented everything else in this thread that was asked for, apart from a couple of things that I dont agree are good ideas.

Last edited by kovidgoyal; 04-19-2014 at 06:33 AM.
kovidgoyal 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
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 06:19 AM.


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