awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
mozillazg avatar

mozillazg/python-pinyin

0
View on GitHub↗
5,325 stars·627 forks·Python·MIT·24 viewspypinyin.readthedocs.io↗

Python Pinyin

python-pinyin is a Python library for transliterating simplified and traditional Chinese characters into phonetic pinyin. It functions as a transliteration system that converts text while supporting tone sandhi and providing utilities to transform pinyin between different formats, such as numeric tones, accent marks, or phonetic initials.

The library features a polyphonic character resolver that analyzes surrounding word context to select the correct pronunciation for characters with multiple sounds. It also includes a customizable dictionary system that allows the extension of default transliteration results using custom single-character and phrase-based phonetic mappings.

The toolset covers broader linguistic operations including the extraction of phonetic components like initials and finals, the application of various phonetic styles, and the handling of unconvertible characters. These capabilities are accessible both as a library and through command-line interfaces for text conversion and tone format translation.

Features

  • Pinyin Transliterations - A comprehensive Python library for transliterating simplified and traditional Chinese characters into phonetic pinyin.
  • Character-to-Pinyin Converters - Provides a core engine for converting Chinese characters to pinyin with built-in polyphonic character resolution based on word context.
  • Polyphonic Character Handlers - Implements mechanisms to resolve characters with multiple pronunciations based on linguistic context.
  • Pinyin Style Selectors - Supports transforming pinyin between multiple formats, including numeric tones, accent marks, and initials-only representations.
  • Traditional Chinese Support - Converts both simplified and traditional Chinese characters into phonetic pinyin.
  • Phonetic Tone Adjustments - Automatically adjusts pinyin tones to reflect natural pronunciation changes based on adjacent syllables.
  • Tone Sandhi Rules - Automatically adjusts pinyin tones to reflect natural pronunciation changes based on adjacent syllables.
  • Chinese Natural Language Processing - Extracts phonetic components like initials and finals from Chinese text for linguistic analysis.
  • Phonetic Component Extractors - Provides utilities to split pinyin strings into their constituent initials and finals according to standard phonetic schemes.
  • Pinyin Dictionary Imports - Supports importing external phonetic datasets to customize and expand default pinyin mappings.
  • Phrase-Priority Matchers - Ensures semantic accuracy by matching multi-character phrases against the dictionary before processing individual characters.
  • Phonetic Formatting Styles - Implements a system to apply diverse transcription styles and pronunciation variants to converted pinyin text.
  • Pinyin Notation Converters - Transforms pinyin between various notation styles such as numeric tones and accent marks.
  • Natural Language Processing - Listed in the “Natural Language Processing” section of the FunNLP awesome list.
  • Lexical Analysis Tools - Library for converting Chinese characters to Pinyin.
  • Text Processing - Converts Chinese characters to Pinyin.

Star history

Star history chart for mozillazg/python-pinyinStar history chart for mozillazg/python-pinyin

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Projects sharing features with Python Pinyin

These projects share indexed features with Python Pinyin. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • overtrue/pinyinovertrue avatar

    overtrue/pinyin

    4,458View on GitHub↗

    This is a dictionary-based Chinese Pinyin transliteration library used to convert Chinese characters into Pinyin with support for various tone styles and formats. It provides specialized utilities for polyphonic character resolution to manage multiple pronunciations and a generator for extracting the first letter of characters to create searchable index strings. The library includes a formatter for converting names into Pinyin following official international travel document and passport spelling standards. It also features a tool for transforming Chinese text into hyphenated or dotted string

    PHPphppinyin
    View on GitHub↗4,458
  • hotoo/pinyinhotoo avatar

    hotoo/pinyin

    7,821View on GitHub↗

    This is a Chinese text segmentation library that converts Chinese characters into their phonetic pinyin representation. It functions as a polyphone disambiguation tool, resolving ambiguous pronunciations for multi-sound characters using word segmentation and context analysis, and also serves as a pinyin sorting utility for ordering Chinese strings alphabetically. The library distinguishes itself through surname-aware pronunciation switching, applying specialized phonetic rules for Chinese surnames with non-standard pronunciations in name contexts. It supports pluggable word segmentation algor

    JavaScriptchinesehanzipinyin
    View on GitHub↗7,821
  • zh-lx/pinyin-prozh-lx avatar

    zh-lx/pinyin-pro

    4,646View on GitHub↗

    pinyin-pro is a Chinese pinyin transcription library and text segmentation tool. It converts Chinese characters into pinyin with support for tones, initials, and finals, while resolving polyphonic characters based on context. The project includes a pinyin pattern matching engine that enables searching Chinese text using full spellings, initials, or hybrid phonetic patterns. It also features a pinyin HTML generator that wraps characters and their transcriptions in markup tags for styled web display. The library provides capabilities for Chinese text segmentation, surname pronunciation priorit

    TypeScripthanzihanzi-pinyinhanzi2pinyin
    View on GitHub↗4,646
  • toolgood/toolgood.wordstoolgood avatar

    toolgood/ToolGood.Words

    5,161View on GitHub↗

    ToolGood.Words is a sensitive word filtering library and text sanitization component designed for high-performance detection and masking of prohibited terms. It provides tools for Chinese text normalization, pinyin transliteration, and the replacement of banned words with placeholders. The project is distinguished by its ability to uncover obfuscated language through a pinyin transliteration engine and phonetic-based detection. It identifies sensitive content hidden by phonetic substitutions, first-letter initials, or intentional misspellings by mapping Chinese characters to pinyin representa

    JavaScriptaho-corasickdotnetfilter
    View on GitHub↗5,161
Compare all 30 related projects→

Frequently asked questions

What does mozillazg/python-pinyin do?

python-pinyin is a Python library for transliterating simplified and traditional Chinese characters into phonetic pinyin. It functions as a transliteration system that converts text while supporting tone sandhi and providing utilities to transform pinyin between different formats, such as numeric tones, accent marks, or phonetic initials.

What are the main features of mozillazg/python-pinyin?

The main features of mozillazg/python-pinyin are: Pinyin Transliterations, Character-to-Pinyin Converters, Polyphonic Character Handlers, Pinyin Style Selectors, Traditional Chinese Support, Phonetic Tone Adjustments, Tone Sandhi Rules, Chinese Natural Language Processing.

Which projects share features with mozillazg/python-pinyin?

Projects with overlapping indexed features include: overtrue/pinyin — This is a dictionary-based Chinese Pinyin transliteration library used to convert Chinese characters into Pinyin with… hotoo/pinyin — This is a Chinese text segmentation library that converts Chinese characters into their phonetic pinyin… zh-lx/pinyin-pro — pinyin-pro is a Chinese pinyin transcription library and text segmentation tool. It converts Chinese characters into… toolgood/toolgood.words — ToolGood.Words is a sensitive word filtering library and text sanitization component designed for high-performance… isnowfy/snownlp — SnowNLP is a Python library for Chinese natural language processing. It provides tools for text segmentation,… promeg/tinypinyin — TinyPinyin is a Java and Android compatible library used for converting Chinese characters into Pinyin phonetic…