Text Classification with Transformers
Project description
NLPIPES
Text Classification with Transformers
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 analysis 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 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 mentionned in a review along his assocated sentiment polarity (e.g., #product_quality: neutral, #delivery_time: negative, #price: positive, ...).
- Zero-shot classification [Not yet implemented]: Assign one or more label to each text from a list of possible labels without the requirement of an annotated training dataset.
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
- Create a virtual environment
python3 -m venv nlpipesenv
source nlpipesenv/bin/activate
- Install the package
pip install nlpipes
Examples
Here are some use-cases with NLPipes
on real datasets:
Name | Notebook | Description | Task | Size | Memory |
---|---|---|---|---|---|
GooglePlay Sentiment Detection | Link | Train a model to label reviews from the GooglePlay store reviews | 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 for aspect based sentiment detection to detect the aspects mentionned in GooglePlay reviews along his assocated sentiment polarity | Aspect-based classification |
Notice
NLPipes
is still in its early stage and is not yet suitable for production usage. Proceed with caution and use it at your own risk. The library comes with no warranty and future releases could bring substantial API and behavior changes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.