@keymanapp/kmc-model 17.0.154-alpha → 17.0.156-alpha

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.
Files changed (41) hide show
  1. package/build/src/build-trie.d.ts +42 -40
  2. package/build/src/build-trie.d.ts.map +1 -1
  3. package/build/src/build-trie.js +370 -366
  4. package/build/src/build-trie.js.map +1 -1
  5. package/build/src/compiler-callbacks.d.ts +6 -4
  6. package/build/src/compiler-callbacks.d.ts.map +1 -1
  7. package/build/src/compiler-callbacks.js +7 -5
  8. package/build/src/compiler-callbacks.js.map +1 -1
  9. package/build/src/join-word-breaker-decorator.d.ts +12 -10
  10. package/build/src/join-word-breaker-decorator.d.ts.map +1 -1
  11. package/build/src/join-word-breaker-decorator.js +123 -121
  12. package/build/src/join-word-breaker-decorator.js.map +1 -1
  13. package/build/src/lexical-model-compiler.d.ts +19 -16
  14. package/build/src/lexical-model-compiler.d.ts.map +1 -1
  15. package/build/src/lexical-model-compiler.js +153 -150
  16. package/build/src/lexical-model-compiler.js.map +1 -1
  17. package/build/src/lexical-model.d.ts +137 -135
  18. package/build/src/lexical-model.d.ts.map +1 -1
  19. package/build/src/lexical-model.js +8 -6
  20. package/build/src/lexical-model.js.map +1 -1
  21. package/build/src/main.d.ts +19 -17
  22. package/build/src/main.d.ts.map +1 -1
  23. package/build/src/main.js +60 -60
  24. package/build/src/main.js.map +1 -1
  25. package/build/src/model-compiler-errors.d.ts +53 -51
  26. package/build/src/model-compiler-errors.d.ts.map +1 -1
  27. package/build/src/model-compiler-errors.js +58 -56
  28. package/build/src/model-compiler-errors.js.map +1 -1
  29. package/build/src/model-defaults.d.ts +58 -56
  30. package/build/src/model-defaults.d.ts.map +1 -1
  31. package/build/src/model-defaults.js +108 -106
  32. package/build/src/model-defaults.js.map +1 -1
  33. package/build/src/model-definitions.d.ts +73 -71
  34. package/build/src/model-definitions.d.ts.map +1 -1
  35. package/build/src/model-definitions.js +191 -189
  36. package/build/src/model-definitions.js.map +1 -1
  37. package/build/src/script-overrides-decorator.d.ts +6 -4
  38. package/build/src/script-overrides-decorator.d.ts.map +1 -1
  39. package/build/src/script-overrides-decorator.js +66 -64
  40. package/build/src/script-overrides-decorator.js.map +1 -1
  41. package/package.json +7 -7
