HomeAdd Ons Review: Spell App Success with SpellServer.NET
Review: Spell App Success with SpellServer.NET ByJim Mischel 2004-05-28
Article Rating: / 0
Rate This Article:
Add This Article To:
Need to add spell-checking to your .NET programs? SpellServer sure makes it easier and faster than designing the functionality yourself. Plus, it has a lot more features than you'd expect for its ever-so-reasonable price.
Jim Mischel
Chado Software's SpellServer.NET is a .NET assembly that provides spell-checking capability to .NET programs. Although originally designed for use in ASP.NET applications, you can use it
from any .NET assembly.
ADVERTISEMENT
SpellServer consists of a single DLL, the dictionary (about 133,000 words), and a simple example application. Installation is a simple matter of running the download executable (approximately 2MB). With the registered version, you're asked to enter your
company name so that the program can generate a license key. When you use the licensed version, you need to include a line in your code that sets the SpellServerNet.CompanyName property to the value that you entered when you generated the license key. If you don't do so, the DLL will function like the unregistered version and treat all words that begin with 'Q' as misspellings.
Installation creates the "Chado SpellServer.NET" directory under Program Files, which contains the SpellServer.NET.dll file and the dictionaries for the supported languages. This directory also includes the documentation, example code, and a performance tester application. The installation program also adds the demo applications to your \inetpub directory. There is an option to select the install directory, but there is no option to prevent the addition of the examples to the \inetpub directory. You should use the installation program to install on your development machine only. When it comes time to deploy to your production server, you just copy the SpellServer.net.dll file and the dictionary.
You'll learn a lot by looking at the sample program. The example application, supplied in Visual Basic.NET and C# versions, consists of three pages: InitialPage.aspx describes the application and allows you to enter text that will be checked by the second page, correct.aspx. Correct.aspx is an interactive page that displays each misspelling in context and allows you to correct it. When you are done correcting the spelling, the final page, finish.aspx, is displayed.
All of the spell checking logic is handled by correct.aspx. Copious comments in the code show how to create and interact with the ChadoSpellServer object. Comments explain how to use correct.aspx as part of your application, and how to customize the
code if you want to change the way that it works. This module is a huge bonus; you can add spell checking to your Web application in well under an hour by including this pre-written module.
The SpellServer.NET assembly contains a single class, ChadoSpellServer, with just a handful of methods and properties. Even so, the class provides full-featured spell checking capability. Primary spell checking functionality is provided by three methods whose names describe their functions quite well: GetNextMisspelling, IgnoreWord, and ChangeWord. Properties let you specify whether certain types of words are ignored: those that are
in all caps or contain numbers, HTML codes, and Internet addresses. You also can choose to ignore case. Other methods let you manage the custom dictionary: add words, remove words, or clear the dictionary. You also can temporarily remove words from the base dictionary. This comes in handy if you want to ensure that potentially offensive words are flagged as misspellings.
The documentation, which also is available online, consists of just a few Web pages that provide an overview of the software, show how to run the sample programs and how to integrate correct.aspx into your applications. There also are small sections on deployment and technical support, and a detailed class reference rounds out the documentation.
I was able to integrate the correct.aspx file into my own application with a minimum of effort, and it ran flawlessly in my tests. It took a little more effort to create a Windows Forms sample application, but only because I had to separate the SpellServer code from the Web form and integrate it into my application. But when I was finished I had a nice little Windows
Form that provided the same spell checking functionality as the supplied correct.aspx.
All things considered, I found SpellServer.NET to be a well-designed and very useful package. Considering the difficulty of writing your own spell checker, the $350 single-server license is very reasonable. I would recommend this package to anybody who needs to add spell checking to a .NET application.