Skip to main content

Text Classification with Transformers

Project description

nlpipes_logo

Text Classification with Transformers

nlpipes_screenshot

Overview

NLPipes provides an easy way to use Transformers-based models for training, evaluation and inference on a diversity of text classification tasks, including:

  • Single-label classification: Assign one label to each text. 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 [Not yet implemented]: Assign one or more label to each text from a list of possible labels. 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]: Assign one label from a list of possible labels for each of a list of aspects. 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 simple Model API that offers a common abstraction to run several text classification tasks. The Model encapsulate most of the complex code from the library and save having to deal with the complexity of transformers based algorithms.

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
GooglePlay Sentiment Detection Open Train a model to detect the sentiment polarity from the GooglePlay store Single-label classification
StackOverflow tags Detection Coming soon 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

Why should I use NLPipes?

  • End to End solution for practical text classification problems, especially in the context of aspect based sentiment analysis.
  • Low barrier to entry. Given the unified API for all classification task, there is just one abstraction to learn.
  • Flexible architecture. Most of nlpipes functionnalities are based on callbacks function. This allows new research to be implemented without having to increase the complexity of the core.

Why shouldn’t I use NLPipes?

  • Nlpipes is not intended to provide building blocks to create customized transformer-based neural network.
  • Speed and mermory footprint efficiency will improve in the future, but if you're looking for an high performance library for training and inference, there is probably better alternatives.

Notice

NLPipes is still in its early stage and not yet suitable for production usage. The library comes with no warranty as future releases could bring substantial API and behavior changes.

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.12.tar.gz (36.0 kB view hashes)

Uploaded Source

Built Distribution

nlpipes-0.1.12-py3-none-any.whl (46.7 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