1 unstable release
0.1.0 | Feb 24, 2024 |
---|---|
0.0.1 |
|
#776 in Text processing
21 downloads per month
110KB
2K
SLoC
fast-aug - rust library
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.
Dependencies
~10MB
~182K SLoC