リファレンス · 読み、表記、英語の意味、漢字、ローマ字から単語を引く
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 べなかった. Conjugation changes the end of a word, so the pieces of the dictionary form hold as far as the two spellings agree, and what follows is kana that needs no reading. 来 takes the reading its ending asks for.
インポート
import { furiganaOfSurface } from "@johnmorrisdotca/jisho/words";
定義
function furiganaOfSurface(surface: string, base: string, reading: string): FuriganaPart[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
surface | string | The word as the text writes it. |
base | string | The dictionary form it comes from, as spelled when it was looked up (the surface itself for a word that is not conjugated). |
reading | string | The reading of the dictionary form. |
戻り値
FuriganaPart[]
The pieces, which put together are surface.
例
import { furiganaOfSurface } from "@johnmorrisdotca/jisho/words";
console.log(furiganaOfSurface("食べなかった", "食べる", "たべる")); // [{ text: "食", reading: "た" }, { text: "べなかった" }][ { text: '食', reading: 'た' }, { text: 'べ' }, { text: 'なかった' } ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。