DocumentSpellChecker
Represents a spell checker for documents that utilizes Telerik's proofing framework. This class provides functionality to check the spelling of words within a document and suggests corrections for any misspelled words.
Definition
Namespace:Telerik.Windows.Documents.Proofing
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public class DocumentSpellChecker : ISpellChecker
Inheritance: objectDocumentSpellChecker
Implements:
Constructors
public DocumentSpellChecker()
public DocumentSpellChecker(ICustomWordDictionary customDictionary)
Fields
public static readonly int EditDistanceCoefficient
public static readonly int EditDistanceLimit
public static readonly int EditDistanceOneBoost
public static readonly int EditDistanceScanLimit
public static readonly int EndsDifferencePenalty
public static readonly int MaxNumberOfSuggestions
public static readonly int MetaphoneEqualBoost
Properties
Gets or sets a value indicating whether MEF should be used to load default dictionaries.
public bool AutomaticallyLoadDefaultDictionaries { get; set; }
true if default dictionaries should be loaded automatically; otherwise, false.
Represents the settings for the DocumentSpellChecker in the Telerik.Windows.Documents.Proofing namespace.
public SpellCheckerSettings Settings { get; set; }
Implements:
Gets or sets the culture used for spell checking in the document.
public CultureInfo SpellCheckingCulture { get; set; }
The culture information that determines the language for spell checking.
Implements:
Methods
Adds a custom dictionary with the specified culture to the spell checker. If a dictionary with this culture already exists, it is overwritten.
public void AddCustomDictionary(ICustomWordDictionary customDictionary, CultureInfo culture)
Adds a lazily initialized dictionary with the specified culture to the spell checker. If a dictionary with this culture already exists, it is overwritten.
public void AddDictionary(IWordDictionary dictionary, CultureInfo culture)
Adds a custom word to the spell checker's dictionary for the specified culture.
public void AddWord(string word, CultureInfo culture)
The word to be added to the dictionary.
cultureCultureInfoThe culture information for which the word should be recognized.
Implements:
Adds a specified word to the dictionary of the spell checker.
public void AddWord(string word)
The word to be added to the spell checker dictionary.
Implements:
Determines whether a word can be added to the spell checker dictionary.
public bool CanAddWord()
A boolean value indicating if the word can be added. Returns true if the word can be added; otherwise, false.
Implements:
Determines whether a word can be added to the spell checker dictionary for the specified culture.
public bool CanAddWord(CultureInfo culture)
The culture information that specifies the language for the spell checker.
Returns:true if the word can be added; otherwise, false.
Implements:
Checks if the specified word is spelled correctly according to the current dictionary.
public bool CheckWordIsCorrect(string word, CultureInfo culture)
The word to be checked for spelling accuracy.
cultureCultureInfoThe culture information that specifies the language of the dictionary used for checking.
Returns:True if the word is spelled correctly; otherwise, false.
Implements:
Checks if the specified word is spelled correctly.
Retrieves the custom dictionary used by the document spell checker.
public ICustomWordDictionary GetCustomDictionary()
A CustomDictionary object representing the custom dictionary.
Implements:
Retrieves a custom dictionary associated with the specified culture information.
public ICustomWordDictionary GetCustomDictionary(CultureInfo culture)
A custom dictionary object corresponding to the specified culture, or null if no custom dictionary exists.
Implements:
Retrieves the spell-checking dictionary used by the DocumentSpellChecker.
public IWordDictionary GetDictionary()
The spell-checking dictionary as an object of type T.
Implements:
Retrieves the spell-checking dictionary for the specified culture.
public IWordDictionary GetDictionary(CultureInfo culture)
The culture information for which the dictionary is to be retrieved.
Returns:A dictionary object containing the spell-checking entries for the specified culture.
Implements:
Retrieves a list of spelling suggestions for the specified word based on the provided culture information.
public ICollection<string> GetSuggestions(string word, CultureInfo culture)
The word for which to retrieve spelling suggestions.
cultureCultureInfoThe culture information that influences the spelling suggestions.
Returns:A collection of suggestions for the specified word.
Implements:
Retrieves a list of spelling suggestions for the specified word.
public ICollection<string> GetSuggestions(string word)
The word for which to generate spelling suggestions.
Returns:A collection of suggested corrections for the specified word.
Implements:
Removes the custom dictionary with the specified culture from the spell checker. This method returns false if no such dictionary is found.
Removes the dictionary with the specified culture from the spell checker. This method returns false if no such dictionary is found.
Removes a specified word from the spell check dictionary for the current culture.
public void RemoveWord(string word, CultureInfo culture)
The word to be removed from the dictionary.
cultureCultureInfoThe culture information that specifies the language of the word.
Implements:
Removes a specified word from the spell checker dictionary.
public void RemoveWord(string word)
The word to be removed from the dictionary.
Implements:
Events
public event EventHandler DataChanged
Implements: