@lokascript/semantic 1.0.0 → 1.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/dist/browser-ar.ar.global.js +2 -2
- package/dist/browser-core.core.global.js +2 -2
- package/dist/browser-de.de.global.js +2 -2
- package/dist/browser-east-asian.east-asian.global.js +2 -2
- package/dist/browser-en-tr.en-tr.global.js +2 -2
- package/dist/browser-en.en.global.js +2 -2
- package/dist/browser-es-en.es-en.global.js +2 -2
- package/dist/browser-es.es.global.js +2 -2
- package/dist/browser-fr.fr.global.js +2 -2
- package/dist/browser-id.id.global.js +2 -2
- package/dist/browser-ja.ja.global.js +2 -2
- package/dist/browser-ko.ko.global.js +2 -2
- package/dist/browser-lazy.lazy.global.js +2 -2
- package/dist/browser-priority.priority.global.js +2 -2
- package/dist/browser-pt.pt.global.js +2 -2
- package/dist/browser-qu.qu.global.js +2 -2
- package/dist/browser-sw.sw.global.js +2 -2
- package/dist/browser-tr.tr.global.js +2 -2
- package/dist/browser-western.western.global.js +2 -2
- package/dist/browser-zh.zh.global.js +2 -2
- package/dist/browser.global.js +2 -2
- package/dist/browser.global.js.map +1 -1
- package/dist/index.cjs +13042 -17462
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -5
- package/dist/index.d.ts +49 -5
- package/dist/index.js +14044 -18464
- package/dist/index.js.map +1 -1
- package/dist/languages/ar.d.ts +1 -1
- package/dist/languages/ar.js +31 -44
- package/dist/languages/ar.js.map +1 -1
- package/dist/languages/de.d.ts +1 -1
- package/dist/languages/de.js +14 -2
- package/dist/languages/de.js.map +1 -1
- package/dist/languages/en.d.ts +1 -1
- package/dist/languages/en.js +558 -12
- package/dist/languages/en.js.map +1 -1
- package/dist/languages/es.d.ts +1 -1
- package/dist/languages/es.js +16 -0
- package/dist/languages/es.js.map +1 -1
- package/dist/languages/fr.d.ts +1 -1
- package/dist/languages/fr.js +14 -2
- package/dist/languages/fr.js.map +1 -1
- package/dist/languages/id.d.ts +1 -1
- package/dist/languages/id.js +14 -2
- package/dist/languages/id.js.map +1 -1
- package/dist/languages/ja.d.ts +1 -1
- package/dist/languages/ja.js +18 -3
- package/dist/languages/ja.js.map +1 -1
- package/dist/languages/ko.d.ts +8 -1
- package/dist/languages/ko.js +75 -43
- package/dist/languages/ko.js.map +1 -1
- package/dist/languages/pt.d.ts +1 -1
- package/dist/languages/pt.js +17 -0
- package/dist/languages/pt.js.map +1 -1
- package/dist/languages/qu.d.ts +12 -1
- package/dist/languages/qu.js +77 -2
- package/dist/languages/qu.js.map +1 -1
- package/dist/languages/sw.d.ts +1 -1
- package/dist/languages/sw.js.map +1 -1
- package/dist/languages/tr.d.ts +9 -1
- package/dist/languages/tr.js +96 -72
- package/dist/languages/tr.js.map +1 -1
- package/dist/languages/zh.d.ts +1 -1
- package/dist/languages/zh.js +16 -0
- package/dist/languages/zh.js.map +1 -1
- package/dist/{types-C4dcj53L.d.ts → types-BY3Id07j.d.ts} +20 -5
- package/package.json +20 -29
- package/src/generators/command-schemas.ts +21 -10
- package/src/generators/event-handler-generator.ts +50 -44
- package/src/generators/language-profiles.ts +6 -0
- package/src/generators/pattern-generator.ts +883 -1
- package/src/generators/profiles/arabic.ts +19 -3
- package/src/generators/profiles/bengali.ts +12 -1
- package/src/generators/profiles/chinese.ts +15 -0
- package/src/generators/profiles/french.ts +12 -1
- package/src/generators/profiles/german.ts +12 -1
- package/src/generators/profiles/hebrew.ts +148 -0
- package/src/generators/profiles/hindi.ts +12 -1
- package/src/generators/profiles/index.ts +2 -0
- package/src/generators/profiles/indonesian.ts +12 -1
- package/src/generators/profiles/italian.ts +16 -0
- package/src/generators/profiles/japanese.ts +11 -2
- package/src/generators/profiles/korean.ts +15 -1
- package/src/generators/profiles/polish.ts +12 -0
- package/src/generators/profiles/portuguese.ts +16 -0
- package/src/generators/profiles/russian.ts +11 -0
- package/src/generators/profiles/spanish.ts +15 -0
- package/src/generators/profiles/spanishMexico.ts +176 -0
- package/src/generators/profiles/thai.ts +11 -0
- package/src/generators/profiles/turkish.ts +49 -7
- package/src/generators/profiles/types.ts +21 -5
- package/src/generators/profiles/ukrainian.ts +11 -0
- package/src/generators/profiles/vietnamese.ts +11 -0
- package/src/language-building-schema.ts +111 -0
- package/src/languages/_all.ts +5 -1
- package/src/languages/es-MX.ts +32 -0
- package/src/languages/he.ts +15 -0
- package/src/parser/pattern-matcher.ts +10 -1
- package/src/parser/semantic-parser.ts +3 -0
- package/src/patterns/add/ar.ts +3 -59
- package/src/patterns/add/index.ts +5 -1
- package/src/patterns/add/ja.ts +3 -81
- package/src/patterns/add/ko.ts +3 -62
- package/src/patterns/add/qu.ts +69 -0
- package/src/patterns/add/tr.ts +3 -59
- package/src/patterns/builders.ts +1 -0
- package/src/patterns/decrement/tr.ts +3 -36
- package/src/patterns/event-handler/ar.ts +3 -139
- package/src/patterns/event-handler/he.ts +15 -0
- package/src/patterns/event-handler/index.ts +5 -1
- package/src/patterns/event-handler/ja.ts +3 -106
- package/src/patterns/event-handler/ko.ts +3 -121
- package/src/patterns/event-handler/ms.ts +45 -20
- package/src/patterns/event-handler/tr.ts +3 -158
- package/src/patterns/get/ar.ts +3 -37
- package/src/patterns/get/ja.ts +3 -41
- package/src/patterns/get/ko.ts +3 -41
- package/src/patterns/grammar-transformed/ja.ts +3 -1701
- package/src/patterns/grammar-transformed/ko.ts +3 -1299
- package/src/patterns/grammar-transformed/tr.ts +3 -1055
- package/src/patterns/hide/ar.ts +3 -55
- package/src/patterns/hide/ja.ts +3 -57
- package/src/patterns/hide/ko.ts +3 -57
- package/src/patterns/hide/tr.ts +3 -53
- package/src/patterns/increment/tr.ts +3 -40
- package/src/patterns/put/ar.ts +3 -62
- package/src/patterns/put/ja.ts +3 -63
- package/src/patterns/put/ko.ts +3 -55
- package/src/patterns/put/tr.ts +3 -55
- package/src/patterns/remove/ar.ts +3 -59
- package/src/patterns/remove/index.ts +5 -1
- package/src/patterns/remove/ja.ts +3 -62
- package/src/patterns/remove/ko.ts +3 -66
- package/src/patterns/remove/qu.ts +69 -0
- package/src/patterns/remove/tr.ts +3 -66
- package/src/patterns/set/ar.ts +3 -72
- package/src/patterns/set/ja.ts +3 -74
- package/src/patterns/set/ko.ts +3 -73
- package/src/patterns/set/tr.ts +3 -95
- package/src/patterns/show/ar.ts +3 -55
- package/src/patterns/show/ja.ts +3 -57
- package/src/patterns/show/ko.ts +3 -61
- package/src/patterns/show/tr.ts +3 -53
- package/src/patterns/take/ar.ts +3 -39
- package/src/patterns/toggle/ar.ts +3 -49
- package/src/patterns/toggle/index.ts +5 -1
- package/src/patterns/toggle/ja.ts +3 -144
- package/src/patterns/toggle/ko.ts +3 -101
- package/src/patterns/toggle/qu.ts +90 -0
- package/src/patterns/toggle/tr.ts +3 -76
- package/src/registry.ts +179 -15
- package/src/tokenizers/arabic.ts +13 -46
- package/src/tokenizers/bengali.ts +2 -16
- package/src/tokenizers/he.ts +542 -0
- package/src/tokenizers/index.ts +1 -0
- package/src/tokenizers/japanese.ts +3 -1
- package/src/tokenizers/korean.ts +104 -48
- package/src/tokenizers/ms.ts +3 -0
- package/src/tokenizers/quechua.ts +101 -2
- package/src/tokenizers/turkish.ts +64 -69
- package/src/types.ts +13 -0
package/src/patterns/hide/ar.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Arabic Hide Patterns
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Strategy: Return empty array to rely on auto-generated patterns from profile.
|
|
5
|
+
* This follows the Tagalog model which achieves 100% pass rate with pure generation.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { LanguagePattern } from '../../types';
|
|
@@ -11,57 +11,5 @@ import type { LanguagePattern } from '../../types';
|
|
|
11
11
|
* Get Arabic hide patterns.
|
|
12
12
|
*/
|
|
13
13
|
export function getHidePatternsAr(): LanguagePattern[] {
|
|
14
|
-
return [
|
|
15
|
-
{
|
|
16
|
-
id: 'hide-ar-full',
|
|
17
|
-
language: 'ar',
|
|
18
|
-
command: 'hide',
|
|
19
|
-
priority: 100,
|
|
20
|
-
template: {
|
|
21
|
-
format: 'أخفِ {patient}',
|
|
22
|
-
tokens: [
|
|
23
|
-
{ type: 'literal', value: 'أخفِ', alternatives: ['اخف', 'أخف', 'اخفي', 'إخفاء'] },
|
|
24
|
-
{ type: 'role', role: 'patient' },
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
extraction: {
|
|
28
|
-
patient: { position: 1 },
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
id: 'hide-ar-with-من',
|
|
33
|
-
language: 'ar',
|
|
34
|
-
command: 'hide',
|
|
35
|
-
priority: 95,
|
|
36
|
-
template: {
|
|
37
|
-
format: 'أخفِ {patient} من {destination}',
|
|
38
|
-
tokens: [
|
|
39
|
-
{ type: 'literal', value: 'أخفِ', alternatives: ['اخف', 'أخف'] },
|
|
40
|
-
{ type: 'role', role: 'patient' },
|
|
41
|
-
{ type: 'literal', value: 'من' },
|
|
42
|
-
{ type: 'role', role: 'destination' },
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
extraction: {
|
|
46
|
-
patient: { position: 1 },
|
|
47
|
-
destination: { marker: 'من' },
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: 'hide-ar-definite',
|
|
52
|
-
language: 'ar',
|
|
53
|
-
command: 'hide',
|
|
54
|
-
priority: 90,
|
|
55
|
-
template: {
|
|
56
|
-
format: 'إخفاء {patient}',
|
|
57
|
-
tokens: [
|
|
58
|
-
{ type: 'literal', value: 'إخفاء', alternatives: ['اخفاء'] },
|
|
59
|
-
{ type: 'role', role: 'patient' },
|
|
60
|
-
],
|
|
61
|
-
},
|
|
62
|
-
extraction: {
|
|
63
|
-
patient: { position: 1 },
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
];
|
|
14
|
+
return [];
|
|
67
15
|
}
|
package/src/patterns/hide/ja.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Japanese Hide Patterns
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Relying on auto-generated patterns from profile.
|
|
5
|
+
* Empty stub follows Hindi/Tagalog model for simpler implementation.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { LanguagePattern } from '../../types';
|
|
@@ -11,59 +11,5 @@ import type { LanguagePattern } from '../../types';
|
|
|
11
11
|
* Get Japanese hide patterns.
|
|
12
12
|
*/
|
|
13
13
|
export function getHidePatternsJa(): LanguagePattern[] {
|
|
14
|
-
return [
|
|
15
|
-
{
|
|
16
|
-
id: 'hide-ja-full',
|
|
17
|
-
language: 'ja',
|
|
18
|
-
command: 'hide',
|
|
19
|
-
priority: 100,
|
|
20
|
-
template: {
|
|
21
|
-
format: '{patient} を 非表示',
|
|
22
|
-
tokens: [
|
|
23
|
-
{ type: 'role', role: 'patient' },
|
|
24
|
-
{ type: 'literal', value: 'を' },
|
|
25
|
-
{ type: 'literal', value: '非表示', alternatives: ['非表示にする', '隠す', '隠れる'] },
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
extraction: {
|
|
29
|
-
patient: { position: 0 },
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
id: 'hide-ja-imperative',
|
|
34
|
-
language: 'ja',
|
|
35
|
-
command: 'hide',
|
|
36
|
-
priority: 90,
|
|
37
|
-
template: {
|
|
38
|
-
format: '非表示 {patient}',
|
|
39
|
-
tokens: [
|
|
40
|
-
{ type: 'literal', value: '非表示', alternatives: ['非表示にする'] },
|
|
41
|
-
{ type: 'role', role: 'patient' },
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
extraction: {
|
|
45
|
-
patient: { position: 1 },
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
id: 'hide-ja-possessive',
|
|
50
|
-
language: 'ja',
|
|
51
|
-
command: 'hide',
|
|
52
|
-
priority: 95,
|
|
53
|
-
template: {
|
|
54
|
-
format: '{destination} の {patient} を 非表示',
|
|
55
|
-
tokens: [
|
|
56
|
-
{ type: 'role', role: 'destination' },
|
|
57
|
-
{ type: 'literal', value: 'の' },
|
|
58
|
-
{ type: 'role', role: 'patient' },
|
|
59
|
-
{ type: 'literal', value: 'を' },
|
|
60
|
-
{ type: 'literal', value: '非表示', alternatives: ['非表示にする', '隠す'] },
|
|
61
|
-
],
|
|
62
|
-
},
|
|
63
|
-
extraction: {
|
|
64
|
-
destination: { position: 0 },
|
|
65
|
-
patient: { marker: 'を' },
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
];
|
|
14
|
+
return [];
|
|
69
15
|
}
|
package/src/patterns/hide/ko.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Korean Hide Patterns
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Strategy: Return empty array to rely on auto-generated patterns from profile.
|
|
5
|
+
* This follows the Tagalog model which achieves 100% pass rate with pure generation.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { LanguagePattern } from '../../types';
|
|
@@ -11,59 +11,5 @@ import type { LanguagePattern } from '../../types';
|
|
|
11
11
|
* Get Korean hide patterns.
|
|
12
12
|
*/
|
|
13
13
|
export function getHidePatternsKo(): LanguagePattern[] {
|
|
14
|
-
return [
|
|
15
|
-
{
|
|
16
|
-
id: 'hide-ko-full',
|
|
17
|
-
language: 'ko',
|
|
18
|
-
command: 'hide',
|
|
19
|
-
priority: 100,
|
|
20
|
-
template: {
|
|
21
|
-
format: '{patient} 를 숨기다',
|
|
22
|
-
tokens: [
|
|
23
|
-
{ type: 'role', role: 'patient' },
|
|
24
|
-
{ type: 'literal', value: '를', alternatives: ['을'] },
|
|
25
|
-
{ type: 'literal', value: '숨기다', alternatives: ['숨겨', '감추다', '숨김', '숨기기'] },
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
extraction: {
|
|
29
|
-
patient: { position: 0 },
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
id: 'hide-ko-simple',
|
|
34
|
-
language: 'ko',
|
|
35
|
-
command: 'hide',
|
|
36
|
-
priority: 90,
|
|
37
|
-
template: {
|
|
38
|
-
format: '숨기다 {patient}',
|
|
39
|
-
tokens: [
|
|
40
|
-
{ type: 'literal', value: '숨기다', alternatives: ['숨겨', '숨기기'] },
|
|
41
|
-
{ type: 'role', role: 'patient' },
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
extraction: {
|
|
45
|
-
patient: { position: 1 },
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
id: 'hide-ko-possessive',
|
|
50
|
-
language: 'ko',
|
|
51
|
-
command: 'hide',
|
|
52
|
-
priority: 95,
|
|
53
|
-
template: {
|
|
54
|
-
format: '{destination} 의 {patient} 를 숨기다',
|
|
55
|
-
tokens: [
|
|
56
|
-
{ type: 'role', role: 'destination' },
|
|
57
|
-
{ type: 'literal', value: '의' },
|
|
58
|
-
{ type: 'role', role: 'patient' },
|
|
59
|
-
{ type: 'literal', value: '를', alternatives: ['을'] },
|
|
60
|
-
{ type: 'literal', value: '숨기다', alternatives: ['숨겨', '감추다'] },
|
|
61
|
-
],
|
|
62
|
-
},
|
|
63
|
-
extraction: {
|
|
64
|
-
destination: { position: 0 },
|
|
65
|
-
patient: { marker: '를', markerAlternatives: ['을'] },
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
];
|
|
14
|
+
return [];
|
|
69
15
|
}
|
package/src/patterns/hide/tr.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Turkish Hide Patterns
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Strategy: Return empty array to rely on auto-generated patterns from profile.
|
|
5
|
+
* This follows the Tagalog model which achieves 100% pass rate with pure generation.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { LanguagePattern } from '../../types';
|
|
@@ -11,55 +11,5 @@ import type { LanguagePattern } from '../../types';
|
|
|
11
11
|
* Get Turkish hide patterns.
|
|
12
12
|
*/
|
|
13
13
|
export function getHidePatternsTr(): LanguagePattern[] {
|
|
14
|
-
return [
|
|
15
|
-
{
|
|
16
|
-
id: 'hide-tr-full',
|
|
17
|
-
language: 'tr',
|
|
18
|
-
command: 'hide',
|
|
19
|
-
priority: 100,
|
|
20
|
-
template: {
|
|
21
|
-
format: '{patient} gizle',
|
|
22
|
-
tokens: [
|
|
23
|
-
{ type: 'role', role: 'patient' },
|
|
24
|
-
{ type: 'literal', value: 'gizle', alternatives: ['gizlemek', 'sakla', 'saklamak'] },
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
extraction: {
|
|
28
|
-
patient: { position: 0 },
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
id: 'hide-tr-accusative',
|
|
33
|
-
language: 'tr',
|
|
34
|
-
command: 'hide',
|
|
35
|
-
priority: 95,
|
|
36
|
-
template: {
|
|
37
|
-
format: "{patient}'i gizle",
|
|
38
|
-
tokens: [
|
|
39
|
-
{ type: 'role', role: 'patient' },
|
|
40
|
-
{ type: 'literal', value: "'i", alternatives: ["'ı", "'u", "'ü", '-i', '-ı'] },
|
|
41
|
-
{ type: 'literal', value: 'gizle', alternatives: ['gizlemek', 'sakla'] },
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
extraction: {
|
|
45
|
-
patient: { position: 0 },
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
id: 'hide-tr-imperative',
|
|
50
|
-
language: 'tr',
|
|
51
|
-
command: 'hide',
|
|
52
|
-
priority: 90,
|
|
53
|
-
template: {
|
|
54
|
-
format: 'gizle {patient}',
|
|
55
|
-
tokens: [
|
|
56
|
-
{ type: 'literal', value: 'gizle', alternatives: ['gizlemek', 'sakla'] },
|
|
57
|
-
{ type: 'role', role: 'patient' },
|
|
58
|
-
],
|
|
59
|
-
},
|
|
60
|
-
extraction: {
|
|
61
|
-
patient: { position: 1 },
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
];
|
|
14
|
+
return [];
|
|
65
15
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Turkish Increment Patterns
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Strategy: Return empty array to rely on auto-generated patterns from profile.
|
|
5
|
+
* This follows the Tagalog model which achieves 100% pass rate with pure generation.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { LanguagePattern } from '../../types';
|
|
@@ -11,42 +11,5 @@ import type { LanguagePattern } from '../../types';
|
|
|
11
11
|
* Get Turkish increment patterns.
|
|
12
12
|
*/
|
|
13
13
|
export function getIncrementPatternsTr(): LanguagePattern[] {
|
|
14
|
-
return [
|
|
15
|
-
{
|
|
16
|
-
id: 'increment-tr-full',
|
|
17
|
-
language: 'tr',
|
|
18
|
-
command: 'increment',
|
|
19
|
-
priority: 100,
|
|
20
|
-
template: {
|
|
21
|
-
format: '{patient} artır',
|
|
22
|
-
tokens: [
|
|
23
|
-
{ type: 'role', role: 'patient', expectedTypes: ['selector', 'reference', 'expression'] },
|
|
24
|
-
{
|
|
25
|
-
type: 'literal',
|
|
26
|
-
value: 'artır',
|
|
27
|
-
alternatives: ['artir', 'artırmak', 'artirmak', 'arttır', 'increment'],
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
extraction: {
|
|
32
|
-
patient: { position: 0 },
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
id: 'increment-tr-svo',
|
|
37
|
-
language: 'tr',
|
|
38
|
-
command: 'increment',
|
|
39
|
-
priority: 90,
|
|
40
|
-
template: {
|
|
41
|
-
format: 'artır {patient}',
|
|
42
|
-
tokens: [
|
|
43
|
-
{ type: 'literal', value: 'artır', alternatives: ['artir', 'artırmak'] },
|
|
44
|
-
{ type: 'role', role: 'patient', expectedTypes: ['selector', 'reference', 'expression'] },
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
extraction: {
|
|
48
|
-
patient: { position: 1 },
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
];
|
|
14
|
+
return [];
|
|
52
15
|
}
|
package/src/patterns/put/ar.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Arabic Put Patterns
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Strategy: Return empty array to rely on auto-generated patterns from profile.
|
|
5
|
+
* This follows the Tagalog model which achieves 100% pass rate with pure generation.
|
|
5
6
|
*/
|
|
6
7
|
|
|
7
8
|
import type { LanguagePattern } from '../../types';
|
|
@@ -10,65 +11,5 @@ import type { LanguagePattern } from '../../types';
|
|
|
10
11
|
* Get Arabic put patterns.
|
|
11
12
|
*/
|
|
12
13
|
export function getPutPatternsAr(): LanguagePattern[] {
|
|
13
|
-
return [
|
|
14
|
-
{
|
|
15
|
-
id: 'put-ar-full',
|
|
16
|
-
language: 'ar',
|
|
17
|
-
command: 'put',
|
|
18
|
-
priority: 100,
|
|
19
|
-
template: {
|
|
20
|
-
format: 'ضع {patient} في {destination}',
|
|
21
|
-
tokens: [
|
|
22
|
-
{ type: 'literal', value: 'ضع', alternatives: ['اضع', 'يضع'] },
|
|
23
|
-
{ type: 'role', role: 'patient' },
|
|
24
|
-
{ type: 'literal', value: 'في', alternatives: ['إلى', 'الى'] },
|
|
25
|
-
{ type: 'role', role: 'destination' },
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
extraction: {
|
|
29
|
-
patient: { position: 1 },
|
|
30
|
-
destination: { marker: 'في', markerAlternatives: ['إلى', 'الى'] },
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: 'put-ar-before',
|
|
35
|
-
language: 'ar',
|
|
36
|
-
command: 'put',
|
|
37
|
-
priority: 95,
|
|
38
|
-
template: {
|
|
39
|
-
format: 'ضع {patient} قبل {destination}',
|
|
40
|
-
tokens: [
|
|
41
|
-
{ type: 'literal', value: 'ضع' },
|
|
42
|
-
{ type: 'role', role: 'patient' },
|
|
43
|
-
{ type: 'literal', value: 'قبل' },
|
|
44
|
-
{ type: 'role', role: 'destination' },
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
extraction: {
|
|
48
|
-
patient: { position: 1 },
|
|
49
|
-
destination: { marker: 'قبل' },
|
|
50
|
-
manner: { default: { type: 'literal', value: 'before' } },
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
id: 'put-ar-after',
|
|
55
|
-
language: 'ar',
|
|
56
|
-
command: 'put',
|
|
57
|
-
priority: 95,
|
|
58
|
-
template: {
|
|
59
|
-
format: 'ضع {patient} بعد {destination}',
|
|
60
|
-
tokens: [
|
|
61
|
-
{ type: 'literal', value: 'ضع' },
|
|
62
|
-
{ type: 'role', role: 'patient' },
|
|
63
|
-
{ type: 'literal', value: 'بعد' },
|
|
64
|
-
{ type: 'role', role: 'destination' },
|
|
65
|
-
],
|
|
66
|
-
},
|
|
67
|
-
extraction: {
|
|
68
|
-
patient: { position: 1 },
|
|
69
|
-
destination: { marker: 'بعد' },
|
|
70
|
-
manner: { default: { type: 'literal', value: 'after' } },
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
];
|
|
14
|
+
return [];
|
|
74
15
|
}
|
package/src/patterns/put/ja.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Japanese Put Patterns
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Relying on auto-generated patterns from profile.
|
|
5
|
+
* Empty stub follows Hindi/Tagalog model for simpler implementation.
|
|
5
6
|
*/
|
|
6
7
|
|
|
7
8
|
import type { LanguagePattern } from '../../types';
|
|
@@ -10,66 +11,5 @@ import type { LanguagePattern } from '../../types';
|
|
|
10
11
|
* Get Japanese put patterns.
|
|
11
12
|
*/
|
|
12
13
|
export function getPutPatternsJa(): LanguagePattern[] {
|
|
13
|
-
return [
|
|
14
|
-
{
|
|
15
|
-
id: 'put-ja-full',
|
|
16
|
-
language: 'ja',
|
|
17
|
-
command: 'put',
|
|
18
|
-
priority: 100,
|
|
19
|
-
template: {
|
|
20
|
-
format: '{patient} を {destination} に 置く',
|
|
21
|
-
tokens: [
|
|
22
|
-
{ type: 'role', role: 'patient' },
|
|
23
|
-
{ type: 'literal', value: 'を' },
|
|
24
|
-
{ type: 'role', role: 'destination' },
|
|
25
|
-
{ type: 'literal', value: 'に', alternatives: ['へ'] },
|
|
26
|
-
{ type: 'literal', value: '置く', alternatives: ['入れる', 'セット', 'セットする'] },
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
extraction: {
|
|
30
|
-
patient: { position: 0 },
|
|
31
|
-
destination: { marker: 'に', markerAlternatives: ['へ'] },
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
id: 'put-ja-insert',
|
|
36
|
-
language: 'ja',
|
|
37
|
-
command: 'put',
|
|
38
|
-
priority: 95,
|
|
39
|
-
template: {
|
|
40
|
-
format: '{patient} を {destination} に 入れる',
|
|
41
|
-
tokens: [
|
|
42
|
-
{ type: 'role', role: 'patient' },
|
|
43
|
-
{ type: 'literal', value: 'を' },
|
|
44
|
-
{ type: 'role', role: 'destination' },
|
|
45
|
-
{ type: 'literal', value: 'に' },
|
|
46
|
-
{ type: 'literal', value: '入れる' },
|
|
47
|
-
],
|
|
48
|
-
},
|
|
49
|
-
extraction: {
|
|
50
|
-
patient: { position: 0 },
|
|
51
|
-
destination: { marker: 'に' },
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
id: 'put-ja-topic',
|
|
56
|
-
language: 'ja',
|
|
57
|
-
command: 'put',
|
|
58
|
-
priority: 90,
|
|
59
|
-
template: {
|
|
60
|
-
format: '{destination} に {patient} を 置く',
|
|
61
|
-
tokens: [
|
|
62
|
-
{ type: 'role', role: 'destination' },
|
|
63
|
-
{ type: 'literal', value: 'に' },
|
|
64
|
-
{ type: 'role', role: 'patient' },
|
|
65
|
-
{ type: 'literal', value: 'を' },
|
|
66
|
-
{ type: 'literal', value: '置く', alternatives: ['入れる'] },
|
|
67
|
-
],
|
|
68
|
-
},
|
|
69
|
-
extraction: {
|
|
70
|
-
destination: { position: 0 },
|
|
71
|
-
patient: { marker: 'を' },
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
];
|
|
14
|
+
return [];
|
|
75
15
|
}
|
package/src/patterns/put/ko.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Korean Put Patterns
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Strategy: Return empty array to rely on auto-generated patterns from profile.
|
|
5
|
+
* This follows the Tagalog model which achieves 100% pass rate with pure generation.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { LanguagePattern } from '../../types';
|
|
@@ -11,57 +11,5 @@ import type { LanguagePattern } from '../../types';
|
|
|
11
11
|
* Get Korean put patterns.
|
|
12
12
|
*/
|
|
13
13
|
export function getPutPatternsKo(): LanguagePattern[] {
|
|
14
|
-
return [
|
|
15
|
-
{
|
|
16
|
-
id: 'put-ko-full',
|
|
17
|
-
language: 'ko',
|
|
18
|
-
command: 'put',
|
|
19
|
-
priority: 100,
|
|
20
|
-
template: {
|
|
21
|
-
format: '{patient} 를 {destination} 에 넣기',
|
|
22
|
-
tokens: [
|
|
23
|
-
{
|
|
24
|
-
type: 'role',
|
|
25
|
-
role: 'patient',
|
|
26
|
-
expectedTypes: ['literal', 'selector', 'reference', 'expression'],
|
|
27
|
-
},
|
|
28
|
-
{ type: 'literal', value: '를', alternatives: ['을'] },
|
|
29
|
-
{ type: 'role', role: 'destination', expectedTypes: ['selector', 'reference'] },
|
|
30
|
-
{ type: 'literal', value: '에', alternatives: ['에게', '으로', '로'] },
|
|
31
|
-
{
|
|
32
|
-
type: 'literal',
|
|
33
|
-
value: '넣기',
|
|
34
|
-
alternatives: ['넣다', '넣어', '놓다', '놓기', '두다', '두기'],
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
extraction: {
|
|
39
|
-
patient: { position: 0 },
|
|
40
|
-
destination: { position: 2 },
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: 'put-ko-simple',
|
|
45
|
-
language: 'ko',
|
|
46
|
-
command: 'put',
|
|
47
|
-
priority: 90,
|
|
48
|
-
template: {
|
|
49
|
-
format: '{patient} 를 {destination} 넣기',
|
|
50
|
-
tokens: [
|
|
51
|
-
{
|
|
52
|
-
type: 'role',
|
|
53
|
-
role: 'patient',
|
|
54
|
-
expectedTypes: ['literal', 'selector', 'reference', 'expression'],
|
|
55
|
-
},
|
|
56
|
-
{ type: 'literal', value: '를', alternatives: ['을'] },
|
|
57
|
-
{ type: 'role', role: 'destination', expectedTypes: ['selector', 'reference'] },
|
|
58
|
-
{ type: 'literal', value: '넣기', alternatives: ['넣다', '넣어'] },
|
|
59
|
-
],
|
|
60
|
-
},
|
|
61
|
-
extraction: {
|
|
62
|
-
patient: { position: 0 },
|
|
63
|
-
destination: { position: 2 },
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
];
|
|
14
|
+
return [];
|
|
67
15
|
}
|
package/src/patterns/put/tr.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Turkish Put Patterns
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Strategy: Return empty array to rely on auto-generated patterns from profile.
|
|
5
|
+
* This follows the Tagalog model which achieves 100% pass rate with pure generation.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { LanguagePattern } from '../../types';
|
|
@@ -11,57 +11,5 @@ import type { LanguagePattern } from '../../types';
|
|
|
11
11
|
* Get Turkish put patterns.
|
|
12
12
|
*/
|
|
13
13
|
export function getPutPatternsTr(): LanguagePattern[] {
|
|
14
|
-
return [
|
|
15
|
-
{
|
|
16
|
-
id: 'put-tr-full',
|
|
17
|
-
language: 'tr',
|
|
18
|
-
command: 'put',
|
|
19
|
-
priority: 100,
|
|
20
|
-
template: {
|
|
21
|
-
format: '{patient} yi {destination} a koy',
|
|
22
|
-
tokens: [
|
|
23
|
-
{
|
|
24
|
-
type: 'role',
|
|
25
|
-
role: 'patient',
|
|
26
|
-
expectedTypes: ['literal', 'selector', 'reference', 'expression'],
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
type: 'literal',
|
|
30
|
-
value: 'yi',
|
|
31
|
-
alternatives: ['yı', 'yu', 'yü', 'i', 'ı', 'u', 'ü', "'i", "'ı"],
|
|
32
|
-
},
|
|
33
|
-
{ type: 'role', role: 'destination', expectedTypes: ['selector', 'reference'] },
|
|
34
|
-
{ type: 'literal', value: 'a', alternatives: ['e', "'a", "'e", '-a', '-e'] },
|
|
35
|
-
{ type: 'literal', value: 'koy', alternatives: ['koymak', 'yerleştir', 'yerleştirmek'] },
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
extraction: {
|
|
39
|
-
patient: { position: 0 },
|
|
40
|
-
destination: { position: 2 },
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: 'put-tr-simple',
|
|
45
|
-
language: 'tr',
|
|
46
|
-
command: 'put',
|
|
47
|
-
priority: 90,
|
|
48
|
-
template: {
|
|
49
|
-
format: '{destination} a {patient} koy',
|
|
50
|
-
tokens: [
|
|
51
|
-
{ type: 'role', role: 'destination', expectedTypes: ['selector', 'reference'] },
|
|
52
|
-
{ type: 'literal', value: 'a', alternatives: ['e', "'a", "'e"] },
|
|
53
|
-
{
|
|
54
|
-
type: 'role',
|
|
55
|
-
role: 'patient',
|
|
56
|
-
expectedTypes: ['literal', 'selector', 'reference', 'expression'],
|
|
57
|
-
},
|
|
58
|
-
{ type: 'literal', value: 'koy', alternatives: ['koymak'] },
|
|
59
|
-
],
|
|
60
|
-
},
|
|
61
|
-
extraction: {
|
|
62
|
-
destination: { position: 0 },
|
|
63
|
-
patient: { position: 2 },
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
];
|
|
14
|
+
return [];
|
|
67
15
|
}
|