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 · Look words up by reading, written form, English meaning, kanji or romaji

suggestWordsfunction

The common words nearest to a text that may have a typo in it, the exact ones first and then those one slip away, the commonest first. kamii suggests かみ, tabemsu suggests 食べます and にほんこ suggests 日本語; a text of kanji suggests nothing, because a kanji is not a slip away from another. It covers the 26,000 common words, from one table of about 800 kB gzipped that it fetches once (a second in unfiltered mode), and it is for a lookup that found nothing, not for every lookup.

Import it

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

Definition

function suggestWords(text: string, options?: WordsOptions & { readonly limit?: number; }): Promise<Suggestion[]>

Parameters

NameTypeDescription
textstring

Romaji or kana, with a slip in it or not.

options (optional)WordsOptions & { readonly limit?: number; }

mode (safe unless you say "unfiltered"), limit (5 unless given, 20 at most), and the consumer's block and allow lists.

Returns

Promise<Suggestion[]>

The suggestions; none for a text that is not romaji or kana, that is empty, or longer than 40 characters.

Examples

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

const found = await suggestWords("tabemsu");
console.log(found.map((one) => one.word.written)); // ["食べます", ...]
[]

What it prints (run when this page was built)

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