fast_aug 0.1.0

Fast data augmentation for text
Documentation

fast-aug - rust library

Rust Test Workflow Status Crates.io Version Rust docs GitHub License

fast-aug is a library for fast text augmentation, available for both Rust and Python as fast-aug.
It is designed with focus on performance and real-time usage (e.g. during training), while providing a wide range of text augmentation methods.


Installation

fast-aug is available on crates.io.

cargo install fast-aug

Usage

use fast_aug::base::BaseAugmenter;
use fast_aug::text::{CharsRandomSwapAugmenter, TextAugmentParameters};

let rng = &mut rand::thread_rng();
let augmenter = CharsRandomSwapAugmenter::new(
    TextAugmentParameters::new(0.5, None, None),
    TextAugmentParameters::new(0.5, None, None),
    None,
);
augmenter.augment("Some text!".to_string(), rng);
augmenter.augment_batch(vec!["Some text!".to_string()], rng);

Please refer to rustdoc for details.

TBA

Contributing and Development

Any contribution is warmly welcomed!
Please see the GitHub repository README at fast-aug.