blob: d3585f8293939389f0aca0878a8213daf347d7e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
import { TokenTags } from "./tags.ts";
export enum ParseDepth {
Term,
Glossary,
};
export interface GlossaryDefinition {
};
export interface Glossary {
id: number;
definitions: GlossaryDefinition[];
};
export interface ParseToken {
writing: string;
reading: string;
tags: TokenTags;
glossary?: Glossary;
term_id: number;
source: string;
start: number;
};
export interface ParseResult {
depth: ParseDepth;
tokens: ParseToken[];
input: string;
};
/** @summary option struct for Parser */
export interface InputSentenceProps {
/** @prop max amount of characters to look ahead when attempting to deconjugate */
lookahead: number;
/** @prop amount of detail to return in search results */
depth: ParseDepth;
/** @prop search bias multipliers */
priorityMod: {
/** @prop multiplier for negative bias */
low: number;
/** @prop multiplier for positive bias */
high: number;
};
/** @prop list of breaks treated as delimiter */
breaks: Array<number>;
};
|