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 · Dictionary forms

wordClassesOffunction

The kinds of word a dictionary entry is, from the parts of speech it lists, so a conjugated form is only taken for a verb or an adjective the dictionary says is one.

Reads plain labels ("godan verb", "ichidan verb", "i-adjective" or "い adjective", "suru verb" or "する verb"), and JMdict's tags (v5k, v1, adj-i, vs-i, vk), in any case. A dictionary that lists 来る only as "an intransitive verb" is covered: a verb whose spelling ends in 来る or くる is a 来る verb.

Import it

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

Also exported from: @johnmorrisdotca/hikidashi

Definition

function wordClassesOf(characters: string, partsOfSpeech: readonly string[]): WordClass[]

Parameters

NameTypeDescription
charactersstring

The word as the dictionary spells it, such as 来る or 持ってくる.

partsOfSpeechreadonly string[]

The parts of speech the dictionary lists for it, in its own wording or as JMdict tags.

Returns

WordClass[]

The kinds of word it is, in the order of WORD_CLASSES; an empty list when none of its parts of speech is a verb or adjective that conjugates here (a noun, a な adjective).

Examples

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

console.log(wordClassesOf("行く", ["v5k-s", "vi"]), wordClassesOf("高い", ["adj-i"]), wordClassesOf("勉強", ["n", "vs-s"]));
console.log(wordClassesOf("持ってくる", ["intransitive verb"]), wordClassesOf("静か", ["adj-na"]));
[ 'godan' ] [ 'iAdjective' ] [ 'suru' ]
[ 'kuru' ] []

What it prints (run when this page was built)

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