text_classification  by Lizhen0628

Text classification toolkit for binary, multi-class, and multi-label tasks

created 5 years ago
510 stars

Top 62.0% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a comprehensive framework for text classification, supporting various deep learning models including RNNs (LSTM, GRU), FastText, TextCNN, DPCNN, and attention-based models, as well as integrating with Hugging Face Transformers. It is designed for researchers and practitioners looking to experiment with and compare different architectures for binary, multi-class, and multi-label text classification tasks.

How It Works

The project leverages a modular design with base classes for datasets, models, and trainers, promoting code reusability and extensibility. It supports both traditional word embeddings and Transformer-based embeddings, allowing for flexible model configurations via YAML files. Key features include TensorBoard visualization for metrics and network structures, multi-GPU support, and compatibility with Hugging Face Transformers for leveraging pre-trained language models.

Quick Start & Requirements

  • Install dependencies: pip install -r requirements.txt
  • Run training: python train.py
  • Requires Python and PyTorch. Specific pre-trained model downloads are linked in the README.

Highlighted Details

  • Supports a wide array of models: FastText, TextCNN, DPCNN, RNN, LSTM, GRU, RNN-Attention, TextRCNN, HAN, BERT, XLNet, and combinations thereof.
  • Handles binary, multi-class, and multi-label classification tasks.
  • Features TensorBoard visualization for training metrics and model architectures.
  • Offers multi-GPU training capabilities.

Maintenance & Community

The repository is maintained by Lizhen0628. Links to community channels or roadmaps are not explicitly provided in the README.

Licensing & Compatibility

The repository does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The README mentions that V2 is not backward compatible with V1. Some model implementations, particularly for longer texts, might require careful hyperparameter tuning or may benefit from techniques like attention to mitigate issues like gradient vanishing. The project focuses on classification and does not include natural language generation capabilities.

Health Check
Last commit

2 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.