radomirbosak / radicals

Search for kanji using parts and radicals
1 stars 1 forks source link

`并` is not found in radical list #1

Open radomirbosak opened 5 years ago

radomirbosak commented 5 years ago

This may be due to the kradfile-u being somewhat dated and since at the time not all radicals weren't available as unicode characters, sometimes kanji containing the radicals were used to represent it instead.

Example: (Note: radicals.py was renamed to rad)

$ rad 新
斤  axe
十  ten, complete
辛  bitter
Traceback (most recent call last):
  File "/home/user/.local/bin/rad", line 154, in <module>
    main()
  File "/home/user/.local/bin/rad", line 147, in main
    list_kanji_radicals(terms[0])
  File "/home/user/.local/bin/rad", line 102, in list_kanji_radicals
    radical = radchar2rad[rchar]
KeyError: '并'
radomirbosak commented 4 years ago

After some research, I found that all of these 30 屯冊巨九ヨハマ勿元久巴品乃亡岡尤奄⺾滴也已無免及⺹ユ井世并五 characters are used as radicals in kradfile-u, but but there's no mention of them in radicals.txt. This might be the source of this bug.

radomirbosak commented 4 years ago

Maybe different source data such as this might help https://github.com/kanjialive/kanji-data-media/tree/master/language-data