hankcs/hanlp

中文分词 词性标注 命名实体识别 依存句法分析 成分句法分析 语义依存分析 语义角色标注 指代消解 风格转换 语义相似度 新词发现 关键词短语提取 自动摘要 文本分类聚类 拼音简繁转换 自然语言处理

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 34 minutes ago
Added to GitGenius on August 31st, 2026
Created on October 9th, 2014
Open Issues & Pull Requests: 12 (+0)
GitHub issues: Enabled
Number of forks: 10,907
Total Stargazers: 36,488 (+0)
Total Subscribers: 1,117 (+0)

Repository Insights (GitGenius)

Median issue/PR response: N/A
Mean response time: 24.7 hours
90th percentile: 0.0 hours
Tracked items: 33

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 2
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,388 days
Stale 30+ days: 2
Stale 90+ days: 2

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • invalid (13)
  • bug (9)
  • duplicated (4)
  • feature request (4)
  • improvement (1)
  • question (1)
  • wontfix (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

HanLP is a multilingual natural language processing library that provides tokenization, part-of-speech tagging, named entity recognition, dependency parsing, and semantic analysis across multiple languages.

HanLP addresses the need for a unified NLP toolkit that handles diverse linguistic tasks across many languages. It builds on PyTorch and TensorFlow 2.x to deliver state-of-the-art deep learning models. The library supports ten joint tasks including tokenization, lemmatization, part-of-speech tagging, dependency parsing, constituency parsing, semantic role labeling, semantic dependency parsing, and abstract meaning representation parsing. It leverages open-access corpora like Universal Dependencies and OntoNotes to enable coverage across numerous languages.

Developers should choose HanLP if they need multilingual NLP capabilities or work with languages beyond English. The tool suits both research and production environments. For end users, HanLP offers two deployment options: lightweight RESTful APIs measured in kilobytes for agile development and mobile applications, and native Python APIs for direct integration. Language-specific models are available for English, Chinese, and Japanese that outperform the multilingual model on those languages. The library requires Python 3.6 or higher, though GPU or TPU acceleration is optional rather than mandatory.

The project maintains active unit testing across its codebase. Documentation is comprehensive, with tutorials covering visualization and annotation guidelines. The tool provides both Python and Java client implementations for the RESTful API interface, allowing developers to choose their preferred integration method.