@lokascript/framework 2.11.1 → 3.1.0
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/CHANGELOG.md +301 -1
- package/dist/api/domain-registry.d.ts +2 -2
- package/dist/api/index.js.map +1 -1
- package/dist/core/index.js +7 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/tokenization/base-tokenizer.d.ts.map +1 -1
- package/dist/core/tokenization/index.js +7 -1
- package/dist/core/tokenization/index.js.map +1 -1
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/interfaces/value-extractor.d.ts.map +1 -1
- package/dist/multilingual/index.js +7 -1
- package/dist/multilingual/index.js.map +1 -1
- package/dist/prompts/prompt-generator.d.ts +1 -1
- package/package.json +2 -2
- package/src/api/domain-registry.ts +2 -2
- package/src/core/tokenization/apostrophe-possessive.test.ts +42 -0
- package/src/core/tokenization/base-tokenizer.ts +21 -3
- package/src/interfaces/value-extractor.ts +10 -0
- package/src/prompts/prompt-generator.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1802,6 +1802,9 @@ var StringLiteralExtractor = class {
|
|
|
1802
1802
|
}
|
|
1803
1803
|
canExtract(input, position) {
|
|
1804
1804
|
const char = input[position];
|
|
1805
|
+
if (char === "'" && position > 0 && /[\p{L}\p{N}_)\]]/u.test(input[position - 1])) {
|
|
1806
|
+
return false;
|
|
1807
|
+
}
|
|
1805
1808
|
return char === '"' || char === "'" || char === "`" || char === "\u201C" || // Chinese double quote open "
|
|
1806
1809
|
char === "\u2018";
|
|
1807
1810
|
}
|
|
@@ -5091,6 +5094,9 @@ var MARKER_CONCEPT_NORMALIZEDS = /* @__PURE__ */ new Set([
|
|
|
5091
5094
|
"through",
|
|
5092
5095
|
"without"
|
|
5093
5096
|
]);
|
|
5097
|
+
function isHyphenatedWord(native) {
|
|
5098
|
+
return native.includes("-") && /^[\p{L}\p{N}_]+(-[\p{L}\p{N}_]+)+$/u.test(native);
|
|
5099
|
+
}
|
|
5094
5100
|
var ENGLISH_DOM_EVENT_NAMES = [
|
|
5095
5101
|
"click",
|
|
5096
5102
|
"dblclick",
|
|
@@ -5410,7 +5416,7 @@ var _BaseTokenizer = class _BaseTokenizer {
|
|
|
5410
5416
|
(a, b) => b.native.length - a.native.length
|
|
5411
5417
|
);
|
|
5412
5418
|
this.multiWordKeywords = this.profileKeywords.filter(
|
|
5413
|
-
(k) => k.native.includes(" ") && !MARKER_CONCEPT_NORMALIZEDS.has(k.normalized)
|
|
5419
|
+
(k) => (k.native.includes(" ") || isHyphenatedWord(k.native)) && !MARKER_CONCEPT_NORMALIZEDS.has(k.normalized)
|
|
5414
5420
|
);
|
|
5415
5421
|
this.profileKeywordMap = /* @__PURE__ */ new Map();
|
|
5416
5422
|
for (const keyword of this.profileKeywords) {
|