View Single Post
Old 06-01-2016, 10:04 AM   #6
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,562
Karma: 5703586
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by varlog View Post
As far as I can understand it would mean:
combining 2 or more dictionaries in one for spelling check (it is not something I personally would want!)
so Edit->Preferences->Spellcheck Dictionaries should have by Dictionary a [+] button which will allow to add another language
so the dictionary box should show current situation
a [-] box must be there of course!
Not quite. Instead we need to change the code that parses an xhtml file that extracts the text, to keep track of tags too and any lang= or xml:lang= tags in a stack, so that for each word of text, we simply look at the most recent language definition and then pass both the word and its language to the spellchecker interface. The language stack defaults to the user metadata language setting.

The spellchecker then uses the lang info to decide which dictionary to use. The singleton SpellChecker class would then keep open and use up to say 4 or 5 dictionaries (we can make the actual limit a user preference setting) because each dictionary takes up lots of memory.

The language would be passed along to the spellchecker dialog along with the misspelt word. It would be up to the user to decide based on the language info, what user dictionary they want to add that word to and whether they want to use that user wordlist with a particular book.

I am not sure if clicking on a misspelt word in the search will find all uses of the word or will be language dependent.

Quote:
Is this right?
Way out of my field of competence as usual.

Ok, if I deliver something like that would you pull my PreserveFileName patch? git rebase master sucks so much...
regards
See above, we can talk about it.

KevinH
KevinH is online now   Reply With Quote