skishore / inkstone

Learn Chinese on the go - no Internet connection required!
https://www.skishore.me/inkstone/
GNU General Public License v3.0
368 stars 92 forks source link

"how it works" section in the readme #13

Open garfieldnate opened 6 years ago

garfieldnate commented 6 years ago

I would love even a short paragraph on how the app works in the readme. Usually handwriting recognition takes a lot of machine learning/statistical techniques, which is why they would usually require an internet connection. How did you manage to make a handwriting app that runs without an internet connection?

GrimReaperSam commented 6 years ago

Hey,

I think this repo is not maintained anymore.. hasn't been updated in a while. But to answer your question you can dig in the lib/matcher folder to see how they do the matching. The entry point is the matcher.js file.

Cheers

skishore commented 6 years ago

Sorry for the late response - I was abroad without Internet access for a couple weeks. @GrimReaperSam is right about where in the source code you can examine the recognition logic.

You're right about the challenge of running ML algorithms quickly on a mobile device, but the key trick that makes Inkstone possible is that we don't need to do real handwriting recognition. Since the app knows which flashcard the user is currently on, it only needs to match their input against one character at a time. The problem is further simplified by requiring people to write the character stroke by stroke in roughly the proper order.

In contrast, in real Chinese handwriting, people often write in "cursive" with multiple strokes written without lifting a pen. It takes non-trivial machine-learning models to read inputs like that correctly.

GrimReaperSam commented 6 years ago

Hey,

Since we are talking about the keystrokes here, do you have a section where I can correct some keystrokes that I found wrong? For example for 候 (traditional character), it writes the leftmost two strokes, then goes to the righttopmost 2 strokes, then the vertical line, then continues normally. I know you have a place where you can correct individiual character but I'm not sure how to do that. Could you correct it or guide me perhaps?

Thanks!

skishore commented 6 years ago

All the data comes from the Make Me a Hanzi project, so if I've got something wrong here, the stroke order data is wrong there, too. Do you mind filing an issue there? Thanks!

GrimReaperSam commented 6 years ago

Done!