fast_aug

Crates.iofast_aug
lib.rsfast_aug
version0.1.0
sourcesrc
created_at2023-12-26 14:56:54.751089
updated_at2024-02-24 09:21:25.014853
descriptionFast data augmentation for text
homepagehttps://github.com/k4black/fast-aug
repositoryhttps://github.com/k4black/fast-aug
max_upload_size
id1080995
size181,165
Konstantin Chernyshev (k4black)

documentation

https://docs.rs/fast-aug

README

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.

Commit count: 0

cargo fmt