On Sun, Jul 10, 2011 at 6:13 PM, Dinbandhu <[email protected]> wrote: > So I'm wondering what you can suggest as a solution. Gedit does not seem to > "do this language detection and > switch the dictionaries dynamically". If it does have such capability, could > you guide me as to how I can make it happen.
I don't closely watch Gnome development these days, But let me try to outline the solution. Gedit(or GTK based text editors use libenchant as the spellchecker wrapper library. It acts as a bridge to aspell or hunspell. Remember that Fedora and Ubuntu are planning to use only hunspell as the spellchecker library and planning to remove Aspell in future. This is to avoid multiple dictionaries in the system, and to avoid multiple incompatible personal dictionaries. For eg, when you add a new word in LibreOffice personal dictionary. That wont be available to Gedit if both use different spellcheckers and different personal dictionaries. You need to read the code of enchant, identify whether it is the best place to have a language detection logic and then route it to appropriate spellcheckers with identified language as parameter. Language detection is not an easy task. There are languages which use same script(Hindi/Marathi). You need to look into the libtextcat library for this. It is a language detection library. You can also read sonnet source code which has its own language detection algorithm. Both uses n-gram model of the language anyway. Along with this research, you should talk to gnome developers in their dev mailing list about your idea and get their suggestions. I had provided links to bug reports, idea pages related to this topic in my blog post http://thottingal.in/blog/2008/11/13/language-detection-and-spellcheckers/ Please read that too. Thanks Santhosh Thottingal http://thottingal.in/blog ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ IndLinux-group mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/indlinux-group
