RandomInsertion<T>
Models & Types · AiDotNet.Augmentation.Text
Randomly inserts synonyms of existing words into the text.
Inheritance: AugmentationBase<T, string[]> → TextAugmenterBase<T> → RandomInsertion<T>
For Beginners
Random insertion adds new words to the text based on synonyms of existing words. For example, “I love programming” might become “I love really programming” if “really” is considered related to context.
How It Works
When to use:
- Text classification tasks
- Training data expansion
- Making models robust to longer text variations
Constructors
| Constructor | Summary |
|---|---|
RandomInsertion(int numInsertions, double probability, string languageCode) |
Creates a new random insertion augmentation. |
Properties
| Property | Summary |
|---|---|
Dictionary<string, string[]> CustomInsertionWords { get; set; } |
Gets or sets custom words for insertion. |
int NumInsertions { get; } |
Gets the number of insertions to perform. |
Methods
| Method | Summary |
|---|---|
IDictionary<string, object> GetParameters() |