Skip to main content

Natural language processing augmentation library for deep neural networks

Project description

Build Status Codacy Badge Codecov Badge

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:
    • 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

Frequency Masking Frequency Masking

Time Masking Frequency 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:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nlpaug-0.0.3.tar.gz (15.3 kB view hashes)

Uploaded Source

Built Distribution

nlpaug-0.0.3-py3-none-any.whl (35.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page