本文へ移動

Jisho辞書

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

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

目次

リファレンス · 単語の例文(ふりがなと出典つき)

loadExamples関数

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

The example sentences of a word, each with the number of the sense of the word it shows (Entry.senses[].number), its furigana, its English, the JLPT level of its kanji, the word as the sentence has it, and its credit. An empty list for a word with no example. In safe mode, the default, an example of a sense JMdict marks vulgar, X-rated, sensitive or derogatory is left out, and so is a sentence in which safe mode does not find the words that unfiltered mode does, and nothing that holds them is fetched; "unfiltered" gives every example, from one more piece. One piece of about 20 kB gzipped is fetched for a word.

インポート

import { loadExamples } from "@johnmorrisdotca/jisho/examples";

定義

function loadExamples(word: Pick<Word, "id"> | number, options?: { readonly mode?: WordsMode; readonly sense?: number; }): Promise<readonly Example[]>

引数

名前型説明
wordnumber | Pick<Word, "id">

A word a lookup gave, or the number of its entry.

options (省略可){ readonly mode?: WordsMode; readonly sense?: number; }

mode, "safe" unless you say "unfiltered", and sense, to keep the examples of one sense (the number of Entry.senses[].number).

戻り値

Promise<readonly Example[]>

The examples, in the order of their senses; none when the word has none.

例

import { loadExamples } from "@johnmorrisdotca/jisho/examples";
import { loadWords, wordsOf } from "@johnmorrisdotca/jisho/words";

const word = wordsOf(await loadWords("犬"), "犬")[0];
if (word !== undefined) console.log((await loadExamples(word))[0]?.english);
She is afraid of barking dogs.

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

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

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