Skip to the content

Hikidashi引き出し

Era dates (和暦) and kanji numerals both ways, the dictionary forms of a conjugated word, a reading shared out over its kanji, words pulled from pasted text, and how hard a sentence is to read.

Hikidashi (引き出し) is a drawer: each tool is pulled out when it is wanted. About the name

Contents

Reference · Sentence difficulty

kanjiCostfunction

The cost of one kanji.

School grades are the scale a family already understands, so grades 1 to 6 cost their own number. Grade 8 is the rest of jōyō, taught in secondary school, and 9 and 10 are the name kanji, which a learner meets late if at all. Ungraded characters fall back to how common they are, since a frequent character is easier than a rare one whatever any curriculum says. A kanji nothing is known about costs UNKNOWN_KANJI_COST, the most.

Import it

import { kanjiCost } from "@johnmorrisdotca/hikidashi/difficulty";

Also exported from: @johnmorrisdotca/hikidashi

Definition

function kanjiCost(entry: KanjiDifficultySource | null | undefined): number

Parameters

NameTypeDescription
entryKanjiDifficultySource | null | undefined

What you hold about the kanji; null or undefined when you hold nothing.

Returns

number

The cost: 1 to 6 for grades 1 to 6, 9 for grade 8, 14 for name kanji (9 and 10), 10 to 18 by frequency for an ungraded kanji, and 20 (UNKNOWN_KANJI_COST) when nothing is known.

Examples

import { kanjiCost } from "@johnmorrisdotca/hikidashi/difficulty";

console.log(kanjiCost({ grade: 3, frequencyRank: 969 }), kanjiCost({ grade: 8, frequencyRank: 1500 }));
console.log(kanjiCost({ grade: null, frequencyRank: 2400 }), kanjiCost(undefined));
3 9
16 20

What it prints (run when this page was built)

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