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 · Reading alignment

WordSegmenttype

One run of a word, and its share of the reading in hiragana: what segmentWord cuts a word into.

Import it

import type { WordSegment } from "@johnmorrisdotca/hikidashi/align";

Also exported from: @johnmorrisdotca/hikidashi

Definition

type WordSegment = {
    text: string;
    kind: SegmentKind;
    reading: string;
};

Members

NameTypeDescription
textstring

The run as the word writes it: one or more kanji, or kana.

kindSegmentKind

Kanji, kana inside the word, or okurigana at its end.

readingstring

The run's share of the reading, in hiragana.

Examples

import { segmentWord, type WordSegment } from "@johnmorrisdotca/hikidashi/align";

const first: WordSegment | undefined = segmentWord("食べる", "たべる")?.[0];
console.log(first);
{ text: '食', reading: 'た', kind: 'kanji' }

What it prints (run when this page was built)

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