A class providing behind-the-scenes spell checking results and suggestions.
CaseSensitive | bool | false | Consider CaSe MIStakeS as spelling errors |
DictionaryPath | string | "dictionaries/" | Sets a base local path. All methods that access files (have a filePath property) will be relative to this path unless a complete (C:\) file path is given. |
IgnoreAllCaps | bool | true | Considers words in BLOCK CAPITAL LETTERS to be spelled correctly |
IgnoreNumeric | bool | true | Considers words with numb3r5 in them to be spelled correctly |
LicenceKey | string | "" | Registered License Key for the use of ASPNetSpell in your application. |
SuggestionTollerance | int | 1 | Sets a cutoff point for spelling suggestion improbability. The higher the suggestion tolerance - the more suggestions will be given. |
AddBannedWords(string[] wordList) | void | Words in wordlist will always be considered spelling errors - even if they are in a dictionary. This is useful for blocking inappropriate acronyms and profanity. |
BuildDictionary(string[] wordList, string cacheId = "") | string | Builds a ASpNetSpell dictionary (.dic format) from an array of words. If cacheId is set - the dictionary is loaded into the SpellChecker immediately. Otherwise the dictionary is returned as a string. |
BuildCommonTypos(string[] CTEentries) | void | Builds a list of common typing mistakes that fine tune spellchecker performance.
Entries are in the format "teh-->the". |
BuildEnforcedCorrections(string[] ECEentries) | void | Builds a list of enforced corrections which override existing suggestions algorithms for given words.
Entries are in the format "aspnetspell-->ASPNetSpell||ASP.Net Spell". |
CorrectCase(string word, bool capitalized) | string | Returns word in the correct case as seen in the dictionary. If capitalized is true then the returned word will be capitalized. |
DidYouMean(string phrase) | string | Returns the a search engine style spelling suggestion for an entire phrase. |
ErrorTypeWord (string word) | char | Returns an error type for any misspelled word:
|
ListDictionaries() | string[] | Returns an array of all of the ASPNetSpell .dic dictionaries installed in your DictionaryPath folder. |
ListLiveDictionaries() | List<string> | Returns a list of all dictionaries currently loaded into the SpellChecker's memory. |
LoadCustomBannedWords( string filePath ) | void | Words in the file specified (1 per line) will always be considered spelling errors - even if they are in a dictionary. This is useful for blocking inappropriate acronyms and profanity. |
LoadCustomDictionary( string filePath ) | void | Words in the file specified (1 per line) will always be added to the SpellChecker's vocabulary. This allows non compiled text files to be used as dictionaries. |
LoadCustomDictionaryFromURL( string filePath ) | void | As LoadCustomDictionary, but words are fetched from a URL |
LoadCommonTypos( string filePath ) | void | Loads a file of common typing mistakes that fine tune spellchecker performance.
Entries are in the format "teh-->the", 1 per line. |
LoadCommonTypos( string dictionaryName ) | string | Loads an ASPNetSpell .dic dictionaries installed in your DictionaryPath folder into memory. Use the name of the dictionary without the ".dic" at the end. |
LoadUserDictionary( string[] wordList ) | string | Loads a list of words into to the SpellChecker's vocabulary. these words are cached at user level - rather than application level. |
LoadUserDictionary( string[] wordList ) | string | Loads a list of words into to the SpellChecker's vocabulary. Words are cached at user level - rather than application level. |
LoadEnforcedCorrections (string filePath) | void | Loads a file of enforced corrections which override existing suggestions algorithms for given words.
Entries are in the format "aspnetspell-->ASPNetSpell||ASP.Net Spell", 1 per line. |
SpellCheckWord (string word) | bool | Is the word found in any loaded dictionary. Banned words will always return false. |
Suggestions( string word ) | string[] | Array of spelling suggestions for word. This is returned using phonetics, string distance and fuzzy logic. |
TokenizeString( string phrase ) | string[] | Turns any string into an array of tokens. Each token is a distinct word, or a block of punctuation. |