本文へ移動

Jisho辞書

JMdictの単語を読み、表記、英語の意味、含まれる漢字、ローマ字から引け、必要な小さなチャンクだけを取得します。初期値はセーフモードで、各語義にはJMdictの印が付き、「フィルターなし」も選べます。2,999字の漢字の学年、JLPTレベル、読み、意味、形の似た漢字の組も収め、表ごとに独立したエントリポイントがあります。

「Jisho」は「辞書」のローマ字表記です。日本語の単語と漢字を収めています。 名前について(英語)

目次

リファレンス

読み、表記、英語の意味、漢字、ローマ字から単語を引く

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

最小化と gzip 圧縮をしたサイズは 14897.9 kB(読み込むものをすべて含み、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.

エクスポート

名前種類概要
allWords関数Every word that has been loaded, once each, the commonest first for the common table.
commonestFirst関数The words with the commonest first, by their rank.
deinflect関数The 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 食べる.
Deinflection型One way a written word could be a conjugated dictionary word.
DeinflectKind型The 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.
findByMeaning関数Words found by what they mean in English, the best answers first.
findInflected関数Looks a text up as it is written or as a conjugated form: 食べなかった finds 食べる, with the path "negative, past".
FindOptions型How findByMeaning and wordsWithKanji are asked: the mode and the lists, as for a lookup, and how many words to give.
foldKana関数A text folded to hiragana: the katakana move down, ー and everything else stay.
furiganaOf関数The pieces of a written word with the kana that read each kanji: 食べる read たべる is 食 (た) and べる.
furiganaOfSurface関数The 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 べなかった.
FuriganaPart型One piece of a written word: its text, and, for a piece of kanji, the kana that read it.
hasMarks関数Whether a word has a sense that carries any of some marks.
IndexManifest型Where the pieces of the indexes are that find words by meaning and by kanji.
inflectedOf関数The 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.
InflectedWord型A word found for a text, and how the text comes from it.
isLoaded関数Whether a text has been loaded, so that wordsOf can answer for it.
kanaFromRomaji関数Every 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.
KanjiFact型What the kanji tables say of one kanji in a text.
kanjiOfWord関数The 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.
loadCommonWords関数The 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.
loadWords関数Fetches 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.
LoadWordsOptions型How loadWords is asked.
LookupOptions型How a lookup in loaded words is asked.
MAX_READ_LENGTH定数The most characters readText reads; the rest is left out and truncated says so.
meaningFrom関数The 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.
meaningOf関数The 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.
normalizeText関数A 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 ー.
onlyWords関数Only the words named on a list.
PackedPatch型What 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.
PackedWords型A table of words as an entry point exports it: where it was made from, the JMdict release, and one string a row.
PieceSet型The pieces of one kind: the first key of each, in order, and how to fetch each.
priorityTags関数The priority tags a row stores, as JMdict writes them.
rankOfTags関数One 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.
readCommonWords関数The common words as a table the caller already has, read into words: a lookup by reading or written form with no waiting.
ReadResult型What readText gives.
readRow関数A row read out of the string it is stored as.
readText関数Reads 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 食べる).
ReadToken型One 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.
romajiToKana関数A romaji as the hiragana it usually reads as: kami is かみ, shinbun is しんぶん, Tōkyō is とうきょう.
SAFE_MARKS定数The 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).
searchMeanings関数The 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.
Sense型One sense of a word: the marks JMdict gives it, and its glosses, the plain one first.
studyList関数The 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.
studyListText関数A 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.
StudyRow型One word of a study list.
Suggestion型A word suggestWords found, and how many slips from what was typed it is.
suggestWords関数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.
withoutMarks関数The words with the senses that carry any of some marks left out.
withoutWords関数The words with those named on a list left out.
Word型One word as a lookup gives it.
WordRow型A row read from a table.
Words型Words that have been loaded, ready for a lookup that waits for nothing.
WordsLoadErrorクラスWhat 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.
WordsManifest型Where the pieces of the dictionary are.
WordsMode型Which 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.
wordsOf関数The words for a text that has been loaded, the commonest first.
WordsOptions型How words are looked up: the mode, and the consumer's own lists.
WordsPiece型One piece of the table: rows by reading, or written forms with their readings, whichever file it came from.
WordsPieceKind型Which 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.
wordsWithKanji関数Words written with a kanji, the commonest first, each shown by the written form that holds the kanji.

ソースを見るGitHub で編集@johnmorrisdotca/jisho 2.11.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。