本文へ移動

Kotoba言葉

必要な単語一覧だけを読み込み、重複する文字を正しく判定し、日替わりやシード付きの単語ゲームを遊べます。

「Kotoba」は「言葉」です。 名前について(英語)

目次

リファレンス · 判定・得点・ゲームのルール

Idiom型

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

One set phrase.

インポート

import type { Idiom } from "@johnmorrisdotca/kotoba";

定義

type Idiom = {
    readonly idiom: string;
    readonly reading: string;
    readonly meaning: string;
    readonly meanings: readonly string[];
    readonly kind: IdiomKind;
    readonly kanji: readonly string[];
    readonly elementary: boolean;
    readonly common: boolean;
};

メンバー

名前型説明
idiomstring

How it is written.

readingstring

How it is read.

meaningstring

Its first plain English gloss, from the sense that makes it an idiom.

meaningsreadonly string[]

Every plain English gloss of that sense, meaning first.

kindIdiomKind

Whose judgement put it on the list.

kanjireadonly string[]

The kanji it is written with, once each, in the order they appear.

elementaryboolean

Every kanji in it is taught in Japanese elementary school, or it has none.

commonboolean

JMdict marks it as common.

例

import type { Idiom } from "@johnmorrisdotca/kotoba";

const one: Idiom = { idiom: "油を売る", reading: "あぶらをうる", meaning: "to loaf", meanings: ["to loaf"], kind: "idiom", kanji: ["油", "売"], elementary: true, common: false };
console.log(one.idiom);
油を売る

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

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

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