Skip to the content

Jisho辞書

The words of JMdict looked up by reading, written form, English meaning, a kanji in them or romaji, in small pieces fetched as needed, safe by default or unfiltered with every sense's marks, and the school grades, JLPT levels, readings, meanings and look-alike pairs of 2,999 kanji, each table an entry point of its own.

Jisho is the Japanese word 辞書 for a dictionary: this one holds Japanese words and kanji. About the name

Contents

Reference · Example sentences of a word, with furigana and their credit

loadExamplesfunction

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 it

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

Definition

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

Parameters

NameTypeDescription
wordnumber | Pick<Word, "id">

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

options (optional){ 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).

Returns

Promise<readonly Example[]>

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

Examples

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.

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/jisho 2.11.0.