本文へ移動

Jisho辞書

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

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

目次

リファレンス · 単語の完全な項目:すべての語義と、JMdictが記すことのすべて

loadEntry関数

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

The whole entry of a word, or null when JMdict has no entry by that number. In safe mode, the default, the senses JMdict marks vulgar, X-rated, sensitive or derogatory are not in it and nothing that holds them is fetched; "unfiltered" gives the entry whole. One piece of about 40 kB gzipped is fetched for an entry, and one more in unfiltered mode, kept for the next entry in it.

インポート

import { loadEntry } from "@johnmorrisdotca/jisho/entries";

定義

function loadEntry(word: Pick<Word, "id"> | number, options?: { readonly mode?: WordsMode; }): Promise<Entry | null>

引数

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

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

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

mode, "safe" unless you say "unfiltered"; it must be the mode the word was found in.

戻り値

Promise<Entry | null>

The entry, or null when JMdict has no entry by that number.

例

import { loadEntry } from "@johnmorrisdotca/jisho/entries";
import { loadWords, wordsOf } from "@johnmorrisdotca/jisho/words";

const words = await loadWords("かみ");
const word = wordsOf(words, "かみ")[0];
if (word !== undefined) console.log((await loadEntry(word))?.senses.length);
1

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

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

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