blob: 40ea4baa636ac43aad78a5eb30fbbf2a1c884bed (
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 TokenReading {
text: string;
ruby?: string;
};
export interface GlossaryDefinition {
};
export interface Glossary {
id: number;
definitions: GlossaryDefinition[];
};
export interface ParseToken {
reading: TokenReading[];
tags: TokenTags;
glossary?: Glossary;
term_id: number;
source: string;
};
export interface ParseResult {
depth: ParseDepth;
tokens: ParseToken[]
};
/** @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;
};
};
|