fast-aug - python bindings
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.
Note: x25 times faster than nlpaug!
Installation
fast-aug is available on PyPI.
pip install fast-aug
Usage
from fast_aug import CharsRandomSwapAugmenter
text_data = "Some text!"
augmenter = CharsRandomSwapAugmenter(
0.5, # probability of words selection
0.5, # probability of characters selection
None, # stopwords
)
assert augmenter.augment(text_data) != text_data
assert augmenter.augment([text_data]) != [text_data]
TBA
Performance Comparison
Comparison of the fast-aug library with the other NLP augmentation libraries.
fast-aug- this, Fast Augmentation library written in Rust, with Python bindingsnlpaug- nlpaug - The most popular NLP augmentation libraryfasttextaug- fasttextaug - re-write of somenlpaug's augmenters in Rust with Python bindingsauglynot included as "Our text augmentations use nlpaug as their backbone"augmentynot included as it is too slow (2-8 times slower thannlpaug)
It is end-to-end comparison, including dataset loading, classes initialization and augmentation of all samples (one-by-one or provided as a list).
See ./benchmarks/compare_text.py for details of the comparison.
All libs compared on tweeteval dataset - sentiment test set - 12k samples.
Note: dataset text file size is 1.1Mb, it is included in the memory usage.
Contributing and Development
Any contribution is warmly welcomed!
Please see the GitHub repository README at fast-aug.
Release files for fast-aug 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 18.0 MB
Release files / fast_aug-0.1.0-cp312-none-win_amd64.whl
| Download URL | fast_aug-0.1.0-cp312-none-win_amd64.whl |
|---|---|
| Size | 288.4 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4d1f522ec8892a283e686a54209fc4140b5646cde9cdca1786dacb28db85db69
|
|
BLAKE2b-256 checksum How to use checksums |
a8130da97d9078c75b0e46b5db0949e21ba94182566653ccbe9888b486c6ce13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | fast_aug-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
3a24cbac72bb7ffb8b1d415a4ac41176b579d250a2494216a16ec88440dded99
|
|
BLAKE2b-256 checksum How to use checksums |
55714448779327477986877dcd86075055d3c670aeeb17eea03db7bdeef18b63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | fast_aug-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
e9238be1fd727557bbf1fd852c39e86b247e29113dcdba6fa43b373e7f2d3688
|
|
BLAKE2b-256 checksum How to use checksums |
ae4e5b3158e35fac5726f228e2156b394e42c0517c5e472d6bd1ba49c7be2051
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | fast_aug-0.1.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 426.7 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
866090744c8fd078e401a151cd949363326e3a938d6c46eba4c91c02deb0f79c
|
|
BLAKE2b-256 checksum How to use checksums |
aeace89cd99a96e81333869207c4cca698f185c6e5d16f6959a7c511aa32bc60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl
| Download URL | fast_aug-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl |
|---|---|
| Size | 429.4 kB |
| Tags | CPython 3.12 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
278f8d36e77bad07c101fe7103f5f9e78dfb200daed5a41f450a57d9c52e5a20
|
|
BLAKE2b-256 checksum How to use checksums |
f7b8ef2963aac61b6817072063513052801cf40586afaa4a368f2523acf4577e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp311-none-win_amd64.whl
| Download URL | fast_aug-0.1.0-cp311-none-win_amd64.whl |
|---|---|
| Size | 287.4 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2b208480f86caf68915ebdc65bb76b213c7d9549b45359dad9dd4ededcc33b52
|
|
BLAKE2b-256 checksum How to use checksums |
c3fb0d445f4d42500a2c93c3ac9b87d5a61de59708e9bb7781cd8631398734ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | fast_aug-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
95508bcd52f7c1d6607ca888b0e4fcf6a4322fea6d85a03c8351e714a29d1cdc
|
|
BLAKE2b-256 checksum How to use checksums |
dba3ef43dc2bcdc190db6305ed39cb3a44c9454c0314ae18fa167132ab911772
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | fast_aug-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
a9e350aedd46126cd7e9354ebe5abcf8ef93cf4905d0e9e494399063a2c8c9b3
|
|
BLAKE2b-256 checksum How to use checksums |
23968de737044526f72510b9c7e28a419be4acb5ff5f6cb519409e62027051dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | fast_aug-0.1.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 426.5 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
639f766344c68e354cc3eacc10373aeb366f7089625a089503c99fcfd252b8ed
|
|
BLAKE2b-256 checksum How to use checksums |
aae6e4576fa683bee4b5369bc08b7cfb892ac731efb6c94692d36e8c4ab7145e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl
| Download URL | fast_aug-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl |
|---|---|
| Size | 430.3 kB |
| Tags | CPython 3.11 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
8cab0f2c7626774793b870d3b7a3cd43c239380ad98016b64c1bcf94f3fa497f
|
|
BLAKE2b-256 checksum How to use checksums |
c23ba86066088f2566a2ce351c58813144bdb1f5646362e7c8ff74b0cb306e36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp310-none-win_amd64.whl
| Download URL | fast_aug-0.1.0-cp310-none-win_amd64.whl |
|---|---|
| Size | 287.3 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a5ece19da60418412e729db92008da91ce3310169ca1cdf29148f89ee8984016
|
|
BLAKE2b-256 checksum How to use checksums |
5c261721d3dd5859e2c3afdfbacdcbe4623b930daf24e94a57ca39b3d59f1692
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | fast_aug-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
b899c12dcd2cf2600c6129a3271ebc9d4a32909dce51c122e1ad2f7f98234dd4
|
|
BLAKE2b-256 checksum How to use checksums |
ab57006d00e5cd879627a80592de662fc6a4494b2608c745b42484504b3b6103
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | fast_aug-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
a62a31b99751ec44ba1905e381e8830fb6a2dd9ecaddab41df321085a0a04cbb
|
|
BLAKE2b-256 checksum How to use checksums |
7736c8eb2262bfc6200a18537c4f9ce46ef25b1197957d6171684c1a0ce6d3dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | fast_aug-0.1.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 426.0 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
dae2ebf0f6ce458debc41c9e4c5f7f1a2238a69c3f03e5b4a51ce40237ec1b42
|
|
BLAKE2b-256 checksum How to use checksums |
5c09abd69b98c38276ff16d4b23b138b81d2931289f526c2d4652d4d9cc31ab9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp310-cp310-macosx_10_12_x86_64.whl
| Download URL | fast_aug-0.1.0-cp310-cp310-macosx_10_12_x86_64.whl |
|---|---|
| Size | 429.8 kB |
| Tags | CPython 3.10 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
dd4e0117c96576c8d76cd84953b3b9d1b85f8ca6ab164db62513bd8c58abc48a
|
|
BLAKE2b-256 checksum How to use checksums |
7806f4858e394e66e181dd95d9bb003538d4aeaccc767c24dca00c0359df33ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp39-none-win_amd64.whl
| Download URL | fast_aug-0.1.0-cp39-none-win_amd64.whl |
|---|---|
| Size | 287.7 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6c7b4fca127fed5ebd22845cee484af09464cca6b82ef4fb9d0f9ef39ec071a3
|
|
BLAKE2b-256 checksum How to use checksums |
f77608d74991e24e298801ed3737dc207d12b87c9f8048dd27a1356539a30427
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | fast_aug-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
c8174db434e7af2d3959e1bf42c21f9b66f34e87b039d4c97069084dc5a09b24
|
|
BLAKE2b-256 checksum How to use checksums |
40639d5fdaac9df2a1843307af1eaacd07253879d8fdad8fe931caa7acce73f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | fast_aug-0.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
653b44137f4144b8ce140091a06b2eb8ff20a2e3e31cbbee2d605c7f2ccf88d8
|
|
BLAKE2b-256 checksum How to use checksums |
f2736965466c89a380424004199f0edfe71a43f9418ea624b5d540d14386e2a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | fast_aug-0.1.0-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 426.4 kB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1aeea8dbc8145a63417072775a8ab8330235703c375c89fb5cde5eee2976f082
|
|
BLAKE2b-256 checksum How to use checksums |
0480fadb3ba78c9442ac240fa7286ed74e8ed20303cc89323ad1f637e554974a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp39-cp39-macosx_10_12_x86_64.whl
| Download URL | fast_aug-0.1.0-cp39-cp39-macosx_10_12_x86_64.whl |
|---|---|
| Size | 429.6 kB |
| Tags | CPython 3.9 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
922899c790283e5ba2279659c06de394955f9cfe19c52076ae837a77b4ee65fe
|
|
BLAKE2b-256 checksum How to use checksums |
ca81b72f460864a0aaf3107196069e7ebd9c25fa50d7e0ab38afa75d3edac1cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp38-none-win_amd64.whl
| Download URL | fast_aug-0.1.0-cp38-none-win_amd64.whl |
|---|---|
| Size | 287.4 kB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1af63a369975387066e76496b858f8fb673b7c97fb6a4366888cded86423d9c8
|
|
BLAKE2b-256 checksum How to use checksums |
7313b52e481a6039c545c806cb651319a9d142d55c8d27318cd59aaee1570f54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | fast_aug-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
5bcbcc5b2ddd82cacaf117927039e96dbf04e1e9532686b006317aaf0631d50d
|
|
BLAKE2b-256 checksum How to use checksums |
14ab9d8784a58871a5ac430b0f244a20805e58fc5b800a7ec321f5c3fd9a3bff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | fast_aug-0.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
c9d7d839920fd85f79554f85771a7fc06048c9c4c6c27a3f66a43ec18b1b1474
|
|
BLAKE2b-256 checksum How to use checksums |
35449194a08e88b610a98939a4f102735bcd2ffa2aa230ee48c350f62453da59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp38-cp38-macosx_11_0_arm64.whl
| Download URL | fast_aug-0.1.0-cp38-cp38-macosx_11_0_arm64.whl |
|---|---|
| Size | 426.0 kB |
| Tags | CPython 3.8 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4bece8f3b14c446e9b4efcd995469e908588ff1814219ac06ccad5028027ad7d
|
|
BLAKE2b-256 checksum How to use checksums |
9a1dfe68af1c5fa53c2dbe42fc97896e3a90b0f9a571707bcde6ae215d253fc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / fast_aug-0.1.0-cp38-cp38-macosx_10_12_x86_64.whl
| Download URL | fast_aug-0.1.0-cp38-cp38-macosx_10_12_x86_64.whl |
|---|---|
| Size | 429.4 kB |
| Tags | CPython 3.8 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
6632e078c99ef17be94fcf721bf0104a14fe29e361eaf882da5cb294c2cfb0c7
|
|
BLAKE2b-256 checksum How to use checksums |
67c98f8d18360f0ac1eb76fbca6321bc71edc39211b8356f588f70708cae08db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|