nlpaug
This python library helps you with augmenting nlp for your machine learning projects. Visit this introduction to understand about Data Augmentation in NLP
Feature
- Provide both character and word level augmentations which include:
- Character Augmentation: OCR, QWERTY(Keyboard Distance), Random Behavior
- Word Augmentation:
- Random Behavior: RandomWord
- Synonym: WordNet
- Word Embeddings: word2vec, GloVe, fasttext,
- Language Models: BERT
- Speech Recognition Augmentation:
- Spectrogram: Frequency Masking, Time Masking
- Audio: Noise, Pitch, Shift, Speed
- Flow orchestration is supported. Flow includes:
- Sequential: Apply data augmentations one by one
- Sometimes: Apply some augmentations randomly
Example
- How to use character and word augmentation
- How to create custom augmentation
- How to use spectrogram augmentation for speech recognition
- How to use audio augmentation for speech recognition
Frequency Masking
Time Masking
Installation
The library supports python 3.5+ in linux and window platform.
To install the library:
pip install nlpaug
Download word2vec or GloVe files if you use Word2VecAug or GloVeAug:
- word2vec(GoogleNews-vectors-negative300)
- GloVe(glove.6B.50d)
- fasttext(wiki-news-300d-1M.vec.zip)
Recent Changes
0.0.3 May 23, 2019: Added Speed, Noise, Shift and Pitch augmenters for Audio
0.0.2 Apr 30, 2019: Added Frequency Masking and Time Masking for Speech Recognition (Spectrogram). Added librosa library dependency for converting wav to spectrogram.
0.0.1 Mar 20, 2019: Project initialization
Test
Word2vec and GloVe models are used in word insertion and substitution. Those model files are necessary in order to run test case. You have to add ".env" file in root directory and the content should be
- MODEL_DIR={MODEL FILE PATH}
Folder structure of model should be
-- root directory
- glove.6B.50d.txt
- GoogleNews-vectors-negative300.bin
- wiki-news-300d-1M.vec
Metadata
Release files for nlpaug 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nlpaug-0.0.3.tar.gz | 15.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nlpaug-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.2 kB
Release files / nlpaug-0.0.3.tar.gz
| Download URL | nlpaug-0.0.3.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a114a44e56f95cc27ce047aa495fe20880f90f831d87311cf6e3d0505df0ecc
|
|
BLAKE2b-256 checksum How to use checksums |
417f9c76537b093df942327854116d4353c1026d61e24b8c7d83acf838aec7e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.4
|
Release files / nlpaug-0.0.3-py3-none-any.whl
| Download URL | nlpaug-0.0.3-py3-none-any.whl |
|---|---|
| Size | 35.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
376dea027ee782d593bbbcc27ae771826548517a02959c35680cef094b3e6348
|
|
BLAKE2b-256 checksum How to use checksums |
e48c5671bd785652c92839619cb2d2e3b2da26bd9bda90877b1083b8e1055f4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.4
|