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 · Pasted text

KnownWordstype

The words your dictionary confirmed, each with the kinds of word it is. A word with no kinds is still a match as written; only a conjugated form needs its dictionary form to be the right kind (wordClassesOf reads the kinds from a dictionary's parts of speech).

Import it

import type { KnownWords } from "@johnmorrisdotca/hikidashi/extract";

Also exported from: @johnmorrisdotca/hikidashi

Definition

type KnownWords = ReadonlyMap<string, readonly WordClass[]>;

Members

NameTypeDescription
forEach(callbackfn: (value: readonly WordClass[], key: string, map: ReadonlyMap<string, readonly WordClass[]>) => void, thisArg?: any): void
get(key: string): readonly WordClass[] | undefined
has(key: string): boolean
sizenumber
entries(): MapIterator<[string, readonly WordClass[]]>

Returns an iterable of key, value pairs for every entry in the map.

keys(): MapIterator<string>

Returns an iterable of keys in the map

values(): MapIterator<readonly WordClass[]>

Returns an iterable of values in the map

Examples

import type { KnownWords } from "@johnmorrisdotca/hikidashi/extract";
import { wordClassesOf } from "@johnmorrisdotca/hikidashi/deinflect";

const known: KnownWords = new Map([["学校", []], ["行く", wordClassesOf("行く", ["v5k-s"])]]);
console.log([...known]);
[ [ '学校', [] ], [ '行く', [ 'godan' ] ] ]

What it prints (run when this page was built)

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