@@ -1,6 +1,8 @@
1
- /**
2
- * Interfaces and constants used by the lexical model compiler. These target
3
- * the LMLayer's internal worker code, so we provide those definitions too.
4
- */
5
- export {};
6
- //# sourceMappingURL=lexical-model.js.map
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="db833885-8485-590d-8312-b220c28096e9")}catch(e){}}();
2
+ /**
3
+ * Interfaces and constants used by the lexical model compiler. These target
4
+ * the LMLayer's internal worker code, so we provide those definitions too.
5
+ */
6
+ export {};
7
+ //# debugId=db833885-8485-590d-8312-b220c28096e9
8
+ //# sourceMappingURL=lexical-model.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lexical-model.js","sourceRoot":"","sources":["../../src/lexical-model.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
1
+ {"debug_id":"db833885-8485-590d-8312-b220c28096e9","file":"lexical-model.js","mappings":";AAAA;;;GAGG","names":[],"sourceRoot":"","sources":["../../src/lexical-model.ts"],"version":3}
@@ -1,17 +1,19 @@
1
- import { CompilerCallbacks } from '@keymanapp/common-types';
2
- import { LexicalModelSource } from './lexical-model.js';
3
- export { default as LexicalModelCompiler } from './lexical-model-compiler.js';
4
- /**
5
- * Compiles a model.ts file, using paths relative to its location.
6
- *
7
- * @param filename path to model.ts source.
8
- * @return model source code, or null on error
9
- */
10
- export declare function compileModel(filename: string, callbacks: CompilerCallbacks): string;
11
- /**
12
- * Loads a lexical model's source module from the given filename.
13
- *
14
- * @param filename path to the model source file.
15
- */
16
- export declare function loadFromFilename(filename: string, callbacks: CompilerCallbacks): LexicalModelSource;
17
- //# sourceMappingURL=main.d.ts.map
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="914ad039-c717-5956-b13a-c57d240219d0")}catch(e){}}();
2
+ import { CompilerCallbacks } from '@keymanapp/common-types';
3
+ import { LexicalModelSource } from './lexical-model.js';
4
+ export { default as LexicalModelCompiler } from './lexical-model-compiler.js';
5
+ /**
6
+ * Compiles a model.ts file, using paths relative to its location.
7
+ *
8
+ * @param filename path to model.ts source.
9
+ * @return model source code, or null on error
10
+ */
11
+ export declare function compileModel(filename: string, callbacks: CompilerCallbacks): string;
12
+ /**
13
+ * Loads a lexical model's source module from the given filename.
14
+ *
15
+ * @param filename path to the model source file.
16
+ */
17
+ export declare function loadFromFilename(filename: string, callbacks: CompilerCallbacks): LexicalModelSource;
18
+ //# debugId=914ad039-c717-5956-b13a-c57d240219d0
19
+ //# sourceMappingURL=main.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAO5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAE9E;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,MAAM,CAiBnF;AAWD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,kBAAkB,CA6BnG"}
1
+ {"debug_id":"914ad039-c717-5956-b13a-c57d240219d0","file":"main.d.ts","mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAK5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAE9E;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,MAAM,CAiBnF;AAWD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,kBAAkB,CA6BnG","names":[],"sourceRoot":"","sources":["../../src/main.ts"],"version":3}
package/build/src/main.js CHANGED
@@ -1,60 +1,60 @@
1
- import * as fs from 'fs';
2
- import * as path from 'path';
3
- import ts from 'typescript';
4
- import { setCompilerCallbacks } from './compiler-callbacks.js';
5
- import LexicalModelCompiler from './lexical-model-compiler.js';
6
- import { ModelCompilerError, ModelCompilerMessageContext, ModelCompilerMessages } from './model-compiler-errors.js';
7
- export { default as LexicalModelCompiler } from './lexical-model-compiler.js';
8
- /**
9
- * Compiles a model.ts file, using paths relative to its location.
10
- *
11
- * @param filename path to model.ts source.
12
- * @return model source code, or null on error
13
- */
14
- export function compileModel(filename, callbacks) {
15
- setCompilerCallbacks(callbacks);
16
- try {
17
- let modelSource = loadFromFilename(filename, callbacks);
18
- let containingDirectory = path.dirname(filename);
19
- return (new LexicalModelCompiler)
20
- .generateLexicalModelCode('<unknown>', modelSource, containingDirectory);
21
- }
22
- catch (e) {
23
- callbacks.reportMessage(e instanceof ModelCompilerError
24
- ? e.event
25
- : ModelCompilerMessages.Fatal_UnexpectedException({ e: e }));
26
- }
27
- return null;
28
- }
29
- /**
30
- * Loads a lexical model's source module from the given filename.
31
- *
32
- * @param filename path to the model source file.
33
- */
34
- export function loadFromFilename(filename, callbacks) {
35
- setCompilerCallbacks(callbacks);
36
- let sourceCode = fs.readFileSync(filename, 'utf8');
37
- // Compile the module to JavaScript code.
38
- // NOTE: transpile module does a very simple TS to JS compilation.
39
- // It DOES NOT check for types!
40
- let compilationOutput = ts.transpile(sourceCode, {
41
- // Our runtime only supports ES3 with Node/CommonJS modules on Android 5.0.
42
- // When we drop Android 5.0 support, we can update this to a `ScriptTarget`
43
- // matrix against target version of Keyman, here and in
44
- // lexical-model-compiler.ts.
45
- target: ts.ScriptTarget.ES3,
46
- module: ts.ModuleKind.CommonJS,
47
- });
48
- // Turn the module into a function in which we can inject a global.
49
- let moduleCode = '(function(exports){' + compilationOutput + '})';
50
- // Run the module; its exports will be assigned to `moduleExports`.
51
- let moduleExports = {};
52
- let module = eval(moduleCode);
53
- module(moduleExports);
54
- if (!moduleExports['__esModule'] || !moduleExports['default']) {
55
- ModelCompilerMessageContext.filename = filename;
56
- throw new ModelCompilerError(ModelCompilerMessages.Error_NoDefaultExport());
57
- }
58
- return moduleExports['default'];
59
- }
60
- //# sourceMappingURL=main.js.map
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f09f4d7a-0757-5697-8d03-cea9f4438922")}catch(e){}}();
2
+ import ts from 'typescript';
3
+ import { setCompilerCallbacks } from './compiler-callbacks.js';
4
+ import LexicalModelCompiler from './lexical-model-compiler.js';
5
+ import { ModelCompilerError, ModelCompilerMessageContext, ModelCompilerMessages } from './model-compiler-errors.js';
6
+ export { default as LexicalModelCompiler } from './lexical-model-compiler.js';
7
+ /**
8
+ * Compiles a model.ts file, using paths relative to its location.
9
+ *
10
+ * @param filename path to model.ts source.
11
+ * @return model source code, or null on error
12
+ */
13
+ export function compileModel(filename, callbacks) {
14
+ setCompilerCallbacks(callbacks);
15
+ try {
16
+ let modelSource = loadFromFilename(filename, callbacks);
17
+ let containingDirectory = callbacks.path.dirname(filename);
18
+ return (new LexicalModelCompiler(callbacks))
19
+ .generateLexicalModelCode('<unknown>', modelSource, containingDirectory);
20
+ }
21
+ catch (e) {
22
+ callbacks.reportMessage(e instanceof ModelCompilerError
23
+ ? e.event
24
+ : ModelCompilerMessages.Fatal_UnexpectedException({ e: e }));
25
+ }
26
+ return null;
27
+ }
28
+ /**
29
+ * Loads a lexical model's source module from the given filename.
30
+ *
31
+ * @param filename path to the model source file.
32
+ */
33
+ export function loadFromFilename(filename, callbacks) {
34
+ setCompilerCallbacks(callbacks);
35
+ let sourceCode = new TextDecoder().decode(callbacks.loadFile(filename));
36
+ // Compile the module to JavaScript code.
37
+ // NOTE: transpile module does a very simple TS to JS compilation.
38
+ // It DOES NOT check for types!
39
+ let compilationOutput = ts.transpile(sourceCode, {
40
+ // Our runtime only supports ES3 with Node/CommonJS modules on Android 5.0.
41
+ // When we drop Android 5.0 support, we can update this to a `ScriptTarget`
42
+ // matrix against target version of Keyman, here and in
43
+ // lexical-model-compiler.ts.
44
+ target: ts.ScriptTarget.ES3,
45
+ module: ts.ModuleKind.CommonJS,
46
+ });
47
+ // Turn the module into a function in which we can inject a global.
48
+ let moduleCode = '(function(exports){' + compilationOutput + '})';
49
+ // Run the module; its exports will be assigned to `moduleExports`.
50
+ let moduleExports = {};
51
+ let module = eval(moduleCode);
52
+ module(moduleExports);
53
+ if (!moduleExports['__esModule'] || !moduleExports['default']) {
54
+ ModelCompilerMessageContext.filename = filename;
55
+ throw new ModelCompilerError(ModelCompilerMessages.Error_NoDefaultExport());
56
+ }
57
+ return moduleExports['default'];
58
+ }
59
+ //# debugId=f09f4d7a-0757-5697-8d03-cea9f4438922
60
+ //# sourceMappingURL=main.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,oBAAoB,MAAM,6BA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,CAAuB,CAAC;AACxD,CAAC","names":[],"sourceRoot":"","sources":["../../src/main.ts"],"version":3}
@@ -1,51 +1,53 @@
1
- import { CompilerEvent } from "@keymanapp/common-types";
2
- export declare class ModelCompilerMessageContext {
3
- static line: number;
4
- static filename: string;
5
- }
6
- export declare class ModelCompilerMessages {
7
- static Fatal_UnexpectedException: (o: {
8
- e: any;
9
- }) => CompilerEvent;
10
- static FATAL_UnexpectedException: number;
11
- static Warn_MixedNormalizationForms: (o: {
12
- wordform: string;
13
- }) => CompilerEvent;
14
- static WARN_MixedNormalizationForms: number;
15
- static Warn_DuplicateWordInSameFile: (o: {
16
- wordform: string;
17
- }) => CompilerEvent;
18
- static WARN_DuplicateWordInSameFile: number;
19
- static Error_UnimplementedModelFormat: (o: {
20
- format: string;
21
- }) => CompilerEvent;
22
- static ERROR_UnimplementedModelFormat: number;
23
- static Error_UnknownModelFormat: (o: {
24
- format: string;
25
- }) => CompilerEvent;
26
- static ERROR_UnknownModelFormat: number;
27
- static Error_NoDefaultExport: () => CompilerEvent;
28
- static ERROR_NoDefaultExport: number;
29
- static Error_SearchTermToKeyMustBeExplicitlySpecified: () => CompilerEvent;
30
- static ERROR_SearchTermToKeyMustBeExplicitlySpecified: number;
31
- static Error_UTF16BEUnsupported: () => CompilerEvent;
32
- static ERROR_UTF16BEUnsupported: number;
33
- static Error_UnknownWordBreaker: (o: {
34
- spec: string;
35
- }) => CompilerEvent;
36
- static ERROR_UnknownWordBreaker: number;
37
- static Error_UnsupportedScriptOverride: (o: {
38
- option: string;
39
- }) => CompilerEvent;
40
- static ERROR_UnsupportedScriptOverride: number;
41
- }
42
- /**
43
- * A ModelCompilerError should be thrown when an unrecoverable error occurs that
44
- * would block further compilation. It will be caught in the top-most compiler
45
- * API endpoint and converted into a callback message.
46
- */
47
- export declare class ModelCompilerError extends Error {
48
- event: CompilerEvent;
49
- constructor(event: CompilerEvent);
50
- }
51
- //# sourceMappingURL=model-compiler-errors.d.ts.map
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="977901cb-6088-5760-bf53-f91484492baa")}catch(e){}}();
2
+ import { CompilerEvent } from "@keymanapp/common-types";
3
+ export declare class ModelCompilerMessageContext {
4
+ static line: number;
5
+ static filename: string;
6
+ }
7
+ export declare class ModelCompilerMessages {
8
+ static Fatal_UnexpectedException: (o: {
9
+ e: any;
10
+ }) => CompilerEvent;
11
+ static FATAL_UnexpectedException: number;
12
+ static Warn_MixedNormalizationForms: (o: {
13
+ wordform: string;
14
+ }) => CompilerEvent;
15
+ static WARN_MixedNormalizationForms: number;
16
+ static Warn_DuplicateWordInSameFile: (o: {
17
+ wordform: string;
18
+ }) => CompilerEvent;
19
+ static WARN_DuplicateWordInSameFile: number;
20
+ static Error_UnimplementedModelFormat: (o: {
21
+ format: string;
22
+ }) => CompilerEvent;
23
+ static ERROR_UnimplementedModelFormat: number;
24
+ static Error_UnknownModelFormat: (o: {
25
+ format: string;
26
+ }) => CompilerEvent;
27
+ static ERROR_UnknownModelFormat: number;
28
+ static Error_NoDefaultExport: () => CompilerEvent;
29
+ static ERROR_NoDefaultExport: number;
30
+ static Error_SearchTermToKeyMustBeExplicitlySpecified: () => CompilerEvent;
31
+ static ERROR_SearchTermToKeyMustBeExplicitlySpecified: number;
32
+ static Error_UTF16BEUnsupported: () => CompilerEvent;
33
+ static ERROR_UTF16BEUnsupported: number;
34
+ static Error_UnknownWordBreaker: (o: {
35
+ spec: string;
36
+ }) => CompilerEvent;
37
+ static ERROR_UnknownWordBreaker: number;
38
+ static Error_UnsupportedScriptOverride: (o: {
39
+ option: string;
40
+ }) => CompilerEvent;
41
+ static ERROR_UnsupportedScriptOverride: number;
42
+ }
43
+ /**
44
+ * A ModelCompilerError should be thrown when an unrecoverable error occurs that
45
+ * would block further compilation. It will be caught in the top-most compiler
46
+ * API endpoint and converted into a callback message.
47
+ */
48
+ export declare class ModelCompilerError extends Error {
49
+ event: CompilerEvent;
50
+ constructor(event: CompilerEvent);
51
+ }
52
+ //# debugId=977901cb-6088-5760-bf53-f91484492baa
53
+ //# sourceMappingURL=model-compiler-errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-compiler-errors.d.ts","sourceRoot":"","sources":["../../src/model-compiler-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAgBvG,qBAAa,2BAA2B;IAEtC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC;CACzB;AAED,qBAAa,qBAAqB;IAEhC,MAAM,CAAC,yBAAyB,MAAM;QAAC,CAAC,EAAE,GAAG,CAAA;KAAC,mBACgG;IAC9I,MAAM,CAAC,yBAAyB,SAAqB;IAErD,MAAM,CAAC,4BAA4B,MAAM;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAC,mBACkB;IAC7E,MAAM,CAAC,4BAA4B,SAAoB;IAEvD,MAAM,CAAC,4BAA4B,MAAM;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAC,mBACY;IACvE,MAAM,CAAC,4BAA4B,SAAoB;IAEvD,MAAM,CAAC,8BAA8B,MAAM;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,mBACd;IAC7C,MAAM,CAAC,8BAA8B,SAAqB;IAE1D,MAAM,CAAC,wBAAwB,MAAM;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,mBACR;IAC7C,MAAM,CAAC,wBAAwB,SAAqB;IAEpD,MAAM,CAAC,qBAAqB,sBACwE;IACpG,MAAM,CAAC,qBAAqB,SAAqB;IAEjD,MAAM,CAAC,8CAA8C,sBACH;IAClD,MAAM,CAAC,8CAA8C,SAAqB;IAE1E,MAAM,CAAC,wBAAwB,sBAAqE;IACpG,MAAM,CAAC,wBAAwB,SAAqB;IAEpD,MAAM,CAAC,wBAAwB,MA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AAC,8CAA8C,SAAqB;IAE1E,MAAM,CAAC,wBAAwB,sBAAqE;IACpG,MAAM,CAAC,wBAAwB,SAAqB;IAEpD,MAAM,CAAC,wBAAwB,MAAM;QAAC,IAAI,EAAC,MAAM,CAAA;KAAC,mBACb;IACrC,MAAM,CAAC,wBAAwB,SAAqB;IAEpD,MAAM,CAAC,+BAA+B,MAAM;QAAC,MAAM,EAAC,MAAM,CAAA;KAAC,mBACb;IAC9C,MAAM,CAAC,+BAA+B,SAAqB;CAC5D;AAED;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;IACxB,KAAK,EAAE,aAAa;gBAApB,KAAK,EAAE,aAAa;CAGxC","names":[],"sourceRoot":"","sources":["../../src/model-compiler-errors.ts"],"version":3}
@@ -1,56 +1,58 @@
1
- import { CompilerErrorNamespace, CompilerErrorSeverity } from "@keymanapp/common-types";
2
- const Namespace = CompilerErrorNamespace.ModelCompiler;
3
- // const SevInfo = CompilerErrorSeverity.Info | Namespace;
4
- // const SevHint = CompilerErrorSeverity.Hint | Namespace;
5
- const SevWarn = CompilerErrorSeverity.Warn | Namespace;
6
- const SevError = CompilerErrorSeverity.Error | Namespace;
7
- const SevFatal = CompilerErrorSeverity.Fatal | Namespace;
8
- const m = (code, message) => {
9
- return {
10
- line: ModelCompilerMessageContext.line,
11
- filename: ModelCompilerMessageContext.filename,
12
- code,
13
- message
14
- };
15
- };
16
- export class ModelCompilerMessageContext {
17
- // Context added to all messages
18
- static line;
19
- static filename;
20
- }
21
- export class ModelCompilerMessages {
22
- static Fatal_UnexpectedException = (o) => m(this.FATAL_UnexpectedException, `Unexpected exception: ${(o.e ?? 'unknown error').toString()}\n\nCall stack:\n${(o.e instanceof Error ? o.e.stack : (new Error()).stack)}`);
23
- static FATAL_UnexpectedException = SevFatal | 0x0001;
24
- static Warn_MixedNormalizationForms = (o) => m(this.WARN_MixedNormalizationForms, `“${o.wordform}” is not in Unicode NFC. Automatically converting to NFC.`);
25
- static WARN_MixedNormalizationForms = SevWarn | 0x0002;
26
- static Warn_DuplicateWordInSameFile = (o) => m(this.WARN_DuplicateWordInSameFile, `duplicate word “${o.wordform}” found in same file; summing counts`);
27
- static WARN_DuplicateWordInSameFile = SevWarn | 0x0003;
28
- static Error_UnimplementedModelFormat = (o) => m(this.ERROR_UnimplementedModelFormat, `Unimplemented model format: ${o.format}`);
29
- static ERROR_UnimplementedModelFormat = SevError | 0x0004;
30
- static Error_UnknownModelFormat = (o) => m(this.ERROR_UnknownModelFormat, `Unimplemented model format: ${o.format}`);
31
- static ERROR_UnknownModelFormat = SevError | 0x0005;
32
- static Error_NoDefaultExport = () => m(this.ERROR_NoDefaultExport, `Model source does have a default export. Did you remember to write \`export default source;\`?`);
33
- static ERROR_NoDefaultExport = SevError | 0x0006;
34
- static Error_SearchTermToKeyMustBeExplicitlySpecified = () => m(this.ERROR_SearchTermToKeyMustBeExplicitlySpecified, "searchTermToKey must be explicitly specified");
35
- static ERROR_SearchTermToKeyMustBeExplicitlySpecified = SevError | 0x0007;
36
- static Error_UTF16BEUnsupported = () => m(this.ERROR_UTF16BEUnsupported, 'UTF-16BE is unsupported');
37
- static ERROR_UTF16BEUnsupported = SevError | 0x0008;
38
- static Error_UnknownWordBreaker = (o) => m(this.ERROR_UnknownWordBreaker, `Unknown word breaker: ${o.spec}`);
39
- static ERROR_UnknownWordBreaker = SevError | 0x0009;
40
- static Error_UnsupportedScriptOverride = (o) => m(this.ERROR_UnsupportedScriptOverride, `Unsupported script override: ${o.option}`);
41
- static ERROR_UnsupportedScriptOverride = SevError | 0x000A;
42
- }
43
- ;
44
- /**
45
- * A ModelCompilerError should be thrown when an unrecoverable error occurs that
46
- * would block further compilation. It will be caught in the top-most compiler
47
- * API endpoint and converted into a callback message.
48
- */
49
- export class ModelCompilerError extends Error {
50
- event;
51
- constructor(event) {
52
- super(event.message);
53
- this.event = event;
54
- }
55
- }
56
- //# sourceMappingURL=model-compiler-errors.js.map
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="910855f3-2bac-5390-9243-33e9f0f90956")}catch(e){}}();
2
+ import { CompilerErrorNamespace, CompilerErrorSeverity } from "@keymanapp/common-types";
3
+ const Namespace = CompilerErrorNamespace.ModelCompiler;
4
+ // const SevInfo = CompilerErrorSeverity.Info | Namespace;
5
+ // const SevHint = CompilerErrorSeverity.Hint | Namespace;
6
+ const SevWarn = CompilerErrorSeverity.Warn | Namespace;
7
+ const SevError = CompilerErrorSeverity.Error | Namespace;
8
+ const SevFatal = CompilerErrorSeverity.Fatal | Namespace;
9
+ const m = (code, message) => {
10
+ return {
11
+ line: ModelCompilerMessageContext.line,
12
+ filename: ModelCompilerMessageContext.filename,
13
+ code,
14
+ message
15
+ };
16
+ };
17
+ export class ModelCompilerMessageContext {
18
+ // Context added to all messages
19
+ static line;
20
+ static filename;
21
+ }
22
+ export class ModelCompilerMessages {
23
+ static Fatal_UnexpectedException = (o) => m(this.FATAL_UnexpectedException, `Unexpected exception: ${(o.e ?? 'unknown error').toString()}\n\nCall stack:\n${(o.e instanceof Error ? o.e.stack : (new Error()).stack)}`);
24
+ static FATAL_UnexpectedException = SevFatal | 0x0001;
25
+ static Warn_MixedNormalizationForms = (o) => m(this.WARN_MixedNormalizationForms, `“${o.wordform}” is not in Unicode NFC. Automatically converting to NFC.`);
26
+ static WARN_MixedNormalizationForms = SevWarn | 0x0002;
27
+ static Warn_DuplicateWordInSameFile = (o) => m(this.WARN_DuplicateWordInSameFile, `duplicate word “${o.wordform}” found in same file; summing counts`);
28
+ static WARN_DuplicateWordInSameFile = SevWarn | 0x0003;
29
+ static Error_UnimplementedModelFormat = (o) => m(this.ERROR_UnimplementedModelFormat, `Unimplemented model format: ${o.format}`);
30
+ static ERROR_UnimplementedModelFormat = SevError | 0x0004;
31
+ static Error_UnknownModelFormat = (o) => m(this.ERROR_UnknownModelFormat, `Unimplemented model format: ${o.format}`);
32
+ static ERROR_UnknownModelFormat = SevError | 0x0005;
33
+ static Error_NoDefaultExport = () => m(this.ERROR_NoDefaultExport, `Model source does have a default export. Did you remember to write \`export default source;\`?`);
34
+ static ERROR_NoDefaultExport = SevError | 0x0006;
35
+ static Error_SearchTermToKeyMustBeExplicitlySpecified = () => m(this.ERROR_SearchTermToKeyMustBeExplicitlySpecified, "searchTermToKey must be explicitly specified");
36
+ static ERROR_SearchTermToKeyMustBeExplicitlySpecified = SevError | 0x0007;
37
+ static Error_UTF16BEUnsupported = () => m(this.ERROR_UTF16BEUnsupported, 'UTF-16BE is unsupported');
38
+ static ERROR_UTF16BEUnsupported = SevError | 0x0008;
39
+ static Error_UnknownWordBreaker = (o) => m(this.ERROR_UnknownWordBreaker, `Unknown word breaker: ${o.spec}`);
40
+ static ERROR_UnknownWordBreaker = SevError | 0x0009;
41
+ static Error_UnsupportedScriptOverride = (o) => m(this.ERROR_UnsupportedScriptOverride, `Unsupported script override: ${o.option}`);
42
+ static ERROR_UnsupportedScriptOverride = SevError | 0x000A;
43
+ }
44
+ ;
45
+ /**
46
+ * A ModelCompilerError should be thrown when an unrecoverable error occurs that
47
+ * would block further compilation. It will be caught in the top-most compiler
48
+ * API endpoint and converted into a callback message.
49
+ */
50
+ export class ModelCompilerError extends Error {
51
+ event;
52
+ constructor(event) {
53
+ super(event.message);
54
+ this.event = event;
55
+ }
56
+ }
57
+ //# debugId=910855f3-2bac-5390-9243-33e9f0f90956
58
+ //# sourceMappingURL=model-compiler-errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-compiler-errors.js","sourceRoot":"","sources":["../../src/model-compiler-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAiB,MAAM,yBAAyB,CAAC;AAEvG,MAAM,SAAS,GAAG,sBAAsB,CAAC,aAAa,CAAC;AACvD,0DAA0D;AAC1D,0DAA0D;AAC1D,MAAM,OAAO,GAAG,qBA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/D,gGAAgG,CAAC,CAAC;IACpG,MAAM,CAAC,qBAAqB,GAAG,QAAQ,GAAG,MAAM,CAAC;IAEjD,MAAM,CAAC,8CAA8C,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,8CAA8C,EACjH,8CAA8C,CAAC,CAAC;IAClD,MAAM,CAAC,8CAA8C,GAAG,QAAQ,GAAG,MAAM,CAAC;IAE1E,MAAM,CAAC,wBAAwB,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,wBAAwB,EAAE,yBAAyB,CAAC,CAAC;IACpG,MAAM,CAAC,wBAAwB,GAAG,QAAQ,GAAG,MAAM,CAAC;IAEpD,MAAM,CAAC,wBAAwB,GAAG,CAAC,CAAe,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,wBAAwB,EACpF,yBAAyB,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IACrC,MAAM,CAAC,wBAAwB,GAAG,QAAQ,GAAG,MAAM,CAAC;IAEpD,MAAM,CAAC,+BAA+B,GAAG,CAAC,CAAiB,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,+BAA+B,EACpG,gCAAgC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9C,MAAM,CAAC,+BAA+B,GAAG,QAAQ,GAAG,MAAM,CAAC;;AAC5D,CAAC;AAEF;;;;GAIG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IACxB;IAAnB,YAAmB,KAAoB;QACrC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QADJ,UAAK,GAAL,KAAK,CAAe;IAEvC,CAAC;CACF","names":[],"sourceRoot":"","sources":["../../src/model-compiler-errors.ts"],"version":3}
@@ -1,56 +1,58 @@
1
- /// <reference types="@keymanapp/models-types" />
2
- /**
3
- * Converts wordforms into an indexable form. It does this by
4
- * normalizing the letter case of characters INDIVIDUALLY (to disregard
5
- * context-sensitive case transformations), normalizing to NFKD form,
6
- * and removing common diacritical marks.
7
- *
8
- * This is a very speculative implementation, that might work with
9
- * your language. We don't guarantee that this will be perfect for your
10
- * language, but it's a start.
11
- *
12
- * This uses String.prototype.normalize() to convert normalize into NFKD.
13
- * NFKD neutralizes some funky distinctions, e.g., ꬲ, e, e should all be the
14
- * same character; plus, it's an easy way to separate a Latin character from
15
- * its diacritics; Even then, orthographies regularly use code points
16
- * that, under NFKD normalization, do NOT decompose appropriately for your
17
- * language (e.g., SENĆOŦEN, Plains Cree in syllabics).
18
- *
19
- * Use this in early iterations of the model. For a production lexical model,
20
- * you will probably write/generate your own key function, tailored to your
21
- * language. There is a chance the default will work properly out of the box.
22
- */
23
- export declare function defaultSearchTermToKey(wordform: string): string;
24
- /**
25
- * Converts wordforms into an indexable form. It does this by
26
- * normalizing the letter case of characters INDIVIDUALLY (to disregard
27
- * context-sensitive case transformations), normalizing to NFKD form,
28
- * and removing common diacritical marks.
29
- *
30
- * This is a very speculative implementation, that might work with
31
- * your language. We don't guarantee that this will be perfect for your
32
- * language, but it's a start.
33
- *
34
- * This uses String.prototype.normalize() to convert normalize into NFKD.
35
- * NFKD neutralizes some funky distinctions, e.g., ꬲ, e, e should all be the
36
- * same character; plus, it's an easy way to separate a Latin character from
37
- * its diacritics; Even then, orthographies regularly use code points
38
- * that, under NFKD normalization, do NOT decompose appropriately for your
39
- * language (e.g., SENĆOŦEN, Plains Cree in syllabics).
40
- *
41
- * Use this in early iterations of the model. For a production lexical model,
42
- * you will probably write/generate your own key function, tailored to your
43
- * language. There is a chance the default will work properly out of the box.
44
- */
45
- export declare function defaultCasedSearchTermToKey(wordform: string, applyCasing: CasingFunction): string;
46
- /**
47
- * Specifies default casing behavior for lexical models when `languageUsesCasing` is
48
- * set to true.
49
- * @param casing One of 'lower' (lowercased), 'upper' (uppercased), or 'initial'.
50
- *
51
- * 'initial' is designed to cover cases like sentence-initial & proper noun capitalization in English.
52
- * This may be overwritten as appropriate in model-specific implementations.
53
- * @param text The text to be modified.
54
- */
55
- export declare function defaultApplyCasing(casing: CasingForm, text: string): string;
56
- //# sourceMappingURL=model-defaults.d.ts.map
1
+ /// <reference types="@keymanapp/models-types" />
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9a5871e0-b721-5738-8625-272cb6f5e965")}catch(e){}}();
3
+ /**
4
+ * Converts wordforms into an indexable form. It does this by
5
+ * normalizing the letter case of characters INDIVIDUALLY (to disregard
6
+ * context-sensitive case transformations), normalizing to NFKD form,
7
+ * and removing common diacritical marks.
8
+ *
9
+ * This is a very speculative implementation, that might work with
10
+ * your language. We don't guarantee that this will be perfect for your
11
+ * language, but it's a start.
12
+ *
13
+ * This uses String.prototype.normalize() to convert normalize into NFKD.
14
+ * NFKD neutralizes some funky distinctions, e.g., ꬲ, e, e should all be the
15
+ * same character; plus, it's an easy way to separate a Latin character from
16
+ * its diacritics; Even then, orthographies regularly use code points
17
+ * that, under NFKD normalization, do NOT decompose appropriately for your
18
+ * language (e.g., SENĆOŦEN, Plains Cree in syllabics).
19
+ *
20
+ * Use this in early iterations of the model. For a production lexical model,
21
+ * you will probably write/generate your own key function, tailored to your
22
+ * language. There is a chance the default will work properly out of the box.
23
+ */
24
+ export declare function defaultSearchTermToKey(wordform: string): string;
25
+ /**
26
+ * Converts wordforms into an indexable form. It does this by
27
+ * normalizing the letter case of characters INDIVIDUALLY (to disregard
28
+ * context-sensitive case transformations), normalizing to NFKD form,
29
+ * and removing common diacritical marks.
30
+ *
31
+ * This is a very speculative implementation, that might work with
32
+ * your language. We don't guarantee that this will be perfect for your
33
+ * language, but it's a start.
34
+ *
35
+ * This uses String.prototype.normalize() to convert normalize into NFKD.
36
+ * NFKD neutralizes some funky distinctions, e.g., ꬲ, e, e should all be the
37
+ * same character; plus, it's an easy way to separate a Latin character from
38
+ * its diacritics; Even then, orthographies regularly use code points
39
+ * that, under NFKD normalization, do NOT decompose appropriately for your
40
+ * language (e.g., SENĆOŦEN, Plains Cree in syllabics).
41
+ *
42
+ * Use this in early iterations of the model. For a production lexical model,
43
+ * you will probably write/generate your own key function, tailored to your
44
+ * language. There is a chance the default will work properly out of the box.
45
+ */
46
+ export declare function defaultCasedSearchTermToKey(wordform: string, applyCasing: CasingFunction): string;
47
+ /**
48
+ * Specifies default casing behavior for lexical models when `languageUsesCasing` is
49
+ * set to true.
50
+ * @param casing One of 'lower' (lowercased), 'upper' (uppercased), or 'initial'.
51
+ *
52
+ * 'initial' is designed to cover cases like sentence-initial & proper noun capitalization in English.
53
+ * This may be overwritten as appropriate in model-specific implementations.
54
+ * @param text The text to be modified.
55
+ */
56
+ export declare function defaultApplyCasing(casing: CasingForm, text: string): string;
57
+ //# debugId=9a5871e0-b721-5738-8625-272cb6f5e965
58
+ //# sourceMappingURL=model-defaults.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-defaults.d.ts","sourceRoot":"","sources":["../../src/model-defaults.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAW/D;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,GAAG,MAAM,CAiBjG;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CA2B3E"}
1
+ {"debug_id":"9a5871e0-b721-5738-8625-272cb6f5e965","file":"model-defaults.d.ts","mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAW/D;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,GAAG,MAAM,CAiBjG;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CA2B3E","names":[],"sourceRoot":"","sources":["../../src/model-defaults.ts"],"version":3}