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

ReadResulttype

What readText gives.

Import it

import type { ReadResult } from "@johnmorrisdotca/jisho/words";

Definition

type ReadResult = {
    readonly text: string;
    readonly tokens: readonly ReadToken[];
    readonly unknown: readonly string[];
    readonly release: string;
    readonly truncated: boolean;
};

Members

NameTypeDescription
textstring

The text that was read: made plain (NFKC, invisible characters removed) and cut at MAX_READ_LENGTH characters.

tokensreadonly ReadToken[]

The pieces, in order, which put together are text.

unknownreadonly string[]

The stretches of Japanese that no word was found for, once each, in the order they came.

releasestring

The JMdict release the words are from.

truncatedboolean

Whether the text was longer than MAX_READ_LENGTH and was cut.

Examples

import type { ReadResult } from "@johnmorrisdotca/jisho/words";

const count = (result: ReadResult) => result.tokens.length;
console.log(typeof count);
function

What it prints (run when this page was built)

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