Skip to main content

A Python library for quantitative tasks in Chinese historical linguistics.

Project description

SinoPy: Python Library for quantitative tasks in Chinese historical linguistics

DOI PyPI

SinoPy is an attempt to provide useful functionality for users working with Chinese dialects and Sino-Tibetan language data and struggling with tasks like converting characters to Pinyin, analysing characters, or analysing readings in Chinese dialects and other SEA languages.

If you use the library in your research, please quote it as:

List, Johann-Mattis (2018): SinoPy: Python Library for quantitative tasks in Chinese historical linguistics. Version 0.3.0. Jena: Max Planck Institute for the Science of Human History. DOI: https://zenodo.org/badge/latestdoi/30593438

This is intended as a plugin for LingPy, or an addon. The library gives utility functions that prove useful to handle Chinese data in a very broad context, ranging from Chinese character readings up to proposed readings in Middle Chinese and older stages of the language.

Quick Usage Examples

Convert Baxter's (1992) Middle Chinese transcription system to plain IPA (with tone marks).

>>> from sinopy import baxter2ipa
>>> baxter2ipa('bjang')
'bjaŋ¹'
>>> baxter2ipa('bjang', segmented=True)
['b', 'j', 'a', 'ŋ', '¹']

Convert Chinese characters to Pīnyīn

>>> from sinopy import pinyin
>>> pinyin('我', variant='cantonese')
'ngo5'
>>> pinyin('我', variant='mandarin')
'wǒ'

Try to find character by combining two characters:

>>> from sinopy import character_from_structure
>>> character_from_structure('+人我')
'俄'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sinopy-0.3.1.tar.gz (9.7 MB view details)

Uploaded Source

File details

Details for the file sinopy-0.3.1.tar.gz.

File metadata

  • Download URL: sinopy-0.3.1.tar.gz
  • Upload date:
  • Size: 9.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.2

File hashes

Hashes for sinopy-0.3.1.tar.gz
Algorithm Hash digest
SHA256 fb8cb22f08facd19fac77877874d43604c52854dbc592585a35928488ecd805c
MD5 5d8d450e84d9e2bcb1c3df54e0638102
BLAKE2b-256 2a04ce6261d2fdae3f3ba48153b8c90ae8003ffcf3342a3218adaf30bf416347

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page