Skip to content

liao961120/strokes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.