mozillazg/python-pinyin

汉字转拼音(pypinyin)

View on GitHub ↗Jump to charts ↓

Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 1 hour ago
Added to GitGenius on September 12th, 2026
Created on September 14th, 2013
Open Issues & Pull Requests: 48 (+0)
GitHub issues: Enabled
Number of forks: 630
Total Stargazers: 5,372 (+0)
Total Subscribers: 94 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 3.5 days
Mean response time: 49.5 days
90th percentile: 51.8 days
Tracked items: 34

Maintainer activity

1 person did triage or write work on this repository in the last 12 months.

Counts unlabeled, assigned, unassigned, milestoned, demilestoned, locked, unlocked over the last 12 months. These are issue and pull request events that require triage or write permission. Commits and code review are not counted. labeled and renamed are excluded because GitHub issue forms record the issue author as the actor. Figures from October 11, 2026. This count is not comparable across projects: each project's automation decides which of these events a person emits.

How this project is maintained

95% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Three people close 68% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 20
New in 7 days: 1
Closed in 7 days: 0
Avg open age: 648 days
Stale 30+ days: 19
Stale 90+ days: 18

Recent activity

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

Top labels

  • discuss (9)
  • enhancement (7)
  • new feature (6)
  • question (2)
  • backlog (1)

Most active issues this week

Sign in to see which issues are moving.
Sign in

Detailed Description

python-pinyin is a Python library that converts Chinese characters to pinyin romanization.

The tool solves the problem of translating hanzi (Chinese characters) into their phonetic pinyin representation. It uses intelligent phrase-based matching to select the most accurate pronunciation for each character, handles polyphonic characters that have multiple valid pronunciations depending on context, and supports various output styles including tone marks, numbered tones, bopomofo (zhuyin) notation, and Wade-Giles romanization. The library can also perform tone sandhi conversion to reflect natural speech patterns.

Developers should choose this tool if they need to annotate Chinese text with pronunciation, implement sorting or search functionality for Chinese content, or convert between different romanization systems. The project suits applications ranging from language learning software to text processing pipelines. It provides both a Python API and command-line tools for flexibility in integration. Users can customize pinyin results by loading custom phrase or character dictionaries to correct inaccuracies for domain-specific vocabulary.

The project maintains active development across multiple Python versions and receives regular updates to handle edge cases and improve accuracy. The codebase includes comprehensive documentation with usage examples and a command-line interface for standalone use. The tool offers straightforward installation through standard package managers and provides clear configuration options for controlling output format, tone representation, and handling of characters without pinyin data.