Back to Devexpress

SpellCheckerBase.GetSuggestions(String, CultureInfo) Method

corelibraries-devexpress-dot-xtraspellchecker-dot-spellcheckerbase-dot-getsuggestions-x28-system-dot-string-system-dot-globalization-dot-cultureinfo-x29.md

latest2.5 KB
Original Source

SpellCheckerBase.GetSuggestions(String, CultureInfo) Method

Gets suggested words to replace a specified word.

Namespace : DevExpress.XtraSpellChecker

Assembly : DevExpress.SpellChecker.v25.2.Core.dll

NuGet Package : DevExpress.SpellChecker.Core

Declaration

csharp
public virtual SuggestionCollection GetSuggestions(
    string word,
    CultureInfo culture
)
vb
Public Overridable Function GetSuggestions(
    word As String,
    culture As CultureInfo
) As SuggestionCollection

Parameters

NameTypeDescription
wordString

A string that is the word for which corrections are suggested by the spellchecker.

| | culture | CultureInfo |

A CultureInfo object specifying the culture, ensuring that the proper dictionaries are loaded.

|

Returns

TypeDescription
SuggestionCollection

A SuggestionCollection containing words from the dictionary that are suggested replacements.

|

Remarks

This method creates new suggestions for the given word, using the dictionaries for the specified culture. The suggestion list is sorted, and items with a Levenshtein distance greater than the SpellCheckerBase.LevenshteinDistance property value are excluded from the list. A new SuggestionCollection object containing the remaining suggestions is the result returned by this method.

See Also

SpellCheckerBase Class

SpellCheckerBase Members

DevExpress.XtraSpellChecker Namespace