Class TextAugmentationSettings
- Namespace
- AiDotNet.Augmentation
- Assembly
- AiDotNet.dll
Text-specific augmentation settings with industry-standard defaults.
public class TextAugmentationSettings
- Inheritance
-
TextAugmentationSettings
- Inherited Members
Remarks
For Beginners: These settings control how text data is augmented. Defaults are based on best practices from nlpaug and TextAttack.
Properties
DeletionRate
Gets or sets the fraction of words to delete.
public double DeletionRate { get; set; }
Property Value
Remarks
Default: 0.1 (10% of words)
EnableBackTranslation
Gets or sets whether back-translation is enabled.
public bool EnableBackTranslation { get; set; }
Property Value
Remarks
Default: false (requires external translation service)
Translates text to another language and back for paraphrasing.
EnableRandomDeletion
Gets or sets whether random deletion is enabled.
public bool EnableRandomDeletion { get; set; }
Property Value
Remarks
Default: true
Randomly deletes words from the text.
EnableRandomInsertion
Gets or sets whether random insertion is enabled.
public bool EnableRandomInsertion { get; set; }
Property Value
Remarks
Default: false
Randomly inserts synonyms of random words.
EnableRandomSwap
Gets or sets whether random swap is enabled.
public bool EnableRandomSwap { get; set; }
Property Value
Remarks
Default: true
Randomly swaps the positions of two words.
EnableSynonymReplacement
Gets or sets whether synonym replacement is enabled.
public bool EnableSynonymReplacement { get; set; }
Property Value
Remarks
Default: true
Replaces words with their synonyms.
InsertionRate
Gets or sets the fraction of words to insert.
public double InsertionRate { get; set; }
Property Value
Remarks
Default: 0.1 (10% of original length)
NumSwaps
Gets or sets the number of word swaps to perform.
public int NumSwaps { get; set; }
Property Value
Remarks
Default: 2
SynonymReplacementRate
Gets or sets the fraction of words to replace with synonyms.
public double SynonymReplacementRate { get; set; }
Property Value
Remarks
Default: 0.1 (10% of words)
Methods
GetConfiguration()
Gets the configuration as a dictionary.
public IDictionary<string, object> GetConfiguration()