lightNLP  by smilelight

NLP deep learning framework using PyTorch and Torchtext

Created 6 years ago
834 stars

Top 42.6% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a foundational deep learning framework for Natural Language Processing (NLP) tasks, built on PyTorch and torchtext. It targets developers and beginners interested in practical NLP implementations, offering a collection of common NLP task models with basic training and prediction capabilities.

How It Works

The framework implements various NLP tasks using PyTorch, leveraging torchtext for data handling. It focuses on providing runnable implementations of models for tasks like Named Entity Recognition (NER), sentiment analysis, and language modeling, with an emphasis on ease of use for experimentation rather than production-grade performance.

Quick Start & Requirements

  • Install: pip install lightNLP (recommended with domestic mirrors like pip install -i https://pypi.douban.com/simple/ lightNLP)
  • Prerequisites: PyTorch (latest recommended), torchtext (install from source: pip install https://github.com/pytorch/text/archive/master.zip). Specific Python versions (3.6/3.7) and PyTorch 1.3 were used for development.
  • Resources: Requires pre-trained word embeddings (e.g., token_vec_300.bin).
  • Docs: lightnlp-cookbook

Highlighted Details

  • Includes basic model deployment via Flask.
  • Supports TensorBoard for visualizing training metrics.
  • Offers implementations for numerous NLP tasks, with plans to add Transformer-based models.
  • Provides example data and usage for Named Entity Recognition (NER).

Maintenance & Community

The project is primarily a personal endeavor ("自娱自乐") and not intended for enterprise or production use. The author is open to paid services for specific needs.

Licensing & Compatibility

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

Limitations & Caveats

The framework is explicitly stated as not for enterprise or production use. Models are not finely tuned and are only guaranteed to run in the author's specific development environments (Windows 10/Python 3.6/PyTorch 1.3 or Manjaro/Python 3.7/PyTorch 1.3). Features like breakpoint training and early stopping are still pending.

Health Check
Last Commit

4 years ago

Responsiveness

Inactive

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

Explore Similar Projects

Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), François Chollet François Chollet(Author of Keras; Cofounder of Ndea, ARC Prize), and
42 more.

spaCy by explosion

0.1%
32k
NLP library for production applications
Created 11 years ago
Updated 3 months ago
Feedback? Help us improve.