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.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

pinyinlize-0.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pinyinlize-0.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.18

File hashes

Hashes for pinyinlize-0.2.tar.gz
Algorithm Hash digest
SHA256 d415536f420ae0b771ec4234f5353b45eb900c2989e7c1713c6368f8fec1ef28
MD5 e10df89dbf404377b9bf2a6b2a10ae99
BLAKE2b-256 70e87ba46904142809ed077c76f23e6fafe45267380a19a35f8570400c3f5267

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pinyinlize-0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.18

File hashes

Hashes for pinyinlize-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aea8f9f76e3ece662911f0520044ba37e48e5314a8970bfe16c0c8a10d8366d0
MD5 d22f7b4a07d13fb8cec029bd26afccd3
BLAKE2b-256 f2812920f96876cb40a3f781a463cf0b7501748646ebeb296a9544a718795794

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