Skip to main content

a package converts short Chinese-character strings(titles of books, articles or journals) to pinyin.

Project description

readMe.md

1 Description: This is a simple and short command-line tool that converts short Chinese-character strings(titles of books, articles or journals) to pinyin. It's purpose is to facilitate generating Chinese citations or bibiliograph in the English setting.

2 Internal Steps

It first tokenizes the Chinese strings using Jieba, and then output the corresponding pinyin via pypinyin's lazy_pinyin.

  • input: Chinese characters (it accepts both traditional and simplified Chinese)
  • output: pinyin strings

There are two possible outputs:

    1. the sentence style, which means only the first letter of the first word is capitalized.
    1. the headline style, in which the first letters of all tokens are capitalized. The default is the sentence style. You can use --head to output in the headline style

3 usage:

pinyinlize <Chinese_text> [--head]

eg: 

pinyinlize "清代基層地方官人事嬗遞現象之量化分析"  

output: "Qingdai jiceng difangguan renshi shandi xianxiang zhi lianghua fenxi"

4 Installation

pip install pinyinlize

5 future plans To include a API call to Crossref and an option to output DOI or bibtex for the article or book input.

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

pinyinlize-0.1.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

pinyinlize-0.1.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file pinyinlize-0.1.1.tar.gz.

File metadata

  • Download URL: pinyinlize-0.1.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.7

File hashes

Hashes for pinyinlize-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6a84653719bf2c129ec744b1a2408f2b70bdc2367722e1787929491aee979d33
MD5 567633c1d601345b71ac6f1d9b750174
BLAKE2b-256 631e5beb17b5723246f00b74187a656bbb38fd1dd7f6bdcddc1746310aba577a

See more details on using hashes here.

File details

Details for the file pinyinlize-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pinyinlize-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.7

File hashes

Hashes for pinyinlize-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a33c31ceee46b40b11e59b3b53474cc719bf917bb0870febeea79cb7ea2298af
MD5 a2ed7509ed3e994d8a8cd749c9b9c9a2
BLAKE2b-256 7050ea6cd32e67fede218f381fa0d0ff922f715807c0485d6031fe7dbc39879d

See more details on using hashes here.

Supported by

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