Comments (2)
Hi there! Thanks for your interest in the project.
Yes most characters can be broken down to a limited set of primitive components. By primitive component I mean a character whose definition does not contain that of any other character.
If a new character cannot be composed of existing primitive components, you can think of that character as a primitive component itself.
Most of these components are defined in the beginning of the rrpl.json
file, but they're not delibrately organized yet. You can catch them with a regex such as "[123456780\-\|\(\)]+"
.
If you would just like to see a list of common radicals in the Chinese language, check out https://zh.wikipedia.org/wiki/部首#康熙部首讀音表, they're in the 2nd column of the table.
The way the code subdivides the gird is by counting the number of "parrallel" components. For example, in (A)-(B)
, component A
and B
each get 50% of horizontal space, while in (A)-(B)-(C)
, the components each get 1/3 of horizontal space, and in ((A)-(B))-(C)
, A
and B
each get 25% and C
gets 50%.
I hope my explanation is helpful!
from rrpl.
Wondering if you have somewhere also that describes any math behind it, such as how you know that subdividing the grid will allow for covering all possible ways a stroke might be on a Chinese character. I'd be really interested to know how that works.
from rrpl.
Related Issues (11)
- How did you split the chinese word to radical? HOT 4
- Question: is there a unique "best" encoding for each character? HOT 1
- ideas on enhancement
- Were you inspired by Zhu Bangfu, creator of Cangjie input method?
- The readme doesn't look good in GitHub dark mode HOT 2
- Question on distance metric
- How it handles curves HOT 1
- If you can parse a glyph visually to generate a code string HOT 1
- Stroke weight, direction, and order HOT 1
- Duplicate strokes for characters surrounded by 厂 and 广 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rrpl.