TextAugmenterBase<T>

Base Classes ยท AiDotNet.Augmentation.Text

Base class for text data augmentations.

Inheritance: AugmentationBase<T, string[]> โ†’ TextAugmenterBase<T>

Known derived types: RandomDeletion<T>, RandomInsertion<T>, RandomSwap<T>, SynonymReplacement<T>

For Beginners

Text augmentation creates variations of text to improve model robustness to different phrasings and writing styles. Common techniques include:

  • Synonym replacement (replacing words with similar meanings)
  • Random deletion (removing random words)
  • Random swap (swapping word positions)
  • Random insertion (adding synonyms of random words)
  • Back-translation (translate to another language and back)

How It Works

Text data is represented as an array of strings (sentences/documents).

Properties

Property Summary
bool PreserveCase { get; set; } Gets or sets whether to preserve case when modifying text.
string LanguageCode { get; set; } Gets or sets the language code for language-specific operations.

Methods

Method Summary
IDictionary<string, object> GetParameters()