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

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

14897.9 kB minified and gzipped, with everything it imports (measured with esbuild)

Words: the Japanese words of JMdict, looked up by reading (かみ) or by written form (紙), by what they mean in English or by a kanji in them, each with a short English meaning, its senses with the marks JMdict gives them, and how common it is. The table is cut into small pieces and a lookup fetches only the pieces it needs, so a page asks for one word and downloads a few kilobytes, not the dictionary. Import this entry only where a lookup is made: a server that bundles it carries every piece.

The parts are in words-load.ts (fetching), words-lookup.ts (reading what was fetched), words-search.ts (by meaning and by kanji), words-common.ts (the common words as one table), words-pieces.ts (the pieces and the error), words-rows.ts and words-text.ts (what a row and a text are), words-filter.ts (the tools for what a lookup returned) and romaji.ts.

Exports

NameKindWhat it is
allWordsfunctionEvery word that has been loaded, once each, the commonest first for the common table.
commonestFirstfunctionThe words with the commonest first, by their rank.
deinflectfunctionThe dictionary forms a written word could be conjugated from, with the path from each to the word: the endings are taken off one at a time, outermost first, as a learner does, so 食べなかった is the past of 食べない, which is the negative of 食べる.
DeinflectiontypeOne way a written word could be a conjugated dictionary word.
DeinflectKindtypeThe kind of word a dictionary form must be, as the letters of a Word's kinds: g godan, i ichidan, a i-adjective, n na-adjective, s suru, k kuru.
findByMeaningfunctionWords found by what they mean in English, the best answers first.
findInflectedfunctionLooks a text up as it is written or as a conjugated form: 食べなかった finds 食べる, with the path "negative, past".
FindOptionstypeHow findByMeaning and wordsWithKanji are asked: the mode and the lists, as for a lookup, and how many words to give.
foldKanafunctionA text folded to hiragana: the katakana move down, ー and everything else stay.
furiganaOffunctionThe pieces of a written word with the kana that read each kanji: 食べる read たべる is 食 (た) and べる.
furiganaOfSurfacefunctionThe pieces of a word as it is written in a text, which may be a conjugated form of the dictionary form it was found by: 食べなかった from 食べる (たべる) is 食 (た) and べなかった.
FuriganaParttypeOne piece of a written word: its text, and, for a piece of kanji, the kana that read it.
hasMarksfunctionWhether a word has a sense that carries any of some marks.
IndexManifesttypeWhere the pieces of the indexes are that find words by meaning and by kanji.
inflectedOffunctionThe words for a text that is a word as it is written or a conjugated form of one, from words loaded with inflected: true: the words the dictionary has for the text itself first (path empty), then each word its ending could come from, and only those of the kind the ending needs, so 食べた finds 食べる (an ichidan verb) and never 食べた's other readings of the ending.
InflectedWordtypeA word found for a text, and how the text comes from it.
isLoadedfunctionWhether a text has been loaded, so that wordsOf can answer for it.
kanaFromRomajifunctionEvery hiragana text a romaji can read as, the usual first: one, unless it writes a long vowel with a macron or a circumflex, which a reading writes more than one way.
KanjiFacttypeWhat the kanji tables say of one kanji in a text.
kanjiOfWordfunctionThe entries of the kanji table for the kanji a word is written with, once each, in the order they appear: so a word can show its kanji with their grade, JLPT level, readings and meanings.
loadCommonWordsfunctionThe common words, fetched in one piece: about 26,000 rows and some 800 kB gzipped, for a page that looks up many words, all of them common.
loadWordsfunctionFetches what JMdict holds for some texts, and nothing else: the pieces of the table those texts are in, about 25 kB gzipped each, so that wordsOf can then answer for them with no waiting.
LoadWordsOptionstypeHow loadWords is asked.
LookupOptionstypeHow a lookup in loaded words is asked.
MAX_READ_LENGTHconstantThe most characters readText reads; the rest is left out and truncated says so.
meaningFromfunctionThe short English meaning of some senses: up to two senses of up to three glosses, ", " between glosses and "; " between senses, cut at a whole gloss inside 60 characters.
meaningOffunctionThe meaning of the commonest word a text has, or null: a text with no word, or none that the mode and the lists let through, has no meaning, and the answer is never a placeholder.
normalizeTextfunctionA text made plain for a lookup: composed and compatibility forms folded together (NFKC, so full-width letters and digits become half-width and half-width kana full-width), whitespace collapsed to single spaces and trimmed, spaces beside Japanese removed, invisible and control characters removed, and a dash between kana, or ending kana, made the long vowel mark ー.
onlyWordsfunctionOnly the words named on a list.
PackedPatchtypeWhat to do to the common words that safe mode keeps to have every common word as JMdict has it: each edit is a position, then "r" to replace the row there or "i" to insert one before it, then the row, apart by tabs.
PackedWordstypeA table of words as an entry point exports it: where it was made from, the JMdict release, and one string a row.
PieceSettypeThe pieces of one kind: the first key of each, in order, and how to fetch each.
priorityTagsfunctionThe priority tags a row stores, as JMdict writes them.
rankOfTagsfunctionOne number for how common a word is, lower being commoner, made from its priority tags the way JMdict's own bands go: the newspaper band if it has one (nf01 is 250, and each band adds 500), else 12,000 for the first grade of any list and 24,000 for the second, else 100,000 for a word with no priority.
readCommonWordsfunctionThe common words as a table the caller already has, read into words: a lookup by reading or written form with no waiting.
ReadResulttypeWhat readText gives.
readRowfunctionA row read out of the string it is stored as.
readTextfunctionReads a text: it is cut into words by taking, from each place, the longest stretch that the dictionary has a word for, either as it stands or as a conjugated form (食べなかった is 食べる).
ReadTokentypeOne piece of a text that readText cut out: a word of the dictionary, a stretch of Japanese no word was found for, or something that is not Japanese (spaces, punctuation, Latin letters, digits), which is kept so that the pieces put together are the text.
romajiToKanafunctionA romaji as the hiragana it usually reads as: kami is かみ, shinbun is しんぶん, Tōkyō is とうきょう.
SAFE_MARKSconstantThe marks that safe mode leaves out, which are those JMdict gives a sense that is vulgar (vulg), X-rated (X), sensitive (sens) or derogatory (derog).
searchMeaningsfunctionThe words already loaded whose English meaning holds some words, the whole word at a time (water is a gloss with the word water in it, watermelon is not), the ones whose first gloss is exactly it first, then those with another gloss that is, then the commonest.
SensetypeOne sense of a word: the marks JMdict gives it, and its glosses, the plain one first.
studyListfunctionThe words of a text that was read, once each in the order they came, each with how often it came and the form it first came in.
studyListTextfunctionA study list as text: csv has a header line and quotes what needs it, for a spreadsheet; tsv has no header and tabs, to paste into a spreadsheet or to import into a flashcard program.
StudyRowtypeOne word of a study list.
SuggestiontypeA word suggestWords found, and how many slips from what was typed it is.
suggestWordsfunctionThe 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.
withoutMarksfunctionThe words with the senses that carry any of some marks left out.
withoutWordsfunctionThe words with those named on a list left out.
WordtypeOne word as a lookup gives it.
WordRowtypeA row read from a table.
WordstypeWords that have been loaded, ready for a lookup that waits for nothing.
WordsLoadErrorclassWhat a lookup rejects with when a piece of the dictionary cannot be fetched, after one retry: a network that is down, a file the host does not serve, a bundler that left the piece out.
WordsManifesttypeWhere the pieces of the dictionary are.
WordsModetypeWhich words a lookup gives: "safe" (the default) leaves out every sense JMdict marks vulgar, X-rated, sensitive or derogatory, and the written forms, readings and words that only such senses give; "unfiltered" is everything JMdict has.
wordsOffunctionThe words for a text that has been loaded, the commonest first.
WordsOptionstypeHow words are looked up: the mode, and the consumer's own lists.
WordsPiecetypeOne piece of the table: rows by reading, or written forms with their readings, whichever file it came from.
WordsPieceKindtypeWhich set of pieces a WordsLoadError is about: readings and forms are the dictionary, extra-readings and extra-forms what safe mode leaves out, meanings and kanji the indexes (and their extra- kin), entries and examples the whole entries and the example sentences (and their extra- kin), common the table of common words, and manifest the small file that says where the pieces are.
wordsWithKanjifunctionWords written with a kanji, the commonest first, each shown by the written form that holds the kanji.

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