Skip to main content

Text Classification with Transformers

Project description

nlpipes_logo

Text Classification with Transformers

nlpipes_screenshot

Overview

NLPipes is designed for people unfamiliar with Transformers who want an end to end solution to solve practical text classification problems, including:

  • Single-label classification: A typical use case is sentiment detection where one want to detect the overall sentiment polarity (e.g., positive, neutral, negative) in a review.
  • Multi-labels classification: A typical use case is aspect categories detection where one want to detect the multiple aspects mentionned in a review (e.g., product_quality, delivery_time, price, ...).
  • Aspect-based classification [Not yet implemented]: A typical use case is aspect based sentiment analysis where one want to detect each aspect categories mentionned in a review along his assocated sentiment polarity (e.g., product_quality: neutral, delivery_time: negative, price: positive, ...).

NLPipes expose a Model API that provide a simple abstraction for all text classification tasks. The library maintain a common usage pattern across models (train, evaluate, predict, save) with also a clear and consistent data structure (python lists as inputs/outputs data). Most of NLPipes functionnalities are based on callbacks functions. This provide a modular architecture that allow new ideas to be implemented without having to increase the complexity of the core.

Built with

NLPipes is built with TensorFlow and HuggingFace Transformers:

  • TensorFlow: An end-to-end open source deep learning framework
  • Transformers: An general-purpose open-sources library for transformers-based architectures

Getting Started

Installation

  1. Create a virtual environment
python3 -m venv nlpipesenv
source nlpipesenv/bin/activate
  1. Install the package
pip install nlpipes

Tutorials

Here are some examples on open datasets that show how to use NLPipes on different tasks:

Name Notebook Description Task Size Memory Speed
GooglePlay Sentiment Detection Available Train a model to detect the sentiment polarity from the GooglePlay store Single-label classification
StackOverflow tags Detection Available Train a model to detect tags from the StackOverFlow questions Multiple-labels classification
GooglePlay Aspect and Sentiment Detection Coming soon Train a model to detect the aspects from GooglePlay store reviews along their assocated sentiment polarity Aspect-based classification

Notices

  • NLPipes is still in its early stage. The library comes with no warranty and future releases could bring substantial API and behavior changes.
  • NLPipes will improve in the future releases, but the library is currently not optimized for high speed or low memory footprint.
Logo created with DesignEvo logo maker

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

nlpipes-0.1.16.tar.gz (35.7 kB view hashes)

Uploaded Source

Built Distribution

nlpipes-0.1.16-py3-none-any.whl (49.4 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