> For the complete documentation index, see [llms.txt](https://sacro.gitbook.io/syllabore/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sacro.gitbook.io/syllabore/class-docs/syllablegenerator.md).

# SyllableGenerator

Generates syllables that can be sequenced into names.

*Implements:* [*ISyllableGenerator*](/syllabore/class-docs/isyllablegenerator.md)*, Archigen.IGenerator\<System.String>,* [*IRandomizable*](/syllabore/class-docs/irandomizable.md)

## Constructors

| Constructor         | Description                                                                                                   |
| ------------------- | ------------------------------------------------------------------------------------------------------------- |
| SyllableGenerator() | Instantiates a new [SyllableGenerator](/syllabore/class-docs/syllablegenerator.md) with no symbol generators. |

## Methods

| Method                                                                                                                                         | Returns                                                           | Description                                                                                                                                                |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Add([SymbolPosition](/syllabore/class-docs/symbolposition.md) position, System.String symbols)                                                 | [SyllableGenerator](/syllabore/class-docs/syllablegenerator.md)   | Adds symbols to the specified position. Each character in the string is considered a separate symbol.                                                      |
| Add([SymbolPosition](/syllabore/class-docs/symbolposition.md) position, [SymbolGenerator](/syllabore/class-docs/symbolgenerator.md) generator) | [SyllableGenerator](/syllabore/class-docs/syllablegenerator.md)   | Adds a [SymbolGenerator](/syllabore/class-docs/symbolgenerator.md). The generator's symbols will only be used for the specified position.                  |
| Copy()                                                                                                                                         | [ISyllableGenerator](/syllabore/class-docs/isyllablegenerator.md) | Creates a deep copy of this [SyllableGenerator](/syllabore/class-docs/syllablegenerator.md) excluding internal instances of *System.Random*.               |
| Next()                                                                                                                                         | System.String                                                     | Generates a new syllable and returns it as a string.                                                                                                       |
| SetChance([SymbolPosition](/syllabore/class-docs/symbolposition.md) position, System.Double chance)                                            | [SyllableGenerator](/syllabore/class-docs/syllablegenerator.md)   | Sets the probability of generating a symbol for the specified position. The default value is 1.0 (100% probability) unless changed by calling this method. |

## Properties

| Property         | Type                                                                                                                                                                                            | Description                                                                                                                                            |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| PositionChance   | System.Collections.Generic.Dictionary <[SymbolPosition](/syllabore/class-docs/symbolposition.md),System.Double>                                                                                 | The probability of generating a symbol for a given position. The default value is 1.0 (100%) for each position as long as there are symbols available. |
| Random           | System.Random                                                                                                                                                                                   | The instance of *System.Random* used to simulate randomness.                                                                                           |
| SymbolGenerators | System.Collections.Generic.Dictionary <[SymbolPosition](/syllabore/class-docs/symbolposition.md),System.Collections.Generic.List <[SymbolGenerator](/syllabore/class-docs/symbolgenerator.md)>> | The symbol generators used to create new syllables.                                                                                                    |
