Skip to the content

Bushu部首

Choose the parts you can see in a kanji, intersect their matches, and add a radical picker to your page.

Bushu is the Japanese word 部首 for a kanji radical. About the name

Contents

Reference

Radical intersection and display forms

import { … } from "@johnmorrisdotca/bushu";

0.9 kB minified and gzipped, with everything it imports (measured with esbuild)

Bushu 部首, the radical lookup: find a kanji by the parts it is made of, with no page and no data needed.

The data is in /radkfile (the radicals), /names (さんずい, にんべん, くさかんむり) and /strokes (the strokes of a kanji), and the picker to put in a page in /picker.

Exports

NameKindWhat it is
isRadicalStandInfunctionTrue when the key is a stand-in, so that the form, not the key, is the thing to draw and to name.
kanjiForRadicalsfunctionThe kanji that hold every one of the chosen radicals, in the order of the first radical's list (the dictionary's own).
orderChosenfunctionThe chosen radicals in the grid's own order, not the order they were clicked, so the choice reads as a row of the grid.
RadicaltypeA radical, or a common element of kanji, as RADKFILE lists it.
RADICAL_FORMSconstantWHAT A RADKFILE RADICAL LOOKS LIKE, AS OPPOSED TO WHAT IT IS KEYED BY.
radicalFormfunctionThe shape to draw for a RADKFILE key: the stand-in's own shape (汁 gives 氵), or the key itself where it already is the shape.
RadicalGrouptypeThe radicals that share a stroke count, as the grid of a picker draws them.
radicalGroupsfunctionThe grid: the radicals in stroke-count order, grouped by the count, in the order they were given within a count.
radicalsInKanjifunctionThe radicals a character is written with, fewest strokes first.
radicalStrokesfunctionThe stroke count to file a RADKFILE radical under: its own, except for the two it miscounts.
RADKFILE_STROKE_CORRECTIONSconstantTHE TWO STROKE COUNTS RADKFILE GETS WRONG.
usableRadicalsfunctionThe radicals that can still narrow what is left: every one that appears in at least one of the kanji that match now.
VERSIONconstantThe package's version.
withCorrectedStrokesfunctionThe radicals with the two miscounts put right, as new entries in the same order.

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/bushu 1.1.0.