Last active
July 23, 2023 08:22
-
-
Save mandel59/c157d1a7d58e51b5d85b751f9d8fd28e to your computer and use it in GitHub Desktop.
常用漢字の頭子音の対応表 original: https://twitter.com/lavion_lang/status/1679706083328421889
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- erq <jazh-consonants.erq >jazh-consonants.svg | |
attach '/Users/mandel59/ws/mojidata/packages/mojidata/dist/moji.db' as mojidata;; | |
with ja as (k: unihan_kJapaneseOn join o: string_split(k.value, ' ') {UCS, ja_c: ifnull(regexp_substr(lower(o.value), '^(ch|ts|sh|[hfbmtdnrszjkgwy])'), '∅') }) | |
with zh as (k: unihan_kMandarin join p: string_split(k.value, ' ') {UCS, zh_c: ifnull(regexp_substr(p.value, '^(zh|ch|sh|[bpmfdtnlzcsrjqxgkhwy])'), '∅') }) | |
joyo { UCS: 漢字 } join ja using (UCS) join zh using (UCS) { ja_c, zh_c => count: count(distinct UCS) } | |
output vega lite svg with | |
encoding { | |
x: ja_c n sort['h','f','b','m','t','ch','ts','d','n','r','s','sh','z','j','k','g','w','y','∅'], | |
y: zh_c n sort['b','p','m','f','d','t','n','l','zh','ch','sh','z','c','s','j','q','x','r','g','k','h','w','y','∅'] | |
}, | |
layer( | |
mark rect, encoding { color: count q }; | |
mark text, encoding { text: count q } | |
);; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment