本文へ移動

Jisho辞書

JMdictの単語を読み、表記、英語の意味、含まれる漢字、ローマ字から引け、必要な小さなチャンクだけを取得します。初期値はセーフモードで、各語義にはJMdictの印が付き、「フィルターなし」も選べます。2,999字の漢字の学年、JLPTレベル、読み、意味、形の似た漢字の組も収め、表ごとに独立したエントリポイントがあります。

「Jisho」は「辞書」のローマ字表記です。日本語の単語と漢字を収めています。 名前について(英語)

目次

リファレンス · 読み、表記、英語の意味、漢字、ローマ字から単語を引く

wordsWithKanji関数

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

Words written with a kanji, the commonest first, each shown by the written form that holds the kanji. The index holds the readings of the commonest sixty words with each kanji, so limit words cost the kanji's piece, about 15 kB gzipped, and at most that many pieces of the dictionary. Show each word's kanji with kanjiOfWord.

The words are in the mode asked for, and the block and allow lists are laid over them, as for loadWords. A piece that cannot be fetched rejects with a WordsLoadError.

インポート

import { wordsWithKanji } from "@johnmorrisdotca/jisho/words";

定義

function wordsWithKanji(kanji: string, options?: FindOptions): Promise<Word[]>

引数

名前型説明
kanjistring

A kanji; the first one in the text is used.

options (省略可)FindOptions

The mode, the lists, and the most words to give (10 unless given, and no more than 20).

戻り値

Promise<Word[]>

The words, the commonest first; none for a text with no kanji in it, or a kanji no word is written with.

例

import { wordsWithKanji } from "@johnmorrisdotca/jisho/words";

const words = await wordsWithKanji("山", { limit: 5 });
console.log(words.map((one) => `${one.written} ${one.meaning}`)); // ["山 mountain; hill; ...", ...]
[
  '山 mountain, hill; mine',
  '火山 volcano',
  '青山 lush mountain, green mountain; grave, burial place',
  '聖山 holy mountain, sacred hill',
  '西山 western mountains, mountains to the west'
]

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

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

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