import { TokenTags } from "./tags.ts"; export interface SearchGlossaryDefinition { }; export interface SearchGlossary { id: number; definitions: SearchGlossaryDefinition[]; }; export interface SearchTermResult { /** @property dictionary term id */ id: number; /** @property (preferably) kanji writing of term */ writing: string; /** @property kana-only reading of term */ reading: string; /** @property word tags including deconjugation tags */ tags: TokenTags; /** @property original conjugated string */ source: string; /** @property numeric sorting value for term */ sort: number; /** @property amount of steps that were needed to deconjugate */ depth: number; /** @property matching results */ match: { /** @property term matched by writing */ writing: boolean; /** @property term matched by reading */ reading: boolean; } }; export interface SearchWord extends SearchTermResult { /** @property starting index of word in sentence */ start: number; }; export interface SearchSentenceResult { words: SearchWord[]; input: string; }; /** @summary options for Search.sentence() */ export interface SearchSentenceProps { /** @prop max amount of characters to look ahead when attempting to deconjugate words */ lookahead: number; /** @prop search bias values */ priorityMod: { /** @prop offset for negative bias */ low: number; /** @prop offset for positive bias */ high: number; }; /** @prop list of breaks treated as delimiter */ breaks: Array; };