← all repositories
hankcs/HanLP

A 36K-star Swiss Army knife for Chinese NLP

HanLP bundles tokenization, parsing, NER, summarization, and more into one PyTorch/TensorFlow toolkit aimed at production use.

36.5k stars Python Language ModelsML Frameworks
HanLP
Not currently ranked — collecting fresh signals.
star history

What it does

HanLP is a multilingual NLP package with a heavy emphasis on Chinese. It covers the full pipeline from tokenization and POS tagging through dependency parsing, named-entity recognition, semantic role labeling, coreference resolution, text classification, summarization, and even style transfer. It runs on both PyTorch and TensorFlow 2.x and exposes pretrained models for over a dozen tasks.

The interesting bit

The project treats “multilingual” seriously: it claims support for 130 languages including Chinese (simplified and traditional), English, Japanese, Russian, French, and German, all backed by what it calls the world’s largest multilingual corpus. For Chinese specifically, it offers multiple annotation standards per task—CTB, PKU, and 863 for POS tagging, for instance—so you can pick the convention your downstream tools expect.

Key highlights

  • Joint multitask models: one call can run tokenization, POS, NER, parsing, and semantic roles together.
  • RESTful API wrappers exist alongside local Python APIs, so deployment shape is flexible.
  • Pretrained models are versioned and documented; the project actively iterates both corpus and weights.
  • Binder notebooks and Docker images are provided for trying tasks without local setup.
  • 36K+ stars and sustained maintenance suggest it has become a de facto standard in the Chinese NLP ecosystem.

Caveats

  • The README is overwhelmingly a feature matrix linking to tutorials; architectural or performance details are sparse.
  • Some advanced tasks (coreference resolution, text style transfer, abstractive summarization) show “no model yet” in the multitask column, so coverage is uneven.
  • Claims like “world’s largest multilingual corpus” are stated but not substantiated with size figures in the README.

Verdict

If you are building Chinese-language pipelines and want battle-tested, broad-coverage NLP in one dependency, HanLP is hard to ignore. Researchers looking for novel architectures or transparent training recipes will need to dig past the tutorial surface.

Frequently asked

What is hankcs/HanLP?
HanLP bundles tokenization, parsing, NER, summarization, and more into one PyTorch/TensorFlow toolkit aimed at production use.
Is HanLP open source?
Yes — hankcs/HanLP is open source, released under the Apache-2.0 license.
What language is HanLP written in?
hankcs/HanLP is primarily written in Python.
How popular is HanLP?
hankcs/HanLP has 36.5k stars on GitHub.
Where can I find HanLP?
hankcs/HanLP is on GitHub at https://github.com/hankcs/HanLP.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.