skishore / makemeahanzi

Free, open-source Chinese character data
https://www.skishore.me/makemeahanzi/
Other
1.83k stars 465 forks source link

Incomplete components: 㳽 #40

Closed olivernyc closed 6 years ago

olivernyc commented 6 years ago

Hey, I'm trying to correct the stroke order for 爾 (swap fifth and sixth strokes) and I'm running in to a small issue.

I'm able to correct the stroke order, which marks a few downstream characters as incomplete. I'm able to complete all but one, 瀰, which gets stuck on Incomplete components: 㳽.

㳽 is not in either font, and I don't think it's part of another character, so I'm not sure how to proceed. Any suggestions?

skishore commented 6 years ago

I think the default decomposition for 瀰 is wrong. You'll have to fix it on the analysis stage. Take a look at the current decomposition in dictionary.txt - it's "left-to-right ⿰氵彌", which is correct - the component 㳽 is wrong.

olivernyc commented 6 years ago

Here's what I see at the analysis stage:

screen shot 2018-06-04 at 1 23 39 am

Which seems correct? It looks like 㳽 is coming from the simplified character, not the component. Or maybe I'm misunderstanding something.

skishore commented 6 years ago

Ah, right. I must have made the simplified character a dependency of the traditional one.

For this kind of thing I typically change the code of the relevant stage, let Meteor reload the page, make the edit, then change the code back. It keeps the strictest validation working in general but relaxes it for a small number of characters where the data is wonky. (If I have to keep making the change several times, then I look into a better fix.)

In this case, the relevant line to change is here: https://github.com/skishore/makemeahanzi/blob/tool/client/lib/analysis.js#L169

Replace it with "this.simplified = null;" to treat the character as if it were simplified already.

olivernyc commented 6 years ago

Makes sense -- I got it to work. Thanks again for the help!

skishore commented 6 years ago

Fixed by #41