Spell-Checking-with-Hunspell: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=Spell Checking with Hunspell=


==Prerequisites==
You have to get Hunspell from http://hunspell.sourceforge.net/ ''[hunspell.sourceforge.net]''. I have tested the classes with version 1.2.8. It ''may'' work with a more recent version (current is 1.2.12). Dictionaries can be downloaded via the sourceforge page.
If you plan to use the spell checker in a commercial software, watch out for the copyright and license of the dictionaries!
The source code on ''this'' wiki page is released by me ([[member/20|Volker]], being the original author) under the [http://en.wikipedia.org/wiki/BSD_licenses#2-clause_license_.28.22Simplified_BSD_License.22_or_.22FreeBSD_License.22.29 2 clause <span class="caps">BSD</span> license] ''[en.wikipedia.org]''
You also must adapt a few files before everything works:
'''The project file SpellChecker.pro:'''<br /> Adjust the paths to your hunspell installation
'''dialog.cpp:'''<br /> In method Dialog::checkSpelling() adjust the paths to the dictionaries. You must provide the base name of the dictionary, excluding the suffixes .dic and .aff. The user dictionary is optional. The path is the complete path to the file, including an extension (which is optional).
==Sources==
===SpellChecker.pro===
===main.cpp===
===dialog.ui===
===dialog.h===
===dialog.cpp===
===spellcheckdialog.ui===
===spellcheckdialog.h===
===spellcheckdialog.cpp===
===spellchecker.h===
===spellchecker.cpp===
===Categories:===
* [[:Category:snippets|snippets]]

Revision as of 09:18, 24 February 2015