finds.dev← search

// the find

LingDong-/rrpl

★ 951 · JavaScript · MIT · updated Dec 2020

Describing Chinese Characters with Recursive Radical Packing Language (RRPL)

RRPL is a compact string encoding for Chinese character structure, representing glyphs as recursive compositions of 9-direction strokes on a grid. It's aimed at font designers and ML researchers who need structural decomposition rather than just bitmap or vector representations. The 5000+ character dataset and included TTF are immediately usable.

The encoding is genuinely elegant — referencing radicals by name and expanding them like C macros means complex characters stay readable rather than exploding into noise. The compiled JSON plus binary compression pipeline shows real engineering care. Generating a working TTF from the data proves the representation is complete enough to be practical, not just theoretical. The ML angle is well-founded: RRPL strings are short enough that sequence models can actually learn them, and the RNN experiment shown in the README demonstrates this.

Last commit was 2020 and the repo explicitly needs help to reach more than 10% of the ~50,000 CJK characters — the coverage gap is enormous and the project has no visible momentum to close it. The 'strokes on a 米 grid' building block is a simplification that can't accurately represent many stroke types (curves, hooks, complex terminals), so the TTF output looks more like a skeletal diagram than a real font. Simplified Chinese coverage is a stub (simp-map.txt exists but min-trad.json is the only fleshed-out dataset). No formal grammar spec or test suite — the parser is the de facto spec.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →