リファレンス · 読み、表記、英語の意味、漢字、ローマ字から単語を引く
findInflected関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Looks a text up as it is written or as a conjugated form: 食べなかった finds 食べる, with the path "negative, past". It loads the
text and the dictionary forms its ending could come from (a few pieces, about 25 kB gzipped each, where a plain lookup costs
one or two), and keeps those that are the kind of word the ending needs. See inflectedOf for the details, and
deinflect for the endings.
インポート
import { findInflected } from "@johnmorrisdotca/jisho/words";
定義
function findInflected(text: string, options?: Omit<LoadWordsOptions, "previous" | "inflected">): Promise<InflectedWord[]>
引数
| 名前 | 型 | 説明 |
|---|---|---|
text | string | A reading or a written form, conjugated or not. |
options (省略可) | Omit<LoadWordsOptions, "previous" | "inflected"> | The mode, the lists and |
戻り値
Promise<InflectedWord[]>
The words with their paths, the text's own first.
例
import { findInflected } from "@johnmorrisdotca/jisho/words";
const found = await findInflected("食べなかった");
console.log(found[0]?.word.written, found[0]?.path.join(", ")); // 食べる negative, past食べる negative, past出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。