Вы здесь

Вы здесь

Базы иероглифов

Поделиться публикацией

Опубликовано пн, 07/23/2018 - 14:09 пользователем Ksenia

 https://chinese.stackexchange.com/questions/14101/stroke-order-database

1)hanzi writer, 3195 strokes contained in ZDT but now uses the more complete character data from make me a hanzi demo. It uses javascript to draw and animate the strokes, directly from json versions of the character path data. Update: Recently, the library has been made significantly smaller. As of 2018-03-02, it is also able to show radicals in different colors, based on data in make me a hanzi demo.

2) make me a hanzi demo, 9507 characters (includes traditional chars). This data was extracted from two free chinese fonts using a semi-automated algorithmic approach. At present, the main things of interest on the master branch are the two data files graphics.txt and dictionary.txt and a complete collection of animated SVG's of the characters. SVG's vary in size from 2KB to 45KB. If you would prefer to render the characters algorithmically, you may wish to explore some of the other branches, such as demo (check the lib sub-folder) and tools (which seems to be where recent developments are taking place).

3)One more i've come across that uses the same data format as ZDT but which doesn't reveal license terms is worth mentioning, as the code is brief and easy to follow. Nicely done Chase! To draw a new stroke, you can grab zdtStrokeData.txt from the first project mentioned here, then cut and paste the paths for the stroke you want to draw over the string where the 'strokes' array is defined (currently line 291). Update: You also need to replace tabs with semi-colons and add a final semi-colon first.

Regarding the differences between the two data formats used by the projects above, the ZDT format may include multiple paths for a single stroke, in cases where the direction of stroke changes mid stroke. The prefix format is explained well by Chase. It records the direction of stroke, whether the current path is the final part of a stroke or part of the initial paths of a stroke and whether the current path is part of a radical.

The 'make me a hanzi demo' path data (graphics.txt) does not contain stroke direction information. Also, unlike the ZDT data, a single path defines a single stroke. The stroke information is in SVG path format, using quadratic bezier curves. To ascertain which part of the paths represent the radical, one may do a lookup in dictionary.txt. The dictionary also contains character decomposition data in an interesting format, derived from Unihan and CJKLib. The project page has more information on the format.

 

3)Wikimedia Commons Stroke Order Project. It's a great resource with images and animations for many simplified characters.

4)Stroke Fanningapplication, which is backed by stroke order data from ZDT.

5)YellowBridge dictionary, and it has stroke order animations for almost everything I've ever searched for. I presume they own the copyright for these, so you couldn't just stick them on your website, but you could create your own diagrams or animations using them as a reference.

Русский