View Single Post
Old 06-09-2016, 04:50 PM   #7
varlog
actually it is /var/log
varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.
 
varlog's Avatar
 
Posts: 341
Karma: 2994236
Join Date: Sep 2012
Location: usually Europa
Device: prs t1
Into The Source: THE BEGINNINGS

Now Kevin has outlined what's to be done but I have no idea what he's talking about. Well, not quite... but I need specifics.

So into the source.

My way is a little erratic, can't help it. I jump here and there, with every jump getting some knowledge - which hopefully will, in due time, grow into something workable. Let's start with SpellChecker class mentioned by Kevin.

Hey, there you are: src->Misc->(SpellCheck.cpp, SpellCheck.h).

...

Singleton indeed.

NOTE: One could imagine an instance for every language actively used. Just a thought - but I know too little yet to judge the silliness of it. There is this comment there:
Code:
//There is a considerable lag involved in loading the Spellcheck dictionaries
Loading new directory by every second word (worst case) versus jumping to (memory consuming) appropriate instance?

For the time being singleton it is.

...

SpellCheck class as comprehended (short version):

Constructor: finds system dictionaries, finds/creates user dictionaries, loads last used dictionary.

NOTE: perhaps the main book language would be the better choice?

Destructor: destructs hunspell and itself.

Functions to remember: all of them of course but setDictionary(QString,bool) is there ready for use.

There is a comment there that clarifies: hyphenation dictionaries are ignored. And then:
Code:
// That said, look into getting the raw hyphenation lists that were used
// to generate these hyph_dic files for libhyphen
... but that is not my concern at the moment.

Don't think I've understood it all ...

tbc...?

Last edited by varlog; 06-09-2016 at 05:18 PM.
varlog is offline   Reply With Quote