Metadata-Version: 2.4
Name: dragonmapper
Version: 0.3.0
Summary: Identification and conversion functions for Chinese text processing
Project-URL: Documentation, https://tsroten.github.io/dragonmapper
Project-URL: Source code, https://github.com/tsroten/dragonmapper
Author: Thomas Roten
License-Expression: MIT
License-File: AUTHORS.rst
License-File: LICENSE.txt
Keywords: bopomofo,characters,chinese,convert,hanzi,ipa,mandarin,pinyin,readings,transcription,zhuyin
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.9
Requires-Dist: hanzidentifier~=1.2
Requires-Dist: zhon~=2.0
Description-Content-Type: text/x-rst

=============
Dragon Mapper
=============

.. image:: https://badge.fury.io/py/dragonmapper.svg
    :target: https://pypi.org/project/dragonmapper

.. image:: https://github.com/tsroten/dragonmapper/actions/workflows/ci.yml/badge.svg
    :target: https://github.com/tsroten/dragonmapper/actions/workflows/ci.yml

Dragon Mapper is a Python library that provides identification and conversion
functions for Chinese text processing.

* Documentation: https://tsroten.github.io/dragonmapper/
* GitHub: https://github.com/tsroten/dragonmapper
* Free software: MIT license

Features
--------

* Convert between Chinese characters, Pinyin, Zhuyin, and the International
  Phonetic Alphabet.
* Identify a string as Traditional or Simplified Chinese, Pinyin, Zhuyin, or
  the International Phonetic Alphabet.

.. code:: python

    >>> s = '我是一个美国人。'
    >>> dragonmapper.hanzi.is_simplified(s)
    True
    >>> dragonmapper.hanzi.to_pinyin(s)
    'wǒshìyīgèměiguórén。'
    >>> dragonmapper.hanzi.to_pinyin(s, all_readings=True)
    '[wǒ][shì/shi/tí][yī][gè/ge/gě/gàn][měi][guó][rén/ren]。'

.. code:: python

    >>> s = 'Wǒ shì yīgè měiguórén.'
    >>> dragonmapper.transcriptions.is_pinyin(s)
    True
    >>> dragonmapper.transcriptions.pinyin_to_zhuyin(s)
    'ㄨㄛˇ ㄕˋ ㄧ ㄍㄜˋ ㄇㄟˇ ㄍㄨㄛˊ ㄖㄣˊ.'
    >>> dragonmapper.transcriptions.pinyin_to_ipa(s)
    'wɔ˧˩˧ ʂɨ˥˩ i˥ kɤ˥˩ meɪ˧˩˧ kwɔ˧˥ ʐən˧˥.'

Getting Started
---------------
* `Install Dragon Mapper <https://tsroten.github.io/dragonmapper/installation.html>`_
* Read `Dragon Mapper's tutorial <https://tsroten.github.io/dragonmapper/tutorial.html>`_
* Report bugs and ask questions via `GitHub Issues <https://github.com/tsroten/dragonmapper>`_
* Refer to the `API documentation <https://tsroten.github.io/dragonmapper/api.html>`_ when you need more technical information
* `Contribute <https://tsroten.github.io/dragonmapper/contributing.html>`_ documentation, code, or feedback
