ExtractInput型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What to read, and the dictionary to read it against: the argument of extractFromText.
インポート
import type { ExtractInput } from "@johnmorrisdotca/hikidashi/extract";
ほかのエクスポート元: @johnmorrisdotca/hikidashi
定義
type ExtractInput = {
text: string;
known?: KnownWords;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
text | string | The pasted text, of any length; it is cut to |
known (省略可) | KnownWords | undefined | The words your dictionary confirmed. Without it, only kanji are found. |
例
import { extractFromText, type ExtractInput } from "@johnmorrisdotca/hikidashi/extract";
const input: ExtractInput = { text: "毎日、水を飲む。" };
console.log(extractFromText(input).kanji);[ '毎', '日', '水', '飲' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。