Reference · Sentence difficulty
KanjiDifficultySourcetype
What your dictionary knows about a kanji, which kanjiCost turns into a cost. KANJIDIC2 holds both fields.
Import it
import type { KanjiDifficultySource } from "@johnmorrisdotca/hikidashi/difficulty";
Also exported from: @johnmorrisdotca/hikidashi
Definition
type KanjiDifficultySource = {
grade: number | null;
frequencyRank: number | null;
};
Members
| Name | Type | Description |
|---|---|---|
grade | number | null | The school grade: 1 to 6 for elementary, 8 for the rest of the jōyō kanji, 9 and 10 for name kanji (KANJIDIC2's numbering). Null when ungraded. |
frequencyRank | number | null | How common the kanji is, 1 being the most common. Null when not ranked. |
Examples
import { kanjiCost, type KanjiDifficultySource } from "@johnmorrisdotca/hikidashi/difficulty";
const water: KanjiDifficultySource = { grade: 1, frequencyRank: 223 };
console.log(kanjiCost(water));1What it prints (run when this page was built)