ExtractInputtype
What to read, and the dictionary to read it against: the argument of extractFromText.
Import it
import type { ExtractInput } from "@johnmorrisdotca/hikidashi/extract";
Also exported from: @johnmorrisdotca/hikidashi
Definition
type ExtractInput = {
text: string;
known?: KnownWords;
};
Members
| Name | Type | Description |
|---|---|---|
text | string | The pasted text, of any length; it is cut to |
known (optional) | KnownWords | undefined | The words your dictionary confirmed. Without it, only kanji are found. |
Examples
import { extractFromText, type ExtractInput } from "@johnmorrisdotca/hikidashi/extract";
const input: ExtractInput = { text: "毎日、水を飲む。" };
console.log(extractFromText(input).kanji);[ '毎', '日', '水', '飲' ]What it prints (run when this page was built)