# TXSpellChecker.CreateSynonyms Method

> Returns groups of synonyms that represent equivalent expressions for a specific text. The first implementation uses selected synonym lists of the SynonymListCollection at TXSpellChecker.SynonymLists. The second implementation uses selected synonym lists of the TXSpellChecker.SynonymLists collection and the default synonym lists folder where the synonym list's language equals to the defined language parameter. The last overload creates synonym groups for a specific synonym list. Only those synonym lists are used whose SynonymList.IsCreateSynonymsEnabled properties are set to true.

- **Product:** TX Spell .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 7.0
- **Namespace:** `TXTextControl.Proofing`
- **Package:** `TXTextControl.TXSpell.WinForms.SDK` (assembly `TXSpell.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXSpell.Windows.Forms.dll` from the setup
- **Path:** TX Spell .NET for Windows Forms > Reference > TXTextControl.Proofing > TXSpellChecker.CreateSynonyms Method
- **1525 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/createsynonyms-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/createsynonyms-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/createsynonyms-method/llms-full.txt

---

### Description

Returns [groups](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/synonymgroup/llms-full.txt) of [synonyms](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/synonym/llms-full.txt) that represent equivalent expressions for a specific text. The first implementation uses [selected](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/synonymlist/isselectedasdefault-property/llms-full.txt) [synonym lists](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/synonymlist/llms-full.txt) of the [SynonymListCollection](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/synonymlistcollection/llms-full.txt) at [TXSpellChecker.SynonymLists](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/synonymlists-property/llms-full.txt). The second implementation uses selected synonym lists of the TXSpellChecker.SynonymLists collection and the default synonym lists folder where the [synonym list's language](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/synonymlist/language-property/llms-full.txt) equals to the defined language parameter. The last overload creates synonym groups for a specific synonym list. Only those [synonym lists](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/synonymlists-property/llms-full.txt) are used whose [SynonymList.IsCreateSynonymsEnabled](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/synonymlist/iscreatesynonymsenabled-property/llms-full.txt) properties are set to true.

### Syntax

#### CreateSynonyms(string)

Returns synonyms for a specific text using the [selected](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/synonymlist/isselectedasdefault-property/llms-full.txt) [synonym lists](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/synonymlist/llms-full.txt) of the [SynonymListCollection](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/synonymlistcollection/llms-full.txt) at the [TXSpellChecker.SynonymLists](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/synonymlists-property/llms-full.txt).

```csharp
public SynonymGroup[] CreateSynonyms(string text);
```

```vbnet
Public Function CreateSynonyms(text As String) As SynonymGroup()
```

| Parameter | Description |
|---|---|
| text | Specifies the text that has to be determined for synonyms. |

#### CreateSynonyms(string, CultureInfo)

Returns synonyms for a specific text using the [selected](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/synonymlist/isselectedasdefault-property/llms-full.txt) [synonym lists](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/synonymlist/llms-full.txt) of the [SynonymListCollection](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/synonymlistcollection/llms-full.txt) at the [TXSpellChecker.SynonymLists](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/synonymlists-property/llms-full.txt) and the default synonym lists folder where the [synonym list's language](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/synonymlist/language-property/llms-full.txt) equals to the defined language parameter.

```csharp
public SynonymGroup[] CreateSynonyms(string text, CultureInfo language);
```

```vbnet
Public Function CreateSynonyms(text As String, language As CultureInfo) As SynonymGroup()
```

| Parameter | Description |
|---|---|
| text | Specifies the text that has to be determined for synonyms. |
| language | The language that is used to create synonyms for the specified text. |

#### CreateSynonyms(string, SynonymList)

Returns synonyms for a specific text using a specific [SynonymList](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/synonymlist/llms-full.txt).

```csharp
public SynonymGroup[] CreateSynonyms(string text, SynonymList synonymList);
```

```vbnet
Public Function CreateSynonyms(text As String, synonymList As SynonymList) As SynonymGroup()
```

| Parameter | Description |
|---|---|
| text | Specifies the text that has to be determined for synonyms. |
| synonymList | The synonymList that is used to create synonyms for the specified text. |

### Examples

The following example uses Create Synonyms in a focused TXSpell Checker workflow.

```csharp
TXTextControl.Proofing.SynonymGroup[] results = tXSpellChecker.CreateSynonyms("Quarterly results", System.Globalization.CultureInfo.GetCultureInfo("en-US"));
foreach (TXTextControl.Proofing.SynonymGroup synonymGroup in results)
{
    Console.WriteLine(synonymGroup);
}
```

```vbnet
Dim results As TXTextControl.Proofing.SynonymGroup() = tXSpellChecker.CreateSynonyms("Quarterly results", System.Globalization.CultureInfo.GetCultureInfo("en-US"))
For Each synonymGroup As TXTextControl.Proofing.SynonymGroup In results
    Console.WriteLine(synonymGroup)
Next
```

---

## Nearby

- **Previous:** [TXSpellChecker.CreateSuggestions Method](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/createsuggestions-method/llms-full.txt)
- **Next:** [TXSpellChecker.DetectableLanguageScopes Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/detectablelanguagescopes-property/llms-full.txt)
