HanLP
中文分词 词性标注 命名实体识别 依存句法分析 成分句法分析 语义依存分析 语义角色标注 指代消解 风格转换 语义相似度 新词发现 关键词短语提取 自动摘要 文本分类聚类 拼音简繁转换 自然语言处理
HanLP: one NLP toolkit, 130 languages, two engines
A production oriented natural language toolkit running on PyTorch and TensorFlow 2.x dual engines, with pretrained models across a dozen plus tasks and corpora the project calls among the largest.
Built for production, on two engines
HanLP runs on PyTorch and TensorFlow 2.x dual engines and describes itself as production oriented, with the stated mission of popularizing state of the art NLP technology. The self assessment runs feature complete, accurate, efficient, with up to date corpora, clear architecture, and customization. Python under Apache-2.0, homepage hanlp.com, around 36,500 stars.
The scale of the task matrix
HanLP 2.1 supports 10 joint tasks and multiple single tasks across 130 languages, including simplified and traditional Chinese, English, Japanese, Russian, French, and German, drawing on what the project calls one of the largest multilingual corpora in use. Numbers like that are unusual for an open toolkit and are the first thing that sets this one apart.
What the feature table covers
Word segmentation, part of speech tagging, named entity recognition, dependency parsing, constituency parsing, semantic dependency parsing, and semantic role labeling. Each row lists the available model, the annotation standard, and tutorials for RESTful, multi task, and single task usage, so the table doubles as a getting started map.
RESTful when you need it small
The lightweight RESTful API is described as a few kilobytes, suitable for agile development and mobile apps, with fast installation and no GPU environment needed. Native APIs handle larger scale scenarios, interfaces are semantically consistent across languages, and the code is open source all the way down.
Corpora, standards, iteration
Pretrained models cover more than ten tasks and are continuously iterated, per the README. The feature table cites annotation standards including CTB, PKU, and OntoNotes for the Chinese tasks. Attention to standards like that is what makes the models usable in comparative work rather than only in demos.
Community notes