#5959th of 75 in ML frameworks and libraries
hanlp
Multilingual NLP toolkit for tokenization, tagging, parsing and NER, mainly Chinese
Live demo ↗
(opens in a new tab)Documentation ↗
(opens in a new tab)Website ↗
(opens in a new tab)Repository on GitHub ↗
(opens in a new tab)
- Stars
- 36.5k
- License
- Apache-2.0
- Last commit
- Sep 2026
- Last release
- Jan 2025
- Language
- Python
35,995 on 31 Mar 202636,520 on 20 Oct 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
HanLP is a Python NLP toolkit with pretrained PyTorch and TensorFlow 2.x models for tokenization, POS tagging, NER, dependency and constituency parsing, semantic role labeling, AMR and more. It offers a native API that loads models locally, and a RESTful client (Python, Go, Java) that calls a hosted server. Output is a uniform JSON-compatible Document. The README states support for 130 languages through joint multi-task models.
Who it is for: NLP engineers and researchers doing Chinese or multilingual text analysis
Strengths
- Covers many classic NLP tasks with pretrained models: tok, POS, NER, dep, con, SRL, SDP, AMR
- Native and RESTful APIs share the same semantics, so code ports between them
- Custom trie dictionaries with force, merge and correct rules feed into downstream models
- Multi-task models save speed and memory; single-task models can be chained in a pipeline
Weaknesses
- Native API requires Python 3.6 to 3.10, which is dated
- Last release is 2025-01-13; the README is Chinese-first
- Native API takes sentences as input, so sentence splitting is a separate step
- Hosted RESTful API gives anonymous users limited quota; an auth key is recommended
What it needs
- GPU optional
- Needs PyTorch, TensorFlow 2.x
- Models: PyTorch, TensorFlow 2.x, ELECTRA, mMiniLMv2
Also in ML frameworks and libraries
See all 75| Rank | Project | Score |
|---|---|---|
| 1 | transformersPython library defining open models for text, vision, audio and multimodal tasks | 94 out of 100 |
| 2 | pytorchPython tensor library with GPU support and tape-based autograd for deep learning | 94 out of 100 |
| 3 | ultralyticsPython library and CLI for training and running YOLO vision models | 92 out of 100 |
| #4 | pytorch-image-modelsPyTorch library of image models, pretrained weights and reference training scripts | 91 out of 100 |
| #5 | supervisionPython toolkit for loading, annotating and counting computer vision detections | 90 out of 100 |