Knowledgebase Home Page  >  RapidSpell Web ASP.NET  >  Behavior Customization
Search the Knowledge Base
How can I customize the parser and/or checker engine in order to create an offensive word checker / abbreviation convertor?
https://keyoti.com/kb/Default.aspx?ToDo=view&questId=101&catId=55

Options

Print this page
Email this to a friend
This article shows how to customize the behavior of the spell checker, to turn it into a swear word checker, and an abbreviation convertor.
 
To use the demo project attached you will need to unzip the CustomTextParser directory and make it a virtual directory (eg. you can unzip it into wwwroot and then configure it as an application under IIS).
 
In the project you will find 2 sets of code;
 
1. AbbreviationsDemo which uses the following files
 
AbbreviationsDemo.aspx
CustomParser.cs
SpellPopUp.aspx
 
to parse text and convert names into their abbreviated forms.
 
2. FlandersDemo which uses
 
FlandersDemo.aspx
FlandersParser.cs
OffensiveWordPopUp.aspx
 
to parse text looking for 'offensive' words - in this demo we look for Flanderisms and censor them.
 
The common trend in both examples is the code behind in the spell checker popup, where we do;
 
RapidSpellWeb1.CheckerEngine = new CustomTextParser.FlandersParser();
 
This switches the engine from spell checker, to our own parser.
 
You will also see in the FlandersDemo codebehind that we have logic behind the "Save" button, which processes the textbox contents looking for 'offensive' words.
 
 
If you have any questions about these, please post a comment or email support@keyoti.com and we'll be glad to explain anything that's unclear.

Related Questions:

Attachments: