CreateSuggestions Method
- Namespace
TXTextControl.Proofing
- Package
TXTextControl.asTXSpell. WPF. SDK TXSpell.from the private NuGet feed or Text Control Offline Packagesdll
- Also in
TXTextControl.asTXSpell. Core. SDK TXSpell.dll
Description
Determines suggestions for a specific incorrect word by using selected dictionaries of the DictionaryCollection at TXSpell.Dictionaries and fills the results into the SuggestionCollection at TXSpell.Suggestions. If no maximum number of suggestions is set, all created suggestions are added into TXSpell.Suggestions. Otherwise, only the first maximum number of suggestions are determined. The second and fourth implementation uses selected dictionaries of the TXSpell.Dictionaries DictionaryCollection and the default dictionary folder where the dictionary's language equals to the defined language parameter. Only those dictionaries are used where the Dictionary.IsGetSuggestionsEnabled property is set to true.
Syntax
CreateSuggestions(string)
Determines suggestions for a specific incorrect word.
public void CreateSuggestions(string incorrectWord);Public Sub CreateSuggestions(incorrectWord As String)| Parameter | Description |
|---|---|
| incorrectWord | Specifies the incorrect word that has to be determined for suggestions. |
CreateSuggestions(string, CultureInfo)
Determines suggestions for a specific incorrect word using selected dictionaries of the TXSpell.Dictionaries DictionaryCollection and the default dictionary folder where the dictionary's language equals to the defined language parameter.
public void CreateSuggestions(string incorrectWord, CultureInfo language);Public Sub CreateSuggestions(incorrectWord As String, language As CultureInfo)| Parameter | Description |
|---|---|
| incorrectWord | Specifies the incorrect word that has to be determined for suggestions. |
| language | The language that is used to create suggestions for the specified incorrect word. |
CreateSuggestions(string, int)
Determines a maximum number of suggestions for a specific incorrect word.
public void CreateSuggestions(string incorrectWord, int max);Public Sub CreateSuggestions(incorrectWord As String, max As Integer)| Parameter | Description |
|---|---|
| incorrectWord | Specifies the incorrect word that has to be determined for suggestions. |
| max | Specifies the maximum number of suggestions that has to be determined. |
CreateSuggestions(string, int, CultureInfo)
Determines a maximum number of suggestions for a specific incorrect word using selected dictionaries of the TXSpell.Dictionaries DictionaryCollection and the default dictionary folder where the dictionary's language equals to the defined language parameter.
public void CreateSuggestions(string incorrectWord, int max, CultureInfo language);Public Sub CreateSuggestions(incorrectWord As String, max As Integer, language As CultureInfo)| Parameter | Description |
|---|---|
| incorrectWord | Specifies the incorrect word that has to be determined for suggestions. |
| max | Specifies the maximum number of suggestions that has to be determined. |
| language | The language that is used to create suggestions for the specified incorrect word. |
Examples
The following example uses Create Suggestions in a focused TXSpell workflow. The created object is then available to the surrounding document workflow.
tXSpell.CreateSuggestions("Quarterly report", System.Globalization.CultureInfo.GetCultureInfo("en-US"));
Console.WriteLine("TXSpell is ready for use.");tXSpell.CreateSuggestions("Quarterly report", System.Globalization.CultureInfo.GetCultureInfo("en-US"))
Console.WriteLine("TXSpell is ready for use.")