SpellServer.NET Reference Documentation

Methods



GetNextMisspelling

Finds the next misspelling in the current string, and returns the misspelled word, it's location, and a list of suggested replacements.
[Visual Basic]
Public Function GetNextMisspelling (_
  ByRef sSuggestions As String, _
  ByRef nErrorFoundAt As Integer _
) As String
[C#]
public string GetNextMisspelling (
  ref string sSuggestions,
  ref int nErrorFoundAt
);
Parameters
sSuggestions
A string containing a list of suggestions for the misspelled word, separated by character 13 (carriage return).
nErrorFoundAt
The numeric offset from the start of the string that the mispelled word was found at.
Return Value

A string containing the misspelled word.  Returns an empty string if there are no further misspellings in the string.

Remarks

This function checks the current string (set by the StringToCheck property) starting at the current point (set by the StartCheckingAt property) and returns the next misspelled word in the string.  If there are no further misspellings, then an empty string is returned.









ChangeWord

Two possible functions: Change the currently misspelled word to another word, or change all subsequent occurances of the currently misspelled word to another word, from the current point to the end of the string.
[Visual Basic]
Public Sub ChangeWord (_
  ByVal sBadWord As String, _
  ByVal sNewWord As String, _
  ByVal bChangeAll As Boolean
)
[C#]
public void ChangeWord(
  string sBadWord,
  string sNewWord,
  bool bChangeAll
);
Parameters
sBadWord
A string containing the misspelled word.
sNewWord
A string containing the value that the misspelled word should be replaced with.
bChangeAll
A boolean indicating if all occurances of the misspelled word should be replaced with the new word.
Remarks

Depending on the value of the bChangeAll parameter, this routine will change either the currently misspelled word with a new word, or the currently misspelled word and all subsequent occurances of that word from the current point to the end of the current string.









IgnoreWord

Two possible functions: Ignore the currently misspelled word, or ignore all subsequent occurances of the currently misspelled word, from the current point to the end of the string.
[Visual Basic]
Public Sub IgnoreWord (_
  ByVal sWord As String, _
  ByVal bIgnoreAll As Boolean
)
[C#]
public void IgnoreWord(
  string sWord,
  bool bIgnoreAll
);
Parameters
sWord
A string containing the misspelled word.
bIgnoreAll
A boolean indicating if all occurances of the misspelled word should be ignored when they are encountered in the future.
Remarks

This routine will skip past the misspelled word and continue checking immediately after it.  If the bIgnoreAll parameter is set to True, this routine will add this word to it's Ignore-All list of words, and all subsequent occurances of this word will be ignored during checking.

See Also

IgnoreAllWords









AddWordsToCustomDict

Adds words to the custom dictionary.
[Visual Basic]
Public Sub AddWordsToCustomDict (_
  ByVal sWords As String
)
[C#]
public void AddWordsToCustomDict(
  string sWords
);
Parameters
sWords
A string containing one or more words to add to the custom dictionary, separated by blanks or other white space.
Remarks

During spell checking, add words are checked against the standard base dictionary.  If a word is not found in this dictionary, then the Ignore-All list and the custom dictionary are searched.

When adding words to the custom dictionary, be sure to capitalize words that must be capitalized (like "Michigan"), but leave all other words lower case (like "house").

See Also

ClearCustomDictionary   | CustomDictionaryWords









RemoveWordsFromDictionary

Removes words from the base and custom dictionaries.
[Visual Basic]
Public Sub RemoveWordsFromDictionary (_
  ByVal sWords As String
)
[C#]
public void RemoveWordsFromDictionary(
  string sWords
);
Parameters
sWords
A string containing one or more words to be removed, separated by blanks or other white space.
Remarks

This function removes all occurances of the specified words from both the base dictionary and the custom dictionary.  The removal is case-insensitive, so if you specify that you wish "michigan" to be removed, the word "Michigan" will be removed (in this case, from the base dictionary).









ClearCustomDictionary

Empties the custom dictionary.
[Visual Basic]
Public Sub ClearCustomDictionary ()
[C#]
public void ClearCustomDictionary();
Remarks

This function can be used to ensure that the custom dictionary is clear.  The custom dictionary is initialized as empty, so there is no need to call this function during normal initialization.

See Also

ClearBaseDictionary   | ClearIgnoreAll









ClearBaseDictionary

Empties the base dictionary.
[Visual Basic]
Public Sub ClearBaseDictionary ()
[C#]
public void ClearBaseDictionary();
Remarks

This function can be used to clear the base dictionary.  The primary reason to do this would be if you wished to use only a custom dictionary, with no other words during the checking process.

See Also

ClearCustomDictionary   | ClearIgnoreAll









ClearIgnoreAll

Empties the Ignore-All list of words.
[Visual Basic]
Public Sub ClearIgnoreAll ()
[C#]
public void ClearIgnoreAll();
Remarks

This function can be used to ensure that the Ignore-All list is clear.  The Ignore-All list is initialized as empty, so there is no need to call this function during normal initialization.

See Also

ClearCustomDictionary   | ClearBaseDictionary








Properties



CompanyName

Sets the string indicating the company name.  Set this value to load in all words that start with "Q" in the retail version.
[Visual Basic]
Public WriteOnly Property CompanyName As String
[C#]
public string CompanyName {set;}
Property Value

A string indicating the name of your company.

Remarks

Setting this property loads in all words starting with the letter Q.  Note that when you install the retail version of SpellServer.NET, a Company Name is prompted for.  The value you entered during installation is used to create SpellServerUS.dat (and DAT files for UK English, French, and Spanish), which contains the Q words.  You must set the CompanyName property to match the value you entered during installation.

If you are using a dictionary other than US English, be sure to set the Language property before setting the CompanyName property.









Language

Sets the language used to check spelling.
[Visual Basic]
Public Property Language As String
[C#]
public string Language {get; set;}
Property Value

"US" for US English (the default).
"UK" for UK English.
"FR" for French.
"SP" for Spanish.

Remarks

Set this property to specify the language used to check spelling.  Note that each language has it's own Base Dictionary file (with a BDC extension), which must be located in the same bin folder as the SpellServer DLL.   The names of these files are SpellServerUS.bdc, SpellServerUK.bdc, SpellServerFR.bdc, and SpellServerSP.bdc.










StringToCheck

Gets or sets the value of the string to be spell-checked.
[Visual Basic]
Public Property StringToCheck As String
[C#]
public string StringToCheck {get; set;}
Property Value

The string currently being spell-checked.

Remarks

This property gives you access to the string that is currently being spell-checked.  The string is stored in an internal buffer, and can be modified by the ChangeWord function.









StartCheckingAt

Gets or sets the value of the current starting point for the string to be spell-checked.
[Visual Basic]
Public Property StartCheckingAt As Integer
[C#]
public int StartCheckingAt {get; set;}
Property Value

The offset into the string to be checked.

Remarks

This property gives you access to the current starting point for spell-checking.  SpellServer will modify this value in response to calling IgnoreWord, ChangeWord, or GetNextMisspelling.  Changing the value of StringToCheck will reset this value to 0, so be sure to set StringToCheck before you set StartCheckingAt.









CustomDictionaryWords

Gets or sets the value of the entire custom dictionary.
[Visual Basic]
Public Property CustomDictionaryWords As String
[C#]
public string CustomDictionaryWords {get; set;}
Property Value

A sequence of words, separated by blanks or other white space.

Remarks

This property allows you to either retrieve or change the value of the entire custom dictionary in a single step.  When setting this value, the entire custom dictionary will be replaced with the string.  If you wish to append words to the current custom dictionary (rather than replace the dictionary), use the AddWordsToCustomDict method.









IgnoreAllWords

Gets or sets the value of the entire Ignore-All list.
[Visual Basic]
Public Property IgnoreAllWords As String
[C#]
public string IgnoreAllWords {get; set;}
Property Value

A sequence of words, separated by blanks or other white space.

Remarks

This property allows you to either retrieve or change the value of the entire Ignore-All list in a single step.  When setting this value, the entire Ignore-All list will be replaced with the string.  If you wish to append words to the Ignore-All list (rather than replace it), use the IgnoreWord method.









VersionInfo

Gets the version information string, which includes the word count for the base dictionary.
[Visual Basic]
Public ReadOnly Property VersionInfo As String
[C#]
public string VersionInfo {get;}
Property Value

A string that specifies the current version of SpellServer.NET.

Remarks

This read-only property returns the current version information of SpellServer.NET.  Additionally, the number of words currently stored in the base dictionary is also returned.









IgnoreCase

Gets or sets the value of the option that controls how the spell-checking process treats the case of words.
[Visual Basic]
Public Property IgnoreCase As Boolean
[C#]
public bool IgnoreCase {get; set;}
Property Value

True if the checking should ignore the case of words it checks; otherwise, false. The default is true.

Remarks

Typically this option will be true, to handle different cases of words.  Note that SpellServer always handles words that are initially capitalized.  This property is designed for use for words that may be in ALL CAPS, or that have UnUsUal cApITAlization.  Performance is slightly faster when this property is set to true.









IgnoreAllCaps

Gets or sets the value of the option that controls whether the spell-checking process ignores words that are ALL CAPS.
[Visual Basic]
Public Property IgnoreAllCaps As Boolean
[C#]
public bool IgnoreAllCaps {get; set;}
Property Value

True if the checking should ignore (i.e., not spell-check) words that are ALL CAPS; otherwise, false. The default is false.

Remarks

Often, words in ALL CAPS are acronyms (like "NAFTA"), and should be ignored during the spell-checking process.  However, the default is false since some people will type in all of their text in all caps, and setting this value to true would cause SpellServer to ignore all of their text. 









IgnoreHTML

Gets or sets the value of the option that controls whether the spell-checking process ignores words that seem to be HTML tags or special characters.
[Visual Basic]
Public Property IgnoreHTML As Boolean
[C#]
public bool IgnoreHTML {get; set;}
Property Value

True if the checking should ignore (i.e., not spell-check) words that appear to be HTML tags or special characters (like " "); otherwise, false. The default is true.

Remarks

If you know that the text you are checking will not include any HTML tags or special characters, you may wish to set this property to false for increased accuracy during checking.  Note that SpellServer does not keep detailed information about whether it is inside certain tag blocks (like "<SCRIPT>"), and will continue to check the spelling of words inside of complex tags, regardless of the setting of this property.









IgnoreInternetAddrs

Gets or sets the value of the option that controls whether the spell-checking process ignores words that seem to be e-mail addresses or web page URLs.
[Visual Basic]
Public Property IgnoreInternetAddrs As Boolean
[C#]
public bool IgnoreInternetAddrs {get; set;}
Property Value

True if the checking should ignore (i.e., not spell-check) words that appear to be URLs or e-mail addresses; otherwise, false. The default is true.

Remarks

Typically this value will be true.  If you know that the text you are checking will never contain any URLs or e-mail addresses, you may wish to set this property to false for greater spell-checking accuracy.









IgnoreWithNumbers

Gets or sets the value of the option that controls whether the spell-checking process ignores words that have numeric digits in them.
[Visual Basic]
Public Property IgnoreWithNumbers As Boolean
[C#]
public bool IgnoreWithNumbers {get; set;}
Property Value

True if the checking should ignore (i.e., not spell-check) words that have embedded digits; otherwise, false. The default is true.

Remarks

Typically this value will be true.  If you wish to have greater spell-checking accuracy, you may wish to set it to false.