It is currently Tue Jan 19, 2021 8:04 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Spelling checker for a rich text editor
PostPosted: Mon Nov 02, 2020 3:52 pm 
Offline
User
User

Joined: Tue Dec 31, 2013 9:18 pm
Posts: 35
The zip files below implement a spell checker for text and RTF files.

It uses the SpellCheck Library produced by PrincieD at https://www.purebasic.fr/english/viewtopic.php?f=12&t=49236 with a few minor modifications (Thanks PrincieD). This library uses the popular free Hunspell spelling checker that is provided under a GPL/LGPL/MPL tri-license (https://github.com/hunspell/hunspell).

It also uses the Text Object Model (TOM) to underline mispelt words with a temporary red wavy line (see https://www.purebasic.fr/english/viewtopic.php?f=12&t=76203). This has the advantage that:

(1) if the original text contains any underlining then that underlining is automatically restored when the temporary wavy line is removed;
(2) the temporary underlining is not included in a document file when that document is saved.

Extract one of the zip files to an empty folder - you will find that a subfolder called Dictionaries is placed in this folder. This contains English dictionaries. If you want to use dictionaries for other languages (available at https://github.com/wooorm/dictionaries) then they must be placed in this folder.

I have included two Hunspell libraries Hunspellx64.dll and Hunspellx86.dll and these must be kept in the folder with the program that uses the spellchecker.

RTFSpellChecker_Basic.zip
This zip file contains the essentials for spell checking with a rich text editor. When the spell checker runs, it displays a rich text control containing some text with instructions. You can load a rtf file or text file for checking. I have not included a facility for saving the file as this program is really just a demonstration (let me know if you would like the option to save a document included and I may then include it).

Click this link to download the basic version of the spelling checker:
http://www.mediafire.com/file/1s92cd68fok49be/RTFSpellChecker_Basic.zip/file

RTFSpellChecker_Advanced.zip
This zip file contains extra modules so that when a mispelt word is right-clicked, a pop up menu appears. Use this menu to open a form that displays suggestions for correcting the word (double click the required word in this window). The form also lets you tell the program to ignore the word that is mispelt or add words to a default dictionary (After adding the first word, the default dictionary is created in the subfolder named Dictionaries and is named user.dat).

Click this link to download the more advanced version of the spelling checker:
http://www.mediafire.com/file/b3utd5qzu8vy3k4/RTFSpellChecker_Advanced.zip/file


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye