Skip to main content

Hanzi stroke counts

Project description

Hanzi Stroke Count

Install

pip install strokes

Usage

from strokes import strokes

>>> strokes('众')
6
>>> strokes('众人')
[6, 2]
>>> strokes('眾人')
[11, 2]
>>> strokes('眾人', add=True)
13
>>> strokes('人-泛称')  # non-chinese characters are given a stroke count of zero
[2, 0, 7, 10]

Data Source

Stroke count data are based on Unihan_IRGSources.txt in Unihan database.

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

strokes-0.0.1.tar.gz (257.3 kB view hashes)

Uploaded Source

Built Distribution

strokes-0.0.1-py3-none-any.whl (256.2 kB view hashes)

Uploaded Python 3

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