unihan-etl icon indicating copy to clipboard operation
unihan-etl copied to clipboard

Node wrapper?

Open brettz9 opened this issue 6 years ago • 3 comments

Hi,

Looks like an excellent project! A potentially great companion to https://github.com/mathiasbynens/node-unicode-data for us Node users...

I am intending to look into making a Node wrapper for your library that can be used with npm.

If I get to this, would you be interested in including it within your repository if it ends up being fairly light-weight? For now, I'm planning to use "node-unihan-etl" as an npm name in case you decide to try to get "unihan-etl", but let me know if you'd be ok with me going ahead with the latter.

brettz9 avatar Nov 09 '18 05:11 brettz9

I went ahead and made https://github.com/brettz9/node-unihan-etl . The process doesn't auto-install the Python components (since there appear to be different ways preferred for installing, at least on the Mac where I'm working), but it does at least give a Node API: https://www.npmjs.com/package/node-unihan-etl

brettz9 avatar Nov 09 '18 20:11 brettz9

@brettz9 This is cool! Way to go!

image

Is there anything that would be helpful for this package to add to support node-unihan-etl?

It's okay if it doesn't install python components. Maybe one that that could be added is the specify the path of unihan-etl.

If it's good to go, we can link to it in the README/docs here as well!

tony avatar Nov 10 '18 20:11 tony

Thanks for the encouragement! No, nothing needed, unless you feel like reimplementing in Node! I think your tool is already quite robust... But if you ever added more, feel free to ping me so I can hopefully expose that functionality.

I think the tool's ready, as I'm using it already to make a build for this Bopomofo/pinyin study tool: https://github.com/brettz9/bopomofo (I obtain and show characters without an alternate pronunciation and with the highest possible frequency and lowest possible stroke count, so kids or learners choosing to be presented with a Chinese character may be more likely to be familiar with the character shown to them and for which they are being asked to guess its pinyin/bpmf).

brettz9 avatar Nov 12 '18 01:11 brettz9