リファレンス · 読み、表記、英語の意味、漢字、ローマ字から単語を引く
findByMeaning関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Words found by what they mean in English, the best answers first. The index holds, for each English term, the readings of twenty
words: up to ten whose gloss is exactly the term (drink is the first gloss of 飲む, "to drink"), the commonest first, then the
commonest that merely have it (every word JMdict ranks has all of its terms; a word it does not rank, only those of its
first gloss), so limit words cost the term's piece, about 15 kB gzipped, and at most that many pieces of the dictionary.
A text of several words finds the words whose glosses hold them one after the other (the index has every pair of terms that
follow each other in the gloss of a word JMdict ranks, and no more). The words are in the mode asked for, and the block and allow lists are laid over them, as for loadWords. Words every gloss has
(to, the, a) are left out of the text. A piece that cannot be fetched rejects with a WordsLoadError.
インポート
import { findByMeaning } from "@johnmorrisdotca/jisho/words";
定義
function findByMeaning(text: string, options?: FindOptions): Promise<Word[]>
引数
| 名前 | 型 | 説明 |
|---|---|---|
text | string | English: |
options (省略可) | FindOptions | The mode, the lists, and the most words to give (10 unless given, and no more than 20). |
戻り値
Promise<Word[]>
The words, the ones whose gloss is exactly the text first (a word's first gloss before a later one), then the commonest; none when nothing matches.
例
import { findByMeaning } from "@johnmorrisdotca/jisho/words";
const found = await findByMeaning("water", { limit: 5 });
console.log(found.map((one) => `${one.written} ${one.meaning}`)); // ["水 water; fluid; ...", ...][
'水 water (esp. cool or cold); fluid (esp. in an animal tissue)',
'水分 water, liquid, fluid',
"水上 on the water, aquatic; waterside, water's edge",
'注ぐ to pour (into); to sprinkle on (from above)',
'お水 water, (drinking) water, (glass of) water'
]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。