cburgmer / cjklib

Han character library for CJKV languages
Other
150 stars 49 forks source link

Character has no stroke count information #10

Closed ruddfawcett closed 7 years ago

ruddfawcett commented 7 years ago

Hi @cburgmer, thanks so much for this library. After a bit of fiddling, I was able to get everything going! Everything I've tried so far works: translation, pinyin, etc. I can't, however, seem to figure out getStrokeCount():

from cjklib.characterlookup import CharacterLookup
cjk = CharacterLookup('C')
print(cjk.getStrokeCount(u'说'))

When I run the above, I get the following:

Traceback (most recent call last): File "/Users/user/Documents/GitHub/chinese/hanzi.csv/generate.py", line 7, in print(cjk.getStrokeCount(u'说')) File "/Users/user/Documents/GitHub/chinese/hanzi.csv/cjklib/characterlookup.py", line 644, in getStrokeCount "Character has no stroke count information") cjklib.exception.NoInformationError: Character has no stroke count information

I've tried rebuilding the databases, reinstalling, etc. but no luck. I was wondering if you had any suggestions?

ruddfawcett commented 7 years ago

Nevermind! Just found this which I can use instead: http://hanzidb.org/character-list/by-frequency. Thanks!

cburgmer commented 7 years ago

Happy you found a solution. I haven't looked in the cjklib in a while, some things might need fixing up after this long time.