Jisho documentation
Jisho 辞書 — Japanese word and kanji data for JavaScript
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.
Install
npm install @johnmorrisdotca/jisho
Start here
Entry points
| Import it | What it is | Size |
|---|---|---|
@johnmorrisdotca/The dictionary forms a conjugated word could come from · 3 exports | Deinflection: the dictionary forms a conjugated word could come from, and the path from there to it. | 2.1 kB |
@johnmorrisdotca/The whole entry of a word: every sense, and everything JMdict says of it · 11 exports | The whole entry of a word, in an entry point of its own so that a page that looks words up never carries it. | 9058.3 kB |
@johnmorrisdotca/Example sentences of a word, with furigana and their credit · 7 exports | The example sentences of a word, in an entry point of their own so that a page that looks words up never carries them. | 2907.5 kB |
@johnmorrisdotca/School grades · 1 exports | 8.0 kB | |
@johnmorrisdotca/JLPT levels, from Jonathan Waller's lists · 1 exports | 6.0 kB | |
@johnmorrisdotca/Readings, meanings, strokes and ranks · 1 exports | 146.0 kB | |
@johnmorrisdotca/Pairs of kanji that look alike · 1 exports | 50.6 kB | |
@johnmorrisdotca/Stroke order from KanjiVG: draw it, and find a kanji by drawing it · 11 exports | The stroke order of a kanji: the strokes in the order they are written, each as the SVG path KanjiVG draws it with in a square of 109 by 109, drawn as an SVG that writes itself stroke by stroke, and a search by drawing a kanji that compares the strokes as they were drawn with these. | 1083.8 kB |
@johnmorrisdotca/Look words up by reading, written form, English meaning, kanji or romaji · 61 exports | 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. | 14897.9 kB |
@johnmorrisdotca/The common words that safe mode keeps, in one table · 1 exports | 909.0 kB | |
@johnmorrisdotca/What to add to the common words for unfiltered mode · 1 exports | 29.5 kB | |
@johnmorrisdotca/The functions that read the tables · 22 exports | Jisho: Japanese kanji as data. | 0.9 kB |
Guides
How-to
- Find kanjiLists by grade and level, the kanji in a text, a search, and what can be mistaken for what.
- Look up a conjugated wordFind 食べなかった as 食べる, with the path negative, past: the built-in rules, the kinds of word they check, what they cover, and what they do not.
- Example sentencesFetch the sentences that show a word, each linked to the sense it shows, with furigana, English, a JLPT level and the credit each one must carry.
- Find words by meaningFind the commonest Japanese words whose English meaning holds a word or phrase, with findByMeaning, or search words you already have with searchMeanings.
- The whole entry of a wordFetch every sense of a word with its part of speech, field, dialect, cross-references, antonyms, notes and loanword sources, and the marks of its written forms and readings.
- Odd input and pieces that will not loadHow a text is made plain before it is looked up, what a lookup does with input that is empty or odd, and what WordsLoadError names.
- Read a textCut Japanese text into words by the longest match, with furigana, meaning, JLPT level and kanji grades for each, list what is not found, and take the words away as a study list in CSV or TSV.
- Look words up in romajiRead Latin letters as modified Hepburn or Kunrei romaji when looking a word up, and turn romaji into kana.
- Stroke order, and finding a kanji by drawing itDraw the stroke order of a kanji as an SVG that writes itself, and find a kanji by drawing its strokes.
- Suggest a word when there is a typoFind the common words one slip away from what was typed in romaji or kana, for a lookup that found nothing.
- How common a word isRead JMdict's priority tags and the single rank made from them, and put words in the order of commonness.
- Look words upFind a word by its reading, its written form, its English meaning, a kanji in it or romaji, choose safe or unfiltered, apply your own lists and marks, handle a piece that fails to load, and keep the dictionary out of a server's bundle.
- Find words by a kanjiFind the commonest words written with a kanji, and link each word to the kanji table to show its grade, level, readings and meanings.
- A plain page and a CDNLook words up on a page with no build step, from jsDelivr or unpkg, and read the kanji table from a CDN.
- Vite and webpackUse the package in a Vite or webpack project, and what the build holds.
- React, Vue, Svelte and AngularShow a lookup in a component of React, Vue, Svelte or Angular, and render the words on a server.
- TypeScript and NodeUse the package's types, and look words up in Node on a server or in a script.
- Embed it with an iframePut the words for a reading, a meaning or a kanji in any page with one iframe and no script.
Explanation
- How the look-alike pairs are measuredTwo published measures and one made from stroke paths, what a score means, and what they miss.
- Where the data comes fromThe four sources, their terms, and what you must credit.
- ArchitectureHow the source is laid out, and why.