@sharpee/lang-en-us 0.9.61-beta
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/LICENSE +21 -0
- package/README.md +105 -0
- package/dist-npm/actions/about.d.ts +35 -0
- package/dist-npm/actions/about.d.ts.map +1 -0
- package/dist-npm/actions/about.js +50 -0
- package/dist-npm/actions/about.js.map +1 -0
- package/dist-npm/actions/again.d.ts +16 -0
- package/dist-npm/actions/again.d.ts.map +1 -0
- package/dist-npm/actions/again.js +23 -0
- package/dist-npm/actions/again.js.map +1 -0
- package/dist-npm/actions/answering.d.ts +29 -0
- package/dist-npm/actions/answering.d.ts.map +1 -0
- package/dist-npm/actions/answering.js +44 -0
- package/dist-npm/actions/answering.js.map +1 -0
- package/dist-npm/actions/asking.d.ts +31 -0
- package/dist-npm/actions/asking.d.ts.map +1 -0
- package/dist-npm/actions/asking.js +44 -0
- package/dist-npm/actions/asking.js.map +1 -0
- package/dist-npm/actions/attacking.d.ts +82 -0
- package/dist-npm/actions/attacking.d.ts.map +1 -0
- package/dist-npm/actions/attacking.js +111 -0
- package/dist-npm/actions/attacking.js.map +1 -0
- package/dist-npm/actions/climbing.d.ts +27 -0
- package/dist-npm/actions/climbing.d.ts.map +1 -0
- package/dist-npm/actions/climbing.js +48 -0
- package/dist-npm/actions/climbing.js.map +1 -0
- package/dist-npm/actions/closing.d.ts +21 -0
- package/dist-npm/actions/closing.d.ts.map +1 -0
- package/dist-npm/actions/closing.js +27 -0
- package/dist-npm/actions/closing.js.map +1 -0
- package/dist-npm/actions/drinking.d.ts +40 -0
- package/dist-npm/actions/drinking.d.ts.map +1 -0
- package/dist-npm/actions/drinking.js +57 -0
- package/dist-npm/actions/drinking.js.map +1 -0
- package/dist-npm/actions/dropping.d.ts +22 -0
- package/dist-npm/actions/dropping.d.ts.map +1 -0
- package/dist-npm/actions/dropping.js +31 -0
- package/dist-npm/actions/dropping.js.map +1 -0
- package/dist-npm/actions/eating.d.ts +37 -0
- package/dist-npm/actions/eating.d.ts.map +1 -0
- package/dist-npm/actions/eating.js +54 -0
- package/dist-npm/actions/eating.js.map +1 -0
- package/dist-npm/actions/entering.d.ts +26 -0
- package/dist-npm/actions/entering.d.ts.map +1 -0
- package/dist-npm/actions/entering.js +49 -0
- package/dist-npm/actions/entering.js.map +1 -0
- package/dist-npm/actions/examining.d.ts +37 -0
- package/dist-npm/actions/examining.d.ts.map +1 -0
- package/dist-npm/actions/examining.js +50 -0
- package/dist-npm/actions/examining.js.map +1 -0
- package/dist-npm/actions/exiting.d.ts +23 -0
- package/dist-npm/actions/exiting.d.ts.map +1 -0
- package/dist-npm/actions/exiting.js +40 -0
- package/dist-npm/actions/exiting.js.map +1 -0
- package/dist-npm/actions/giving.d.ts +30 -0
- package/dist-npm/actions/giving.d.ts.map +1 -0
- package/dist-npm/actions/giving.js +45 -0
- package/dist-npm/actions/giving.js.map +1 -0
- package/dist-npm/actions/going.d.ts +35 -0
- package/dist-npm/actions/going.d.ts.map +1 -0
- package/dist-npm/actions/going.js +45 -0
- package/dist-npm/actions/going.js.map +1 -0
- package/dist-npm/actions/help.d.ts +26 -0
- package/dist-npm/actions/help.d.ts.map +1 -0
- package/dist-npm/actions/help.js +44 -0
- package/dist-npm/actions/help.js.map +1 -0
- package/dist-npm/actions/index.d.ts +1327 -0
- package/dist-npm/actions/index.d.ts.map +1 -0
- package/dist-npm/actions/index.js +208 -0
- package/dist-npm/actions/index.js.map +1 -0
- package/dist-npm/actions/inserting.d.ts +25 -0
- package/dist-npm/actions/inserting.d.ts.map +1 -0
- package/dist-npm/actions/inserting.js +33 -0
- package/dist-npm/actions/inserting.js.map +1 -0
- package/dist-npm/actions/inventory.d.ts +32 -0
- package/dist-npm/actions/inventory.d.ts.map +1 -0
- package/dist-npm/actions/inventory.js +41 -0
- package/dist-npm/actions/inventory.js.map +1 -0
- package/dist-npm/actions/listening.d.ts +26 -0
- package/dist-npm/actions/listening.d.ts.map +1 -0
- package/dist-npm/actions/listening.js +37 -0
- package/dist-npm/actions/listening.js.map +1 -0
- package/dist-npm/actions/locking.d.ts +25 -0
- package/dist-npm/actions/locking.d.ts.map +1 -0
- package/dist-npm/actions/locking.js +33 -0
- package/dist-npm/actions/locking.js.map +1 -0
- package/dist-npm/actions/looking.d.ts +23 -0
- package/dist-npm/actions/looking.d.ts.map +1 -0
- package/dist-npm/actions/looking.js +34 -0
- package/dist-npm/actions/looking.js.map +1 -0
- package/dist-npm/actions/lowering.d.ts +22 -0
- package/dist-npm/actions/lowering.d.ts.map +1 -0
- package/dist-npm/actions/lowering.js +29 -0
- package/dist-npm/actions/lowering.js.map +1 -0
- package/dist-npm/actions/opening.d.ts +23 -0
- package/dist-npm/actions/opening.d.ts.map +1 -0
- package/dist-npm/actions/opening.js +30 -0
- package/dist-npm/actions/opening.js.map +1 -0
- package/dist-npm/actions/pulling.d.ts +35 -0
- package/dist-npm/actions/pulling.d.ts.map +1 -0
- package/dist-npm/actions/pulling.js +53 -0
- package/dist-npm/actions/pulling.js.map +1 -0
- package/dist-npm/actions/pushing.d.ts +30 -0
- package/dist-npm/actions/pushing.d.ts.map +1 -0
- package/dist-npm/actions/pushing.js +45 -0
- package/dist-npm/actions/pushing.js.map +1 -0
- package/dist-npm/actions/putting.d.ts +28 -0
- package/dist-npm/actions/putting.d.ts.map +1 -0
- package/dist-npm/actions/putting.js +40 -0
- package/dist-npm/actions/putting.js.map +1 -0
- package/dist-npm/actions/quitting.d.ts +31 -0
- package/dist-npm/actions/quitting.d.ts.map +1 -0
- package/dist-npm/actions/quitting.js +47 -0
- package/dist-npm/actions/quitting.js.map +1 -0
- package/dist-npm/actions/raising.d.ts +22 -0
- package/dist-npm/actions/raising.d.ts.map +1 -0
- package/dist-npm/actions/raising.js +30 -0
- package/dist-npm/actions/raising.js.map +1 -0
- package/dist-npm/actions/reading.d.ts +23 -0
- package/dist-npm/actions/reading.d.ts.map +1 -0
- package/dist-npm/actions/reading.js +32 -0
- package/dist-npm/actions/reading.js.map +1 -0
- package/dist-npm/actions/removing.d.ts +25 -0
- package/dist-npm/actions/removing.d.ts.map +1 -0
- package/dist-npm/actions/removing.js +34 -0
- package/dist-npm/actions/removing.js.map +1 -0
- package/dist-npm/actions/restoring.d.ts +35 -0
- package/dist-npm/actions/restoring.d.ts.map +1 -0
- package/dist-npm/actions/restoring.js +51 -0
- package/dist-npm/actions/restoring.js.map +1 -0
- package/dist-npm/actions/saving.d.ts +33 -0
- package/dist-npm/actions/saving.d.ts.map +1 -0
- package/dist-npm/actions/saving.js +48 -0
- package/dist-npm/actions/saving.js.map +1 -0
- package/dist-npm/actions/scoring.d.ts +42 -0
- package/dist-npm/actions/scoring.d.ts.map +1 -0
- package/dist-npm/actions/scoring.js +70 -0
- package/dist-npm/actions/scoring.js.map +1 -0
- package/dist-npm/actions/searching.d.ts +26 -0
- package/dist-npm/actions/searching.d.ts.map +1 -0
- package/dist-npm/actions/searching.js +40 -0
- package/dist-npm/actions/searching.js.map +1 -0
- package/dist-npm/actions/showing.d.ts +29 -0
- package/dist-npm/actions/showing.d.ts.map +1 -0
- package/dist-npm/actions/showing.js +40 -0
- package/dist-npm/actions/showing.js.map +1 -0
- package/dist-npm/actions/sleeping.d.ts +28 -0
- package/dist-npm/actions/sleeping.d.ts.map +1 -0
- package/dist-npm/actions/sleeping.js +41 -0
- package/dist-npm/actions/sleeping.js.map +1 -0
- package/dist-npm/actions/smelling.d.ts +30 -0
- package/dist-npm/actions/smelling.d.ts.map +1 -0
- package/dist-npm/actions/smelling.js +43 -0
- package/dist-npm/actions/smelling.js.map +1 -0
- package/dist-npm/actions/switching-off.d.ts +28 -0
- package/dist-npm/actions/switching-off.d.ts.map +1 -0
- package/dist-npm/actions/switching-off.js +42 -0
- package/dist-npm/actions/switching-off.js.map +1 -0
- package/dist-npm/actions/switching-on.d.ts +28 -0
- package/dist-npm/actions/switching-on.d.ts.map +1 -0
- package/dist-npm/actions/switching-on.js +42 -0
- package/dist-npm/actions/switching-on.js.map +1 -0
- package/dist-npm/actions/taking-off.d.ts +20 -0
- package/dist-npm/actions/taking-off.d.ts.map +1 -0
- package/dist-npm/actions/taking-off.js +28 -0
- package/dist-npm/actions/taking-off.js.map +1 -0
- package/dist-npm/actions/taking.d.ts +26 -0
- package/dist-npm/actions/taking.d.ts.map +1 -0
- package/dist-npm/actions/taking.js +36 -0
- package/dist-npm/actions/taking.js.map +1 -0
- package/dist-npm/actions/talking.d.ts +33 -0
- package/dist-npm/actions/talking.d.ts.map +1 -0
- package/dist-npm/actions/talking.js +49 -0
- package/dist-npm/actions/talking.js.map +1 -0
- package/dist-npm/actions/telling.d.ts +30 -0
- package/dist-npm/actions/telling.d.ts.map +1 -0
- package/dist-npm/actions/telling.js +42 -0
- package/dist-npm/actions/telling.js.map +1 -0
- package/dist-npm/actions/throwing.d.ts +39 -0
- package/dist-npm/actions/throwing.d.ts.map +1 -0
- package/dist-npm/actions/throwing.js +60 -0
- package/dist-npm/actions/throwing.js.map +1 -0
- package/dist-npm/actions/touching.d.ts +36 -0
- package/dist-npm/actions/touching.d.ts.map +1 -0
- package/dist-npm/actions/touching.js +50 -0
- package/dist-npm/actions/touching.js.map +1 -0
- package/dist-npm/actions/turning.d.ts +40 -0
- package/dist-npm/actions/turning.d.ts.map +1 -0
- package/dist-npm/actions/turning.js +62 -0
- package/dist-npm/actions/turning.js.map +1 -0
- package/dist-npm/actions/undoing.d.ts +19 -0
- package/dist-npm/actions/undoing.d.ts.map +1 -0
- package/dist-npm/actions/undoing.js +26 -0
- package/dist-npm/actions/undoing.js.map +1 -0
- package/dist-npm/actions/unlocking.d.ts +25 -0
- package/dist-npm/actions/unlocking.d.ts.map +1 -0
- package/dist-npm/actions/unlocking.js +32 -0
- package/dist-npm/actions/unlocking.js.map +1 -0
- package/dist-npm/actions/using.d.ts +43 -0
- package/dist-npm/actions/using.d.ts.map +1 -0
- package/dist-npm/actions/using.js +61 -0
- package/dist-npm/actions/using.js.map +1 -0
- package/dist-npm/actions/version.d.ts +18 -0
- package/dist-npm/actions/version.d.ts.map +1 -0
- package/dist-npm/actions/version.js +26 -0
- package/dist-npm/actions/version.js.map +1 -0
- package/dist-npm/actions/waiting.d.ts +27 -0
- package/dist-npm/actions/waiting.d.ts.map +1 -0
- package/dist-npm/actions/waiting.js +36 -0
- package/dist-npm/actions/waiting.js.map +1 -0
- package/dist-npm/actions/wearing.d.ts +22 -0
- package/dist-npm/actions/wearing.d.ts.map +1 -0
- package/dist-npm/actions/wearing.js +30 -0
- package/dist-npm/actions/wearing.js.map +1 -0
- package/dist-npm/data/events.d.ts +134 -0
- package/dist-npm/data/events.d.ts.map +1 -0
- package/dist-npm/data/events.js +301 -0
- package/dist-npm/data/events.js.map +1 -0
- package/dist-npm/data/messages.d.ts +141 -0
- package/dist-npm/data/messages.d.ts.map +1 -0
- package/dist-npm/data/messages.js +300 -0
- package/dist-npm/data/messages.js.map +1 -0
- package/dist-npm/data/templates.d.ts +257 -0
- package/dist-npm/data/templates.d.ts.map +1 -0
- package/dist-npm/data/templates.js +289 -0
- package/dist-npm/data/templates.js.map +1 -0
- package/dist-npm/data/verbs.d.ts +68 -0
- package/dist-npm/data/verbs.d.ts.map +1 -0
- package/dist-npm/data/verbs.js +324 -0
- package/dist-npm/data/verbs.js.map +1 -0
- package/dist-npm/data/words.d.ts +79 -0
- package/dist-npm/data/words.d.ts.map +1 -0
- package/dist-npm/data/words.js +218 -0
- package/dist-npm/data/words.js.map +1 -0
- package/dist-npm/formatters/article.d.ts +41 -0
- package/dist-npm/formatters/article.d.ts.map +1 -0
- package/dist-npm/formatters/article.js +143 -0
- package/dist-npm/formatters/article.js.map +1 -0
- package/dist-npm/formatters/index.d.ts +18 -0
- package/dist-npm/formatters/index.d.ts.map +1 -0
- package/dist-npm/formatters/index.js +38 -0
- package/dist-npm/formatters/index.js.map +1 -0
- package/dist-npm/formatters/list.d.ts +38 -0
- package/dist-npm/formatters/list.d.ts.map +1 -0
- package/dist-npm/formatters/list.js +94 -0
- package/dist-npm/formatters/list.js.map +1 -0
- package/dist-npm/formatters/registry.d.ts +48 -0
- package/dist-npm/formatters/registry.d.ts.map +1 -0
- package/dist-npm/formatters/registry.js +128 -0
- package/dist-npm/formatters/registry.js.map +1 -0
- package/dist-npm/formatters/text.d.ts +33 -0
- package/dist-npm/formatters/text.d.ts.map +1 -0
- package/dist-npm/formatters/text.js +80 -0
- package/dist-npm/formatters/text.js.map +1 -0
- package/dist-npm/formatters/types.d.ts +41 -0
- package/dist-npm/formatters/types.d.ts.map +1 -0
- package/dist-npm/formatters/types.js +14 -0
- package/dist-npm/formatters/types.js.map +1 -0
- package/dist-npm/grammar.d.ts +189 -0
- package/dist-npm/grammar.d.ts.map +1 -0
- package/dist-npm/grammar.js +203 -0
- package/dist-npm/grammar.js.map +1 -0
- package/dist-npm/index.d.ts +22 -0
- package/dist-npm/index.d.ts.map +1 -0
- package/dist-npm/index.js +59 -0
- package/dist-npm/index.js.map +1 -0
- package/dist-npm/language-provider.d.ts +159 -0
- package/dist-npm/language-provider.d.ts.map +1 -0
- package/dist-npm/language-provider.js +527 -0
- package/dist-npm/language-provider.js.map +1 -0
- package/dist-npm/npc/index.d.ts +5 -0
- package/dist-npm/npc/index.d.ts.map +1 -0
- package/dist-npm/npc/index.js +21 -0
- package/dist-npm/npc/index.js.map +1 -0
- package/dist-npm/npc/npc.d.ts +43 -0
- package/dist-npm/npc/npc.d.ts.map +1 -0
- package/dist-npm/npc/npc.js +55 -0
- package/dist-npm/npc/npc.js.map +1 -0
- package/dist-npm/perspective/index.d.ts +5 -0
- package/dist-npm/perspective/index.d.ts.map +1 -0
- package/dist-npm/perspective/index.js +12 -0
- package/dist-npm/perspective/index.js.map +1 -0
- package/dist-npm/perspective/placeholder-resolver.d.ts +102 -0
- package/dist-npm/perspective/placeholder-resolver.d.ts.map +1 -0
- package/dist-npm/perspective/placeholder-resolver.js +275 -0
- package/dist-npm/perspective/placeholder-resolver.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Text Formatters
|
|
4
|
+
*
|
|
5
|
+
* Formatters for case transformation and text manipulation.
|
|
6
|
+
*
|
|
7
|
+
* @see ADR-095 Message Templates with Formatters
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.titleFormatter = exports.lowerFormatter = exports.upperFormatter = exports.capFormatter = void 0;
|
|
11
|
+
/**
|
|
12
|
+
* Extract name from value (string or EntityInfo)
|
|
13
|
+
*/
|
|
14
|
+
function getName(value) {
|
|
15
|
+
return typeof value === 'string' ? value : value.name;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* "cap" formatter - capitalize first letter
|
|
19
|
+
*
|
|
20
|
+
* "sword" → "Sword"
|
|
21
|
+
*/
|
|
22
|
+
const capFormatter = (value, _context) => {
|
|
23
|
+
// Handle arrays
|
|
24
|
+
if (Array.isArray(value)) {
|
|
25
|
+
return value.map((v) => (0, exports.capFormatter)(v, _context)).join(', ');
|
|
26
|
+
}
|
|
27
|
+
const text = getName(value);
|
|
28
|
+
if (!text)
|
|
29
|
+
return '';
|
|
30
|
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
31
|
+
};
|
|
32
|
+
exports.capFormatter = capFormatter;
|
|
33
|
+
/**
|
|
34
|
+
* "upper" formatter - all uppercase
|
|
35
|
+
*
|
|
36
|
+
* "sword" → "SWORD"
|
|
37
|
+
*/
|
|
38
|
+
const upperFormatter = (value, _context) => {
|
|
39
|
+
// Handle arrays
|
|
40
|
+
if (Array.isArray(value)) {
|
|
41
|
+
return value.map((v) => (0, exports.upperFormatter)(v, _context)).join(', ');
|
|
42
|
+
}
|
|
43
|
+
const text = getName(value);
|
|
44
|
+
return text.toUpperCase();
|
|
45
|
+
};
|
|
46
|
+
exports.upperFormatter = upperFormatter;
|
|
47
|
+
/**
|
|
48
|
+
* "lower" formatter - all lowercase
|
|
49
|
+
*
|
|
50
|
+
* "SWORD" → "sword"
|
|
51
|
+
*/
|
|
52
|
+
const lowerFormatter = (value, _context) => {
|
|
53
|
+
// Handle arrays
|
|
54
|
+
if (Array.isArray(value)) {
|
|
55
|
+
return value.map((v) => (0, exports.lowerFormatter)(v, _context)).join(', ');
|
|
56
|
+
}
|
|
57
|
+
const text = getName(value);
|
|
58
|
+
return text.toLowerCase();
|
|
59
|
+
};
|
|
60
|
+
exports.lowerFormatter = lowerFormatter;
|
|
61
|
+
/**
|
|
62
|
+
* "title" formatter - title case (capitalize each word)
|
|
63
|
+
*
|
|
64
|
+
* "brass lantern" → "Brass Lantern"
|
|
65
|
+
*/
|
|
66
|
+
const titleFormatter = (value, _context) => {
|
|
67
|
+
// Handle arrays
|
|
68
|
+
if (Array.isArray(value)) {
|
|
69
|
+
return value.map((v) => (0, exports.titleFormatter)(v, _context)).join(', ');
|
|
70
|
+
}
|
|
71
|
+
const text = getName(value);
|
|
72
|
+
if (!text)
|
|
73
|
+
return '';
|
|
74
|
+
return text
|
|
75
|
+
.split(' ')
|
|
76
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
77
|
+
.join(' ');
|
|
78
|
+
};
|
|
79
|
+
exports.titleFormatter = titleFormatter;
|
|
80
|
+
//# sourceMappingURL=text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/formatters/text.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAIH;;GAEG;AACH,SAAS,OAAO,CAAC,KAA0B;IACzC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;AACxD,CAAC;AAED;;;;GAIG;AACI,MAAM,YAAY,GAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;IACzD,gBAAgB;IAChB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;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C,KAAK,CAAC,CAAC;IAC5B,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;AAC5B,CAAC,CAAC;AARW,QAAA,cAAc,kBAQzB;AAEF;;;;GAIG;AACI,MAAM,cAAc,GAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;IAC3D,gBAAgB;IAChB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,sBAAc,EAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAErB,OAAO,IAAI;SACR,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;SACzE,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC,CAAC;AAbW,QAAA,cAAc,kBAazB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formatter Types
|
|
3
|
+
*
|
|
4
|
+
* Formatters transform placeholder values in message templates.
|
|
5
|
+
*
|
|
6
|
+
* Syntax: {formatter:formatter:...:placeholder}
|
|
7
|
+
* Example: {a:item} → "a sword"
|
|
8
|
+
* Example: {items:list} → "a sword, a key, and a coin"
|
|
9
|
+
*
|
|
10
|
+
* @see ADR-095 Message Templates with Formatters
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Context passed to formatters
|
|
14
|
+
*/
|
|
15
|
+
export interface FormatterContext {
|
|
16
|
+
/** Get entity by ID for nounType/article lookup */
|
|
17
|
+
getEntity?: (id: string) => EntityInfo | undefined;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Minimal entity info for formatting
|
|
21
|
+
*/
|
|
22
|
+
export interface EntityInfo {
|
|
23
|
+
name: string;
|
|
24
|
+
nounType?: 'common' | 'proper' | 'mass' | 'unique' | 'plural';
|
|
25
|
+
properName?: boolean;
|
|
26
|
+
article?: string;
|
|
27
|
+
grammaticalNumber?: 'singular' | 'plural';
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Formatter function signature
|
|
31
|
+
*
|
|
32
|
+
* @param value - The value to format (string, array, or EntityInfo)
|
|
33
|
+
* @param context - Formatting context with entity lookup
|
|
34
|
+
* @returns Formatted string
|
|
35
|
+
*/
|
|
36
|
+
export type Formatter = (value: string | string[] | EntityInfo | EntityInfo[], context: FormatterContext) => string;
|
|
37
|
+
/**
|
|
38
|
+
* Formatter registry - maps formatter names to functions
|
|
39
|
+
*/
|
|
40
|
+
export type FormatterRegistry = Map<string, Formatter>;
|
|
41
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/formatters/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mDAAmD;IACnD,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAC;CACpD;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;CAC3C;AAED;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,CACtB,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,GAAG,UAAU,EAAE,EACpD,OAAO,EAAE,gBAAgB,KACtB,MAAM,CAAC;AAEZ;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Formatter Types
|
|
4
|
+
*
|
|
5
|
+
* Formatters transform placeholder values in message templates.
|
|
6
|
+
*
|
|
7
|
+
* Syntax: {formatter:formatter:...:placeholder}
|
|
8
|
+
* Example: {a:item} → "a sword"
|
|
9
|
+
* Example: {items:list} → "a sword, a key, and a coin"
|
|
10
|
+
*
|
|
11
|
+
* @see ADR-095 Message Templates with Formatters
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/formatters/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* English-specific grammar types and constants
|
|
3
|
+
*
|
|
4
|
+
* This module defines the parts of speech and grammatical structures
|
|
5
|
+
* specific to the English language. Other languages will have their
|
|
6
|
+
* own grammar modules with different parts of speech.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* English parts of speech
|
|
10
|
+
*
|
|
11
|
+
* Note: This is specific to English and may not apply to other languages.
|
|
12
|
+
* For example, Japanese has particles, Turkish has postpositions, etc.
|
|
13
|
+
*/
|
|
14
|
+
export declare const EnglishPartsOfSpeech: Readonly<{
|
|
15
|
+
readonly VERB: "verb";
|
|
16
|
+
readonly NOUN: "noun";
|
|
17
|
+
readonly ADJECTIVE: "adjective";
|
|
18
|
+
readonly ARTICLE: "article";
|
|
19
|
+
readonly PREPOSITION: "preposition";
|
|
20
|
+
readonly PRONOUN: "pronoun";
|
|
21
|
+
readonly DETERMINER: "determiner";
|
|
22
|
+
readonly CONJUNCTION: "conjunction";
|
|
23
|
+
readonly INTERJECTION: "interjection";
|
|
24
|
+
readonly DIRECTION: "direction";
|
|
25
|
+
readonly ADVERB: "adverb";
|
|
26
|
+
readonly AUXILIARY: "auxiliary";
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Type for English parts of speech values
|
|
30
|
+
*/
|
|
31
|
+
export type EnglishPartOfSpeech = typeof EnglishPartsOfSpeech[keyof typeof EnglishPartsOfSpeech];
|
|
32
|
+
/**
|
|
33
|
+
* English grammar patterns
|
|
34
|
+
*
|
|
35
|
+
* These patterns describe common command structures in English
|
|
36
|
+
*/
|
|
37
|
+
export declare const EnglishGrammarPatterns: {
|
|
38
|
+
readonly VERB_ONLY: {
|
|
39
|
+
readonly name: "verb_only";
|
|
40
|
+
readonly elements: readonly ["VERB"];
|
|
41
|
+
readonly example: "look";
|
|
42
|
+
readonly description: "Simple intransitive verb";
|
|
43
|
+
};
|
|
44
|
+
readonly VERB_NOUN: {
|
|
45
|
+
readonly name: "verb_noun";
|
|
46
|
+
readonly elements: readonly ["VERB", "NOUN_PHRASE"];
|
|
47
|
+
readonly example: "take ball";
|
|
48
|
+
readonly description: "Transitive verb with direct object";
|
|
49
|
+
};
|
|
50
|
+
readonly VERB_NOUN_PREP_NOUN: {
|
|
51
|
+
readonly name: "verb_noun_prep_noun";
|
|
52
|
+
readonly elements: readonly ["VERB", "NOUN_PHRASE", "PREP", "NOUN_PHRASE"];
|
|
53
|
+
readonly example: "put ball in box";
|
|
54
|
+
readonly description: "Ditransitive verb with direct and indirect objects";
|
|
55
|
+
};
|
|
56
|
+
readonly VERB_PREP_NOUN: {
|
|
57
|
+
readonly name: "verb_prep_noun";
|
|
58
|
+
readonly elements: readonly ["VERB", "PREP", "NOUN_PHRASE"];
|
|
59
|
+
readonly example: "look at painting";
|
|
60
|
+
readonly description: "Verb with prepositional phrase";
|
|
61
|
+
};
|
|
62
|
+
readonly VERB_PARTICLE_NOUN: {
|
|
63
|
+
readonly name: "verb_particle_noun";
|
|
64
|
+
readonly elements: readonly ["VERB", "PARTICLE", "NOUN_PHRASE"];
|
|
65
|
+
readonly example: "pick up ball";
|
|
66
|
+
readonly description: "Phrasal verb with direct object";
|
|
67
|
+
};
|
|
68
|
+
readonly VERB_NOUN_PARTICLE: {
|
|
69
|
+
readonly name: "verb_noun_particle";
|
|
70
|
+
readonly elements: readonly ["VERB", "NOUN_PHRASE", "PARTICLE"];
|
|
71
|
+
readonly example: "put ball down";
|
|
72
|
+
readonly description: "Phrasal verb with object before particle";
|
|
73
|
+
};
|
|
74
|
+
readonly VERB_DIRECTION: {
|
|
75
|
+
readonly name: "verb_direction";
|
|
76
|
+
readonly elements: readonly ["VERB", "DIRECTION"];
|
|
77
|
+
readonly example: "go north";
|
|
78
|
+
readonly description: "Movement verb with direction";
|
|
79
|
+
};
|
|
80
|
+
readonly DIRECTION_ONLY: {
|
|
81
|
+
readonly name: "direction_only";
|
|
82
|
+
readonly elements: readonly ["DIRECTION"];
|
|
83
|
+
readonly example: "north";
|
|
84
|
+
readonly description: "Implicit movement command";
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Type for English grammar pattern names
|
|
89
|
+
*/
|
|
90
|
+
export type EnglishGrammarPatternName = keyof typeof EnglishGrammarPatterns;
|
|
91
|
+
/**
|
|
92
|
+
* English-specific token type for language processing
|
|
93
|
+
*/
|
|
94
|
+
export interface EnglishToken {
|
|
95
|
+
/** Original word as typed */
|
|
96
|
+
word: string;
|
|
97
|
+
/** Normalized form (lowercase, etc.) */
|
|
98
|
+
normalized: string;
|
|
99
|
+
/** Character position in original input */
|
|
100
|
+
position: number;
|
|
101
|
+
/** Length of the token */
|
|
102
|
+
length: number;
|
|
103
|
+
/** Possible English parts of speech */
|
|
104
|
+
partsOfSpeech: EnglishPartOfSpeech[];
|
|
105
|
+
/** Additional English-specific data */
|
|
106
|
+
englishData?: {
|
|
107
|
+
/** Is this a contraction? */
|
|
108
|
+
isContraction?: boolean;
|
|
109
|
+
/** Expanded form if contraction */
|
|
110
|
+
expandedForm?: string;
|
|
111
|
+
/** Is this part of a phrasal verb? */
|
|
112
|
+
isPhrasalVerbParticle?: boolean;
|
|
113
|
+
/** Is this a modal verb? */
|
|
114
|
+
isModal?: boolean;
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* English verb forms and conjugations
|
|
119
|
+
*/
|
|
120
|
+
export interface EnglishVerbForms {
|
|
121
|
+
/** Base form (infinitive without 'to') */
|
|
122
|
+
base: string;
|
|
123
|
+
/** Third person singular present */
|
|
124
|
+
thirdPersonSingular?: string;
|
|
125
|
+
/** Past tense */
|
|
126
|
+
past?: string;
|
|
127
|
+
/** Past participle */
|
|
128
|
+
pastParticiple?: string;
|
|
129
|
+
/** Present participle (-ing form) */
|
|
130
|
+
presentParticiple?: string;
|
|
131
|
+
/** Imperative form (usually same as base) */
|
|
132
|
+
imperative?: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* English noun properties
|
|
136
|
+
*/
|
|
137
|
+
export interface EnglishNounProperties {
|
|
138
|
+
/** Singular form */
|
|
139
|
+
singular: string;
|
|
140
|
+
/** Plural form */
|
|
141
|
+
plural?: string;
|
|
142
|
+
/** Is this a mass noun (uncountable)? */
|
|
143
|
+
isMassNoun?: boolean;
|
|
144
|
+
/** Is this a proper noun? */
|
|
145
|
+
isProperNoun?: boolean;
|
|
146
|
+
/** Common adjectives that collocate with this noun */
|
|
147
|
+
commonAdjectives?: string[];
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* English preposition properties
|
|
151
|
+
*/
|
|
152
|
+
export interface EnglishPrepositionProperties {
|
|
153
|
+
/** The preposition */
|
|
154
|
+
preposition: string;
|
|
155
|
+
/** Type of relationship it expresses */
|
|
156
|
+
relationshipType: 'spatial' | 'temporal' | 'logical' | 'other';
|
|
157
|
+
/** Can it be used as a particle in phrasal verbs? */
|
|
158
|
+
canBeParticle?: boolean;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Utility functions for English grammar
|
|
162
|
+
*/
|
|
163
|
+
export declare const EnglishGrammarUtils: {
|
|
164
|
+
/**
|
|
165
|
+
* Check if a word is likely an article
|
|
166
|
+
*/
|
|
167
|
+
isArticle(word: string): boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Check if a word is a common determiner
|
|
170
|
+
*/
|
|
171
|
+
isDeterminer(word: string): boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Check if a word is a pronoun
|
|
174
|
+
*/
|
|
175
|
+
isPronoun(word: string): boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Check if a word is a conjunction
|
|
178
|
+
*/
|
|
179
|
+
isConjunction(word: string): boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Get the indefinite article for a word
|
|
182
|
+
*/
|
|
183
|
+
getIndefiniteArticle(word: string): "a" | "an";
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Export all grammar types and constants
|
|
187
|
+
*/
|
|
188
|
+
export * from './index';
|
|
189
|
+
//# sourceMappingURL=grammar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grammar.d.ts","sourceRoot":"","sources":["../src/grammar.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;EAatB,CAAC;AAEZ;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,oBAAoB,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEjG;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAsD;IACtD,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,sBAAsB;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,gBAAgB,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC;IAC/D,qDAAqD;IACrD,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB;IAC9B;;OAEG;oBACa,MAAM,GAAG,OAAO;IAKhC;;OAEG;uBACgB,MAAM,GAAG,OAAO;IAUnC;;OAEG;oBACa,MAAM,GAAG,OAAO;IAYhC;;OAEG;wBACiB,MAAM,GAAG,OAAO;IASpC;;OAEG;+BACwB,MAAM,GAAG,GAAG,GAAG,IAAI;CAqD/C,CAAC;AAEF;;GAEG;AACH,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* English-specific grammar types and constants
|
|
4
|
+
*
|
|
5
|
+
* This module defines the parts of speech and grammatical structures
|
|
6
|
+
* specific to the English language. Other languages will have their
|
|
7
|
+
* own grammar modules with different parts of speech.
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
21
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.EnglishGrammarUtils = exports.EnglishGrammarPatterns = exports.EnglishPartsOfSpeech = void 0;
|
|
25
|
+
/**
|
|
26
|
+
* English parts of speech
|
|
27
|
+
*
|
|
28
|
+
* Note: This is specific to English and may not apply to other languages.
|
|
29
|
+
* For example, Japanese has particles, Turkish has postpositions, etc.
|
|
30
|
+
*/
|
|
31
|
+
exports.EnglishPartsOfSpeech = Object.freeze({
|
|
32
|
+
VERB: 'verb',
|
|
33
|
+
NOUN: 'noun',
|
|
34
|
+
ADJECTIVE: 'adjective',
|
|
35
|
+
ARTICLE: 'article',
|
|
36
|
+
PREPOSITION: 'preposition',
|
|
37
|
+
PRONOUN: 'pronoun',
|
|
38
|
+
DETERMINER: 'determiner',
|
|
39
|
+
CONJUNCTION: 'conjunction',
|
|
40
|
+
INTERJECTION: 'interjection',
|
|
41
|
+
DIRECTION: 'direction',
|
|
42
|
+
ADVERB: 'adverb',
|
|
43
|
+
AUXILIARY: 'auxiliary'
|
|
44
|
+
});
|
|
45
|
+
/**
|
|
46
|
+
* English grammar patterns
|
|
47
|
+
*
|
|
48
|
+
* These patterns describe common command structures in English
|
|
49
|
+
*/
|
|
50
|
+
exports.EnglishGrammarPatterns = {
|
|
51
|
+
VERB_ONLY: {
|
|
52
|
+
name: 'verb_only',
|
|
53
|
+
elements: ['VERB'],
|
|
54
|
+
example: 'look',
|
|
55
|
+
description: 'Simple intransitive verb'
|
|
56
|
+
},
|
|
57
|
+
VERB_NOUN: {
|
|
58
|
+
name: 'verb_noun',
|
|
59
|
+
elements: ['VERB', 'NOUN_PHRASE'],
|
|
60
|
+
example: 'take ball',
|
|
61
|
+
description: 'Transitive verb with direct object'
|
|
62
|
+
},
|
|
63
|
+
VERB_NOUN_PREP_NOUN: {
|
|
64
|
+
name: 'verb_noun_prep_noun',
|
|
65
|
+
elements: ['VERB', 'NOUN_PHRASE', 'PREP', 'NOUN_PHRASE'],
|
|
66
|
+
example: 'put ball in box',
|
|
67
|
+
description: 'Ditransitive verb with direct and indirect objects'
|
|
68
|
+
},
|
|
69
|
+
VERB_PREP_NOUN: {
|
|
70
|
+
name: 'verb_prep_noun',
|
|
71
|
+
elements: ['VERB', 'PREP', 'NOUN_PHRASE'],
|
|
72
|
+
example: 'look at painting',
|
|
73
|
+
description: 'Verb with prepositional phrase'
|
|
74
|
+
},
|
|
75
|
+
VERB_PARTICLE_NOUN: {
|
|
76
|
+
name: 'verb_particle_noun',
|
|
77
|
+
elements: ['VERB', 'PARTICLE', 'NOUN_PHRASE'],
|
|
78
|
+
example: 'pick up ball',
|
|
79
|
+
description: 'Phrasal verb with direct object'
|
|
80
|
+
},
|
|
81
|
+
VERB_NOUN_PARTICLE: {
|
|
82
|
+
name: 'verb_noun_particle',
|
|
83
|
+
elements: ['VERB', 'NOUN_PHRASE', 'PARTICLE'],
|
|
84
|
+
example: 'put ball down',
|
|
85
|
+
description: 'Phrasal verb with object before particle'
|
|
86
|
+
},
|
|
87
|
+
VERB_DIRECTION: {
|
|
88
|
+
name: 'verb_direction',
|
|
89
|
+
elements: ['VERB', 'DIRECTION'],
|
|
90
|
+
example: 'go north',
|
|
91
|
+
description: 'Movement verb with direction'
|
|
92
|
+
},
|
|
93
|
+
DIRECTION_ONLY: {
|
|
94
|
+
name: 'direction_only',
|
|
95
|
+
elements: ['DIRECTION'],
|
|
96
|
+
example: 'north',
|
|
97
|
+
description: 'Implicit movement command'
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Utility functions for English grammar
|
|
102
|
+
*/
|
|
103
|
+
exports.EnglishGrammarUtils = {
|
|
104
|
+
/**
|
|
105
|
+
* Check if a word is likely an article
|
|
106
|
+
*/
|
|
107
|
+
isArticle(word) {
|
|
108
|
+
const articles = ['a', 'an', 'the'];
|
|
109
|
+
return articles.includes(word.toLowerCase());
|
|
110
|
+
},
|
|
111
|
+
/**
|
|
112
|
+
* Check if a word is a common determiner
|
|
113
|
+
*/
|
|
114
|
+
isDeterminer(word) {
|
|
115
|
+
const determiners = [
|
|
116
|
+
'all', 'every', 'some', 'any', 'no', 'each',
|
|
117
|
+
'this', 'that', 'these', 'those',
|
|
118
|
+
'my', 'your', 'his', 'her', 'its', 'our', 'their',
|
|
119
|
+
'much', 'many', 'few', 'little', 'several'
|
|
120
|
+
];
|
|
121
|
+
return determiners.includes(word.toLowerCase());
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
* Check if a word is a pronoun
|
|
125
|
+
*/
|
|
126
|
+
isPronoun(word) {
|
|
127
|
+
const pronouns = [
|
|
128
|
+
'i', 'me', 'you', 'he', 'him', 'she', 'her', 'it',
|
|
129
|
+
'we', 'us', 'they', 'them',
|
|
130
|
+
'myself', 'yourself', 'himself', 'herself', 'itself',
|
|
131
|
+
'ourselves', 'yourselves', 'themselves',
|
|
132
|
+
'this', 'that', 'these', 'those',
|
|
133
|
+
'who', 'whom', 'whose', 'which', 'what'
|
|
134
|
+
];
|
|
135
|
+
return pronouns.includes(word.toLowerCase());
|
|
136
|
+
},
|
|
137
|
+
/**
|
|
138
|
+
* Check if a word is a conjunction
|
|
139
|
+
*/
|
|
140
|
+
isConjunction(word) {
|
|
141
|
+
const conjunctions = [
|
|
142
|
+
'and', 'or', 'but', 'nor', 'for', 'yet', 'so',
|
|
143
|
+
'although', 'because', 'since', 'unless',
|
|
144
|
+
'while', 'when', 'where', 'if'
|
|
145
|
+
];
|
|
146
|
+
return conjunctions.includes(word.toLowerCase());
|
|
147
|
+
},
|
|
148
|
+
/**
|
|
149
|
+
* Get the indefinite article for a word
|
|
150
|
+
*/
|
|
151
|
+
getIndefiniteArticle(word) {
|
|
152
|
+
if (!word || word.length === 0) {
|
|
153
|
+
throw new Error('Cannot determine article for empty string');
|
|
154
|
+
}
|
|
155
|
+
const lowerWord = word.toLowerCase();
|
|
156
|
+
const firstChar = lowerWord[0];
|
|
157
|
+
const vowels = ['a', 'e', 'i', 'o', 'u'];
|
|
158
|
+
// Special cases for numbers
|
|
159
|
+
const numberSounds = {
|
|
160
|
+
'8': 'an', // "eight"
|
|
161
|
+
'11': 'an', // "eleven"
|
|
162
|
+
'18': 'an', // "eighteen"
|
|
163
|
+
'80': 'an', // "eighty"
|
|
164
|
+
'800': 'an', // "eight hundred"
|
|
165
|
+
'1': 'a', // "one"
|
|
166
|
+
'2': 'a', // "two"
|
|
167
|
+
'3': 'a', // "three"
|
|
168
|
+
'4': 'a', // "four"
|
|
169
|
+
'5': 'a', // "five"
|
|
170
|
+
'6': 'a', // "six"
|
|
171
|
+
'7': 'a', // "seven"
|
|
172
|
+
'9': 'a', // "nine"
|
|
173
|
+
'10': 'a', // "ten"
|
|
174
|
+
'12': 'a', // "twelve"
|
|
175
|
+
'13': 'a', // "thirteen"
|
|
176
|
+
'14': 'a', // "fourteen"
|
|
177
|
+
'15': 'a', // "fifteen"
|
|
178
|
+
'16': 'a', // "sixteen"
|
|
179
|
+
'17': 'a', // "seventeen"
|
|
180
|
+
'19': 'a', // "nineteen"
|
|
181
|
+
};
|
|
182
|
+
// Check if it's a number
|
|
183
|
+
if (word in numberSounds) {
|
|
184
|
+
return numberSounds[word];
|
|
185
|
+
}
|
|
186
|
+
// Special cases for words starting with silent 'h'
|
|
187
|
+
const silentH = ['hour', 'honest', 'honor', 'heir'];
|
|
188
|
+
if (silentH.some(w => lowerWord.startsWith(w))) {
|
|
189
|
+
return 'an';
|
|
190
|
+
}
|
|
191
|
+
// Special cases for words starting with 'u' that sound like 'you'
|
|
192
|
+
const uSoundsLikeYou = ['unit', 'university', 'unique', 'uniform'];
|
|
193
|
+
if (uSoundsLikeYou.some(w => lowerWord.startsWith(w))) {
|
|
194
|
+
return 'a';
|
|
195
|
+
}
|
|
196
|
+
return vowels.includes(firstChar) ? 'an' : 'a';
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Export all grammar types and constants
|
|
201
|
+
*/
|
|
202
|
+
__exportStar(require("./index"), exports);
|
|
203
|
+
//# sourceMappingURL=grammar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grammar.js","sourceRoot":"","sources":["../src/grammar.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;AAEH;;;;;GAKG;AACU,QAAA,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,YAAY;IACxB,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;CACd,CAAC,CAAC;AAOZ;;;;GAIG;AACU,QAAA,sBAAsB,GAAG;IACpC,SAAS,EAAE;QACT,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,CAAC,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM;QACf,WAAW,EAAE,0BAA0B;KACxC;IACD,SAAS,EAAE;QACT,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;QACjC,OAAO,EAAE,WAAW;QACpB,WAAW,EAAE,oCAAoC;KAClD;IACD,mBAAmB,EAAE;QACnB,IAAI,EAAE,qBAAqB;QAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,CAAC;QACxD,OAAO,EAAE,iBAAiB;QAC1B,WAAW,EAAE,oDAAoD;KAClE;IACD,cAAc,EAAE;QACd,IAAI,EAAE,gBAAgB;QACtB,QAAQ,EAAE,CAAC,MAAM,EAA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AAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/C,OAAO,IAAI,CAAC;QACd,CAAC;QAED,kEAAkE;QAClE,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;QACnE,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACtD,OAAO,GAAG,CAAC;QACb,CAAC;QAED,OAAO,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACjD,CAAC;CACF,CAAC;AAEF;;GAEG;AACH,0CAAwB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* English (US) Language Package for Sharpee IF Platform
|
|
3
|
+
*
|
|
4
|
+
* Provides English language support including:
|
|
5
|
+
* - Vocabulary (verbs, nouns, adjectives, etc.)
|
|
6
|
+
* - Grammar patterns
|
|
7
|
+
* - Text formatting and lemmatization
|
|
8
|
+
* - Message templates
|
|
9
|
+
* - Action patterns and messages
|
|
10
|
+
* - NPC messages (ADR-070)
|
|
11
|
+
*/
|
|
12
|
+
export { EnglishLanguageProvider, default } from './language-provider';
|
|
13
|
+
export { EnglishLanguageProvider as LanguageProvider } from './language-provider';
|
|
14
|
+
export type { VerbDefinition } from './data/verbs';
|
|
15
|
+
export * from './grammar';
|
|
16
|
+
export * from './actions';
|
|
17
|
+
export * from './npc';
|
|
18
|
+
export * from './perspective';
|
|
19
|
+
export * from './formatters';
|
|
20
|
+
export { cardinalNumbers, ordinalNumbers, directionMap, englishWords, abbreviations, irregularPlurals } from './data/words';
|
|
21
|
+
export { parserErrors, getParserErrorMessage } from './data/messages';
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,uBAAuB,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGlF,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnD,cAAc,WAAW,CAAC;AAG1B,cAAc,WAAW,CAAC;AAG1B,cAAc,OAAO,CAAC;AAGtB,cAAc,eAAe,CAAC;AAG9B,cAAc,cAAc,CAAC;AAG7B,OAAO,EACL,eAAe,EACf,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* English (US) Language Package for Sharpee IF Platform
|
|
4
|
+
*
|
|
5
|
+
* Provides English language support including:
|
|
6
|
+
* - Vocabulary (verbs, nouns, adjectives, etc.)
|
|
7
|
+
* - Grammar patterns
|
|
8
|
+
* - Text formatting and lemmatization
|
|
9
|
+
* - Message templates
|
|
10
|
+
* - Action patterns and messages
|
|
11
|
+
* - NPC messages (ADR-070)
|
|
12
|
+
*/
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
26
|
+
};
|
|
27
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
28
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.getParserErrorMessage = exports.parserErrors = exports.irregularPlurals = exports.abbreviations = exports.englishWords = exports.directionMap = exports.ordinalNumbers = exports.cardinalNumbers = exports.LanguageProvider = exports.default = exports.EnglishLanguageProvider = void 0;
|
|
32
|
+
var language_provider_1 = require("./language-provider");
|
|
33
|
+
Object.defineProperty(exports, "EnglishLanguageProvider", { enumerable: true, get: function () { return language_provider_1.EnglishLanguageProvider; } });
|
|
34
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(language_provider_1).default; } });
|
|
35
|
+
var language_provider_2 = require("./language-provider"); // For convenience
|
|
36
|
+
Object.defineProperty(exports, "LanguageProvider", { enumerable: true, get: function () { return language_provider_2.EnglishLanguageProvider; } });
|
|
37
|
+
// Export grammar types and constants
|
|
38
|
+
__exportStar(require("./grammar"), exports);
|
|
39
|
+
// Export action language definitions
|
|
40
|
+
__exportStar(require("./actions"), exports);
|
|
41
|
+
// Export NPC language definitions (ADR-070)
|
|
42
|
+
__exportStar(require("./npc"), exports);
|
|
43
|
+
// Export perspective placeholder resolution (ADR-089)
|
|
44
|
+
__exportStar(require("./perspective"), exports);
|
|
45
|
+
// Export formatter system (ADR-095)
|
|
46
|
+
__exportStar(require("./formatters"), exports);
|
|
47
|
+
// Export vocabulary data for parser use (ADR-082)
|
|
48
|
+
var words_1 = require("./data/words");
|
|
49
|
+
Object.defineProperty(exports, "cardinalNumbers", { enumerable: true, get: function () { return words_1.cardinalNumbers; } });
|
|
50
|
+
Object.defineProperty(exports, "ordinalNumbers", { enumerable: true, get: function () { return words_1.ordinalNumbers; } });
|
|
51
|
+
Object.defineProperty(exports, "directionMap", { enumerable: true, get: function () { return words_1.directionMap; } });
|
|
52
|
+
Object.defineProperty(exports, "englishWords", { enumerable: true, get: function () { return words_1.englishWords; } });
|
|
53
|
+
Object.defineProperty(exports, "abbreviations", { enumerable: true, get: function () { return words_1.abbreviations; } });
|
|
54
|
+
Object.defineProperty(exports, "irregularPlurals", { enumerable: true, get: function () { return words_1.irregularPlurals; } });
|
|
55
|
+
// Export parser error messages (Phase 1.2 recommendations)
|
|
56
|
+
var messages_1 = require("./data/messages");
|
|
57
|
+
Object.defineProperty(exports, "parserErrors", { enumerable: true, get: function () { return messages_1.parserErrors; } });
|
|
58
|
+
Object.defineProperty(exports, "getParserErrorMessage", { enumerable: true, get: function () { return messages_1.getParserErrorMessage; } });
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;AAEH,yDAAuE;AAA9D,4HAAA,uBAAuB,OAAA;AAAE,6HAAA,OAAO,OAAA;AACzC,yDAAkF,CAAC,kBAAkB;AAA5F,qHAAA,uBAAuB,OAAoB;AAKpD,qCAAqC;AACrC,4CAA0B;AAE1B,qCAAqC;AACrC,4CAA0B;AAE1B,4CAA4C;AAC5C,wCAAsB;AAEtB,sDAAsD;AACtD,gDAA8B;AAE9B,oCAAoC;AACpC,+CAA6B;AAE7B,kDAAkD;AAClD,sCAOsB;AANpB,wGAAA,eAAe,OAAA;AACf,uGAAA,cAAc,OAAA;AACd,qGAAA,YAAY,OAAA;AACZ,qGAAA,YAAY,OAAA;AACZ,sGAAA,aAAa,OAAA;AACb,yGAAA,gBAAgB,OAAA;AAGlB,2DAA2D;AAC3D,4CAAsE;AAA7D,wGAAA,YAAY,OAAA;AAAE,iHAAA,qBAAqB,OAAA"}
|