Kashgari

Kashgari

โ˜… 3.8 ๐Ÿ”– 1200 saves ๐Ÿ’ฐ Free GitHub

Kashgari is an open-source transfer learning framework for natural language processing tasks such as text classification and sequence labeling. Built on tf.keras and released under the Apache-2.0 license, it has earned more than 2,300 GitHub stars; the codebase was last updated in 2024 and remains a compact, production-oriented NLP toolkit.

Overview

Kashgari’s premise is that most applied NLP work โ€” named entity recognition, sentiment and intent classification, part-of-speech tagging โ€” follows the same shape: embed text, encode it, decode labels. The framework wraps that shape in a small, consistent API with pluggable embeddings, including Word2Vec, BERT and GPT-2, so swapping the language representation behind a task takes a line of code. It handles the surrounding chores too: corpus loading, label management, training callbacks and model export, aiming at developers who need a working classifier or tagger in an afternoon rather than a research project.

Key Features

  • Unified API for text classification and sequence labeling tasks
  • Pluggable embeddings: Word2Vec, BERT, GPT-2 and more
  • Ready-made models for NER and other token-labeling tasks
  • Built-in corpus handling and label management
  • Transfer learning workflows for small, custom datasets
  • Simple model saving, loading and prediction interfaces

๐Ÿ’ณ Pricing

Kashgari is free and open source under the Apache-2.0 license, with no paid edition.

Who Is It For

Kashgari fits developers and data scientists who need dependable, classic NLP pipelines โ€” entity extraction, text classification โ€” especially for Chinese and multilingual text, without adopting a heavyweight framework.

Kashgari has been especially popular in the Chinese NLP community, where it is commonly used for Chinese named entity recognition, sentiment analysis and text classification with modest labeled datasets. Its embedding layer supports loading pretrained vectors and transformer checkpoints, and trained models can be saved and reloaded for serving with a few lines of code. For teams maintaining classic TensorFlow NLP pipelines, it remains a pragmatic, well-documented option that favors convention and simplicity over configurability.

๐Ÿš€ Visit Kashgari Official Site

๐Ÿšฉ Report an issue