--- id: mojimoji version: "0.0.13" license: unclear license_treatment: permissive maintenance: dormant --- # mojimoji — A fast converter between Japanese hankaku and zenkaku characters License: permissive · Maintenance: dormant · Downloads: 375.1K/mo ## What it is and what it does mojimoji is a Cython-based library for converting Japanese text between hankaku (half-width) and zenkaku (full-width) character forms. It provides two main functions: zen_to_han() converts full-width characters to half-width, and han_to_zen() does the reverse. Both functions accept optional flags to control whether kana, digits, and ASCII characters are converted, allowing fine-grained control over which character classes are affected. The package is designed for speed and has no runtime dependencies, installing via pre-built wheels for Python 3.7–3.12 on major platforms. Maintenance is dormant (last release 2024-01-12), but the codebase is stable and the repository remains accessible. Use it for: - Normalize Japanese user input in web forms or data pipelines to a consistent character width. - Prepare Japanese text for search indexing or matching where width variations should be treated as equivalent. - Convert legacy half-width Japanese data to full-width for display or compatibility with modern systems. - Process Japanese text in NLP or text analysis workflows where character width normalization is a preprocessing step. - Handle Japanese text in databases or APIs where width consistency is required for data integrity. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts Japanese text between hankaku (half-width) and zenkaku (full-width) character representations using Cython for speed. Yes, if you need to convert between Japanese character widths. The package is stable, dependency-free, and widely used. The dormant maintenance is not a blocker for a mature, single-purpose tool with no external dependencies. Install it if Japanese text normalization is part of your workflow; skip it if you don't work with Japanese text. ## Install pip install mojimoji uv add mojimoji poetry add mojimoji ## Installing mojimoji Before you install: Medium install friction due to compiled wheels; pre-built binaries available for Python 3.7–3.12 on macOS, Linux, and Windows, so installation should succeed without compilation on most platforms. Maintenance is dormant—last release was 2024-01-12, though the repository remains active and the package is stable. License in practice: Licensed under Apache License (permissive), so you can use, modify, and distribute the package freely with minimal restrictions. Quickstart: pip install mojimoji import mojimoji print(mojimoji.zen_to_han('アイウabc012')) # Output: アイウabc012 print(mojimoji.han_to_zen('アイウabc012')) # Output: アイウabc012 Requires Python 3.7 or later; installation relies on pre-built wheels for common platforms. Verify before relying: - Whether the package handles combining characters or other Unicode edge cases in Japanese text. - Performance characteristics on very large text volumes or streaming scenarios. - Whether dormant maintenance affects long-term compatibility with future Python versions beyond 3.12. - Current adoption and usage patterns in production systems. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: medium - Maintenance: dormant - Downloads: 375.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags japanese character width conversion, hankaku zenkaku converter, japanese text normalization, half-width full-width japanese, japanese character transformation, zen to han conversion, japanese text processing, japanese-text, character-encoding [View on SkillFed](https://skillfed.io/packages/mojimoji) · [View on PyPI](https://pypi.org/project/mojimoji/)