ezmedicationinput 0.1.58 → 0.1.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/advice-locale-adapter.d.ts +19 -0
- package/dist/body-site-context-terminology.d.ts +5 -0
- package/dist/hpsg/lexical-classes.d.ts +13 -7
- package/dist/index.cjs +11317 -9176
- package/dist/index.d.ts +12 -0
- package/dist/index.js +11303 -9176
- package/dist/instruction-action-locale-adapter.d.ts +40 -0
- package/dist/instruction-action-terminology.d.ts +2 -0
- package/dist/instruction-graph.d.ts +2 -1
- package/dist/lexer/locale.d.ts +9 -1
- package/dist/lexer/locales/th.d.ts +8 -0
- package/dist/lexer/surface-segmenter.d.ts +17 -0
- package/dist/locale-detection.d.ts +9 -0
- package/dist/locale-realization.d.ts +13 -0
- package/dist/localization.d.ts +8 -0
- package/dist/relation-terminology.d.ts +2 -1
- package/dist/suggest-locale-adapter.d.ts +31 -0
- package/dist/types.d.ts +19 -19
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AdviceFrame, AdviceModality } from "./types";
|
|
2
|
+
export interface AdviceLocaleRealizationInput {
|
|
3
|
+
frame: AdviceFrame;
|
|
4
|
+
predicate: string;
|
|
5
|
+
realizerProfile: string;
|
|
6
|
+
argText?: string;
|
|
7
|
+
modalityText?: string;
|
|
8
|
+
relationText?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface AdviceLocaleAdapter {
|
|
11
|
+
locale: string;
|
|
12
|
+
realizeModality(modality: AdviceModality | undefined): string | undefined;
|
|
13
|
+
siteArgument(text: string): string;
|
|
14
|
+
joinArguments(texts: string[]): string | undefined;
|
|
15
|
+
realize(input: AdviceLocaleRealizationInput): string;
|
|
16
|
+
finalize(text: string): string;
|
|
17
|
+
}
|
|
18
|
+
export declare function registerAdviceLocaleAdapter(adapter: AdviceLocaleAdapter): void;
|
|
19
|
+
export declare function getAdviceLocaleAdapter(locale: string): AdviceLocaleAdapter;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const AMBIGUOUS_DIGIT_SITE_KEYS: Set<string>;
|
|
2
|
+
export declare const HAND_CONTEXT_KEYS: Set<string>;
|
|
3
|
+
export declare const FOOT_CONTEXT_KEYS: Set<string>;
|
|
4
|
+
export declare const BODY_SITE_SOURCE_LEAD_PREFIXES: string[];
|
|
5
|
+
export declare function stripBodySiteSourceLead(value: string): string;
|
|
@@ -13,12 +13,14 @@ type CompoundDoseUnit = {
|
|
|
13
13
|
tails: string[];
|
|
14
14
|
tailSequences?: string[][];
|
|
15
15
|
requiresSiteContext?: boolean;
|
|
16
|
+
requiresProductContext?: boolean;
|
|
16
17
|
unit: string;
|
|
17
18
|
};
|
|
18
|
-
type InstructionQuantityUnitLabel = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
export type InstructionQuantityUnitLabel = {
|
|
20
|
+
locales: Record<string, {
|
|
21
|
+
one: string;
|
|
22
|
+
other: string;
|
|
23
|
+
}>;
|
|
22
24
|
};
|
|
23
25
|
export declare const SITE_ANCHORS: Set<string>;
|
|
24
26
|
export declare const SITE_SELF_DISPLAY_ANCHORS: Set<string>;
|
|
@@ -27,7 +29,9 @@ export declare const BODY_SITE_PARTITIVE_HEADS: Set<string>;
|
|
|
27
29
|
export declare const BODY_SITE_PARTITIVE_MODIFIERS: Set<string>;
|
|
28
30
|
export declare const BODY_SITE_PARTITIVE_CONNECTORS: Set<string>;
|
|
29
31
|
export declare const BODY_SITE_BARE_NOMINAL_PREFIXES: Set<string>;
|
|
32
|
+
export declare const BODY_SITE_BARE_NOMINAL_PREFIX_I18N: Record<string, Record<string, string>>;
|
|
30
33
|
export declare const BODY_SITE_ATTRIBUTIVE_MODIFIERS: Set<string>;
|
|
34
|
+
export declare const BODY_SITE_ATTRIBUTIVE_MODIFIER_I18N: Record<string, Record<string, string>>;
|
|
31
35
|
export declare const OTIC_SITE_WORDS: Set<string>;
|
|
32
36
|
export declare const OPHTHALMIC_SITE_WORDS: Set<string>;
|
|
33
37
|
export declare const NASAL_SITE_WORDS: Set<string>;
|
|
@@ -35,7 +39,7 @@ export declare const BODY_SITE_ADJECTIVE_SUFFIXES: readonly string[];
|
|
|
35
39
|
export declare const BODY_SITE_DISPLAY_PENALTY_WORDS: Set<string>;
|
|
36
40
|
export declare const BODY_SITE_FEATURE_SCORE_BONUS: Map<BodySiteFeatureKind, number>;
|
|
37
41
|
export declare const CONNECTORS: Set<string>;
|
|
38
|
-
export declare
|
|
42
|
+
export declare function methodAuxiliaryVerbsForLocale(locale: string): ReadonlySet<string>;
|
|
39
43
|
export declare const COORDINATED_NOUN_METHOD_VERBS: Set<string>;
|
|
40
44
|
export declare const METHOD_NOUN_LEFT_CONTEXT: Map<string, Set<string>>;
|
|
41
45
|
export declare const PRODUCT_EXTERNAL_MODIFIERS: Set<string>;
|
|
@@ -63,8 +67,8 @@ export declare const PRN_GENERIC_LOCATED_HEADS: Map<string, string>;
|
|
|
63
67
|
export declare const PRN_DEFAULT_SITE_CONNECTOR: string;
|
|
64
68
|
export declare const PRN_COMPACT_REASON_SEPARATORS: Set<string>;
|
|
65
69
|
export declare const SITE_ROUTE_HINTS_ALLOWED_IN_GRAMMAR: Set<import("../types").SNOMEDCTRouteCodes>;
|
|
66
|
-
export declare const
|
|
67
|
-
export declare
|
|
70
|
+
export declare const PRODUCT_METHOD_REALIZATIONS: Record<string, Partial<Record<string, Record<string, string>>>>;
|
|
71
|
+
export declare function productMethodRealizations(verb: string, product: string): Record<string, string> | undefined;
|
|
68
72
|
export declare const PRODUCT_FORM_MODIFIERS: Set<string>;
|
|
69
73
|
export declare const COMPOUND_DOSE_UNITS: CompoundDoseUnit[];
|
|
70
74
|
export declare const IMPLICIT_SINGLE_DOSE_UNITS: Set<string>;
|
|
@@ -125,6 +129,7 @@ export declare const ACTION_DIRECTIVE_PREFIXES: {
|
|
|
125
129
|
modality: AdviceModality | undefined;
|
|
126
130
|
}[];
|
|
127
131
|
export declare const ACTION_COORDINATION_CONNECTORS: Set<string>;
|
|
132
|
+
export declare const ACTION_COORDINATION_CONNECTOR_I18N: Record<string, Record<string, string>>;
|
|
128
133
|
export declare const ACTION_SEQUENCE_RELATION_TOKENS: ReadonlySet<string>;
|
|
129
134
|
export declare const INSTRUCTION_DURATION_UNITS: Map<string, string>;
|
|
130
135
|
export declare const INSTRUCTION_DURATION_APPROXIMATION_LEADS: Set<string>;
|
|
@@ -140,6 +145,7 @@ export declare const ALTERNATE_EVENT_CADENCES: {
|
|
|
140
145
|
export declare const ADMINISTRATION_WINDOW_INSTRUCTIONS: {
|
|
141
146
|
parts: string[];
|
|
142
147
|
text: string;
|
|
148
|
+
offsetOnly: boolean;
|
|
143
149
|
i18n: {
|
|
144
150
|
th: string;
|
|
145
151
|
} | undefined;
|