本文へ移動

Hikidashi引き出し

和暦と漢数字の相互変換、活用した語の辞書形、漢字への読みの割り当て、貼り付けた文からの単語の抽出、文の難しさ。日本語のテキストを扱う小さな道具を集めた引き出しです。

「引き出し」という名前は、道具が一つずつしまってあり、必要なときに取り出して使える、という意味です。 名前について(英語)

目次

リファレンス · 辞書形

WORD_CLASSES定数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

The kinds of word a conjugated form can come from, each named by itself: godan and ichidan verbs, iAdjective, and the two irregular verbs suru (する) and kuru (来る). Compare a WordClass with these rather than with a string typed out.

インポート

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

ほかのエクスポート元: @johnmorrisdotca/hikidashi

定義

const WORD_CLASSES: { readonly godan: "godan"; readonly ichidan: "ichidan"; readonly iAdjective: "iAdjective"; readonly suru: "suru"; readonly kuru: "kuru"; } = {
    godan: "godan",
    ichidan: "ichidan",
    iAdjective: "iAdjective",
    suru: "suru",
    kuru: "kuru",
} as const

メンバー

名前型説明
godan"godan"
ichidan"ichidan"
iAdjective"iAdjective"
suru"suru"
kuru"kuru"

例

import { WORD_CLASSES, dictionaryForms } from "@johnmorrisdotca/hikidashi/deinflect";

console.log(Object.values(WORD_CLASSES));
console.log(dictionaryForms("高くて").filter((one) => one.wordClass === WORD_CLASSES.iAdjective));
[ 'godan', 'ichidan', 'iAdjective', 'suru', 'kuru' ]
[ { base: '高い', wordClass: 'iAdjective' } ]

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/hikidashi 1.1.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。