@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
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Japanese Toggle 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,147 +11,5 @@ import type { LanguagePattern } from '../../types';
|
|
|
10
11
|
* Get Japanese toggle patterns.
|
|
11
12
|
*/
|
|
12
13
|
export function getTogglePatternsJa(): LanguagePattern[] {
|
|
13
|
-
return [
|
|
14
|
-
{
|
|
15
|
-
id: 'toggle-ja-full',
|
|
16
|
-
language: 'ja',
|
|
17
|
-
command: 'toggle',
|
|
18
|
-
priority: 100,
|
|
19
|
-
template: {
|
|
20
|
-
format: '{target} の {patient} を 切り替え',
|
|
21
|
-
tokens: [
|
|
22
|
-
{ type: 'role', role: 'destination' },
|
|
23
|
-
{ type: 'literal', value: 'の' },
|
|
24
|
-
{ type: 'role', role: 'patient' },
|
|
25
|
-
{ type: 'literal', value: 'を' },
|
|
26
|
-
{
|
|
27
|
-
type: 'literal',
|
|
28
|
-
value: '切り替え',
|
|
29
|
-
alternatives: ['切り替える', 'トグル', 'トグルする'],
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
extraction: {
|
|
34
|
-
destination: { position: 0 },
|
|
35
|
-
patient: { marker: 'を' },
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
id: 'toggle-ja-simple',
|
|
40
|
-
language: 'ja',
|
|
41
|
-
command: 'toggle',
|
|
42
|
-
priority: 90,
|
|
43
|
-
template: {
|
|
44
|
-
format: '{patient} を 切り替え',
|
|
45
|
-
tokens: [
|
|
46
|
-
{ type: 'role', role: 'patient' },
|
|
47
|
-
{ type: 'literal', value: 'を' },
|
|
48
|
-
{
|
|
49
|
-
type: 'literal',
|
|
50
|
-
value: '切り替え',
|
|
51
|
-
alternatives: ['切り替える', 'トグル', 'トグルする'],
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
extraction: {
|
|
56
|
-
patient: { position: 0 },
|
|
57
|
-
destination: { default: { type: 'reference', value: 'me' } },
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: 'toggle-ja-location',
|
|
62
|
-
language: 'ja',
|
|
63
|
-
command: 'toggle',
|
|
64
|
-
priority: 95,
|
|
65
|
-
template: {
|
|
66
|
-
format: '{target} で {patient} を 切り替え',
|
|
67
|
-
tokens: [
|
|
68
|
-
{ type: 'role', role: 'destination' },
|
|
69
|
-
{ type: 'literal', value: 'で' },
|
|
70
|
-
{ type: 'role', role: 'patient' },
|
|
71
|
-
{ type: 'literal', value: 'を' },
|
|
72
|
-
{ type: 'literal', value: '切り替え', alternatives: ['切り替える', 'トグル'] },
|
|
73
|
-
],
|
|
74
|
-
},
|
|
75
|
-
extraction: {
|
|
76
|
-
destination: { position: 0 },
|
|
77
|
-
patient: { marker: 'を' },
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
id: 'toggle-ja-compact',
|
|
82
|
-
language: 'ja',
|
|
83
|
-
command: 'toggle',
|
|
84
|
-
priority: 93,
|
|
85
|
-
template: {
|
|
86
|
-
format: '{patient}を切り替え',
|
|
87
|
-
tokens: [
|
|
88
|
-
{ type: 'role', role: 'patient' },
|
|
89
|
-
{ type: 'literal', value: 'を切り替え', alternatives: ['を切り替える', 'をトグル'] },
|
|
90
|
-
],
|
|
91
|
-
},
|
|
92
|
-
extraction: {
|
|
93
|
-
patient: { position: 0 },
|
|
94
|
-
destination: { default: { type: 'reference', value: 'me' } },
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: 'toggle-ja-verb-ending',
|
|
99
|
-
language: 'ja',
|
|
100
|
-
command: 'toggle',
|
|
101
|
-
priority: 88,
|
|
102
|
-
template: {
|
|
103
|
-
format: '{patient} を 切り替える',
|
|
104
|
-
tokens: [
|
|
105
|
-
{ type: 'role', role: 'patient' },
|
|
106
|
-
{ type: 'literal', value: 'を' },
|
|
107
|
-
{ type: 'literal', value: '切り替える', alternatives: ['トグルする'] },
|
|
108
|
-
],
|
|
109
|
-
},
|
|
110
|
-
extraction: {
|
|
111
|
-
patient: { position: 0 },
|
|
112
|
-
destination: { default: { type: 'reference', value: 'me' } },
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
// Phase 6d: Word order flexibility - verb-first pattern
|
|
116
|
-
{
|
|
117
|
-
id: 'toggle-ja-verb-first',
|
|
118
|
-
language: 'ja',
|
|
119
|
-
command: 'toggle',
|
|
120
|
-
priority: 75,
|
|
121
|
-
template: {
|
|
122
|
-
format: '切り替え {patient} を',
|
|
123
|
-
tokens: [
|
|
124
|
-
{ type: 'literal', value: '切り替え', alternatives: ['トグル'] },
|
|
125
|
-
{ type: 'role', role: 'patient' },
|
|
126
|
-
{ type: 'literal', value: 'を' },
|
|
127
|
-
],
|
|
128
|
-
},
|
|
129
|
-
extraction: {
|
|
130
|
-
patient: { position: 1 },
|
|
131
|
-
destination: { default: { type: 'reference', value: 'me' } },
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
// Phase 6d: Object-before-destination scrambled order
|
|
135
|
-
{
|
|
136
|
-
id: 'toggle-ja-scrambled',
|
|
137
|
-
language: 'ja',
|
|
138
|
-
command: 'toggle',
|
|
139
|
-
priority: 70,
|
|
140
|
-
template: {
|
|
141
|
-
format: '{patient} を {destination} で 切り替え',
|
|
142
|
-
tokens: [
|
|
143
|
-
{ type: 'role', role: 'patient' },
|
|
144
|
-
{ type: 'literal', value: 'を' },
|
|
145
|
-
{ type: 'role', role: 'destination' },
|
|
146
|
-
{ type: 'literal', value: 'で' },
|
|
147
|
-
{ type: 'literal', value: '切り替え', alternatives: ['トグル'] },
|
|
148
|
-
],
|
|
149
|
-
},
|
|
150
|
-
extraction: {
|
|
151
|
-
patient: { position: 0 },
|
|
152
|
-
destination: { marker: 'で' },
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
];
|
|
14
|
+
return [];
|
|
156
15
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Korean Toggle 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,104 +11,5 @@ import type { LanguagePattern } from '../../types';
|
|
|
10
11
|
* Get Korean toggle patterns.
|
|
11
12
|
*/
|
|
12
13
|
export function getTogglePatternsKo(): LanguagePattern[] {
|
|
13
|
-
return [
|
|
14
|
-
{
|
|
15
|
-
id: 'toggle-ko-full',
|
|
16
|
-
language: 'ko',
|
|
17
|
-
command: 'toggle',
|
|
18
|
-
priority: 100,
|
|
19
|
-
template: {
|
|
20
|
-
format: '{target} 에서 {patient} 를 토글',
|
|
21
|
-
tokens: [
|
|
22
|
-
{ type: 'role', role: 'destination' },
|
|
23
|
-
{ type: 'literal', value: '에서', alternatives: ['에'] },
|
|
24
|
-
{ type: 'role', role: 'patient' },
|
|
25
|
-
{ type: 'literal', value: '를', alternatives: ['을'] },
|
|
26
|
-
{ type: 'literal', value: '토글', alternatives: ['토글하다', '바꾸다', '전환'] },
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
extraction: {
|
|
30
|
-
destination: { position: 0 },
|
|
31
|
-
patient: { marker: '를', markerAlternatives: ['을'] },
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
id: 'toggle-ko-simple',
|
|
36
|
-
language: 'ko',
|
|
37
|
-
command: 'toggle',
|
|
38
|
-
priority: 90,
|
|
39
|
-
template: {
|
|
40
|
-
format: '{patient} 를 토글',
|
|
41
|
-
tokens: [
|
|
42
|
-
{ type: 'role', role: 'patient' },
|
|
43
|
-
{ type: 'literal', value: '를', alternatives: ['을'] },
|
|
44
|
-
{ type: 'literal', value: '토글', alternatives: ['토글하다', '바꾸다', '전환'] },
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
extraction: {
|
|
48
|
-
patient: { position: 0 },
|
|
49
|
-
destination: { default: { type: 'reference', value: 'me' } },
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: 'toggle-ko-possessive',
|
|
54
|
-
language: 'ko',
|
|
55
|
-
command: 'toggle',
|
|
56
|
-
priority: 95,
|
|
57
|
-
template: {
|
|
58
|
-
format: '{target} 의 {patient} 를 토글',
|
|
59
|
-
tokens: [
|
|
60
|
-
{ type: 'role', role: 'destination' },
|
|
61
|
-
{ type: 'literal', value: '의' },
|
|
62
|
-
{ type: 'role', role: 'patient' },
|
|
63
|
-
{ type: 'literal', value: '를', alternatives: ['을'] },
|
|
64
|
-
{ type: 'literal', value: '토글', alternatives: ['토글하다', '바꾸다', '전환'] },
|
|
65
|
-
],
|
|
66
|
-
},
|
|
67
|
-
extraction: {
|
|
68
|
-
destination: { position: 0 },
|
|
69
|
-
patient: { marker: '를', markerAlternatives: ['을'] },
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
// Phase 6d: Word order flexibility - verb-first pattern
|
|
73
|
-
{
|
|
74
|
-
id: 'toggle-ko-verb-first',
|
|
75
|
-
language: 'ko',
|
|
76
|
-
command: 'toggle',
|
|
77
|
-
priority: 75,
|
|
78
|
-
template: {
|
|
79
|
-
format: '토글 {patient} 를',
|
|
80
|
-
tokens: [
|
|
81
|
-
{ type: 'literal', value: '토글', alternatives: ['토글하다'] },
|
|
82
|
-
{ type: 'role', role: 'patient' },
|
|
83
|
-
{ type: 'literal', value: '를', alternatives: ['을'] },
|
|
84
|
-
],
|
|
85
|
-
},
|
|
86
|
-
extraction: {
|
|
87
|
-
patient: { position: 1 },
|
|
88
|
-
destination: { default: { type: 'reference', value: 'me' } },
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
// Phase 6d: Object-before-destination scrambled order
|
|
92
|
-
{
|
|
93
|
-
id: 'toggle-ko-scrambled',
|
|
94
|
-
language: 'ko',
|
|
95
|
-
command: 'toggle',
|
|
96
|
-
priority: 70,
|
|
97
|
-
template: {
|
|
98
|
-
format: '{patient} 를 {destination} 에서 토글',
|
|
99
|
-
tokens: [
|
|
100
|
-
{ type: 'role', role: 'patient' },
|
|
101
|
-
{ type: 'literal', value: '를', alternatives: ['을'] },
|
|
102
|
-
{ type: 'role', role: 'destination' },
|
|
103
|
-
{ type: 'literal', value: '에서' },
|
|
104
|
-
{ type: 'literal', value: '토글', alternatives: ['토글하다'] },
|
|
105
|
-
],
|
|
106
|
-
},
|
|
107
|
-
extraction: {
|
|
108
|
-
patient: { position: 0 },
|
|
109
|
-
destination: { marker: '에서' },
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
];
|
|
14
|
+
return [];
|
|
113
15
|
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quechua Toggle Patterns
|
|
3
|
+
*
|
|
4
|
+
* Patterns for parsing "toggle" command in Quechua (Runasimi).
|
|
5
|
+
* SOV word order with postposition suffixes (-ta for patient, -man for destination).
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { LanguagePattern } from '../../types';
|
|
9
|
+
|
|
10
|
+
export function getTogglePatternsQu(): LanguagePattern[] {
|
|
11
|
+
return [
|
|
12
|
+
// SOV pattern: .active ta t'ikray (patient + verb)
|
|
13
|
+
{
|
|
14
|
+
id: 'toggle-qu-sov',
|
|
15
|
+
language: 'qu',
|
|
16
|
+
command: 'toggle',
|
|
17
|
+
priority: 100,
|
|
18
|
+
template: {
|
|
19
|
+
format: "{patient} ta t'ikray",
|
|
20
|
+
tokens: [
|
|
21
|
+
{ type: 'role', role: 'patient' },
|
|
22
|
+
{ type: 'literal', value: 'ta' },
|
|
23
|
+
{ type: 'literal', value: "t'ikray", alternatives: ['tikray', 'kutichiy'] },
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
extraction: {
|
|
27
|
+
patient: { position: 0 },
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
// Simple pattern: t'ikray .active (verb + patient, more casual)
|
|
31
|
+
{
|
|
32
|
+
id: 'toggle-qu-simple',
|
|
33
|
+
language: 'qu',
|
|
34
|
+
command: 'toggle',
|
|
35
|
+
priority: 90,
|
|
36
|
+
template: {
|
|
37
|
+
format: "t'ikray {patient}",
|
|
38
|
+
tokens: [
|
|
39
|
+
{ type: 'literal', value: "t'ikray", alternatives: ['tikray', 'kutichiy'] },
|
|
40
|
+
{ type: 'role', role: 'patient' },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
extraction: {
|
|
44
|
+
patient: { position: 1 },
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
// With destination: #button pi .active ta t'ikray
|
|
48
|
+
{
|
|
49
|
+
id: 'toggle-qu-with-dest',
|
|
50
|
+
language: 'qu',
|
|
51
|
+
command: 'toggle',
|
|
52
|
+
priority: 95,
|
|
53
|
+
template: {
|
|
54
|
+
format: "{destination} pi {patient} ta t'ikray",
|
|
55
|
+
tokens: [
|
|
56
|
+
{ type: 'role', role: 'destination' },
|
|
57
|
+
{ type: 'literal', value: 'pi' },
|
|
58
|
+
{ type: 'role', role: 'patient' },
|
|
59
|
+
{ type: 'literal', value: 'ta' },
|
|
60
|
+
{ type: 'literal', value: "t'ikray", alternatives: ['tikray', 'kutichiy'] },
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
extraction: {
|
|
64
|
+
destination: { position: 0 },
|
|
65
|
+
patient: { position: 2 },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
// Destination with -man marker: #button man .active ta t'ikray
|
|
69
|
+
{
|
|
70
|
+
id: 'toggle-qu-dest-man',
|
|
71
|
+
language: 'qu',
|
|
72
|
+
command: 'toggle',
|
|
73
|
+
priority: 93,
|
|
74
|
+
template: {
|
|
75
|
+
format: "{destination} man {patient} ta t'ikray",
|
|
76
|
+
tokens: [
|
|
77
|
+
{ type: 'role', role: 'destination' },
|
|
78
|
+
{ type: 'literal', value: 'man' },
|
|
79
|
+
{ type: 'role', role: 'patient' },
|
|
80
|
+
{ type: 'literal', value: 'ta' },
|
|
81
|
+
{ type: 'literal', value: "t'ikray", alternatives: ['tikray', 'kutichiy'] },
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
extraction: {
|
|
85
|
+
destination: { position: 0 },
|
|
86
|
+
patient: { position: 2 },
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
];
|
|
90
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Turkish Toggle 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,79 +11,5 @@ import type { LanguagePattern } from '../../types';
|
|
|
10
11
|
* Get Turkish toggle patterns.
|
|
11
12
|
*/
|
|
12
13
|
export function getTogglePatternsTr(): LanguagePattern[] {
|
|
13
|
-
return [
|
|
14
|
-
{
|
|
15
|
-
id: 'toggle-tr-full',
|
|
16
|
-
language: 'tr',
|
|
17
|
-
command: 'toggle',
|
|
18
|
-
priority: 100,
|
|
19
|
-
template: {
|
|
20
|
-
format: '{target} üzerinde {patient} değiştir',
|
|
21
|
-
tokens: [
|
|
22
|
-
{ type: 'role', role: 'destination' },
|
|
23
|
-
{ type: 'literal', value: 'üzerinde', alternatives: ['üstünde', 'de', 'da'] },
|
|
24
|
-
{ type: 'role', role: 'patient' },
|
|
25
|
-
{ type: 'literal', value: 'değiştir', alternatives: ['değistir'] },
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
extraction: {
|
|
29
|
-
destination: { position: 0 },
|
|
30
|
-
patient: { position: 2 },
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: 'toggle-tr-simple',
|
|
35
|
-
language: 'tr',
|
|
36
|
-
command: 'toggle',
|
|
37
|
-
priority: 90,
|
|
38
|
-
template: {
|
|
39
|
-
format: '{patient} değiştir',
|
|
40
|
-
tokens: [
|
|
41
|
-
{ type: 'role', role: 'patient' },
|
|
42
|
-
{ type: 'literal', value: 'değiştir', alternatives: ['değistir'] },
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
extraction: {
|
|
46
|
-
patient: { position: 0 },
|
|
47
|
-
destination: { default: { type: 'reference', value: 'me' } },
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: 'toggle-tr-imperative',
|
|
52
|
-
language: 'tr',
|
|
53
|
-
command: 'toggle',
|
|
54
|
-
priority: 85,
|
|
55
|
-
template: {
|
|
56
|
-
format: 'değiştir {patient}',
|
|
57
|
-
tokens: [
|
|
58
|
-
{ type: 'literal', value: 'değiştir', alternatives: ['değistir'] },
|
|
59
|
-
{ type: 'role', role: 'patient' },
|
|
60
|
-
],
|
|
61
|
-
},
|
|
62
|
-
extraction: {
|
|
63
|
-
patient: { position: 1 },
|
|
64
|
-
destination: { default: { type: 'reference', value: 'me' } },
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
// Phase 6d: Object-before-destination scrambled order
|
|
68
|
-
{
|
|
69
|
-
id: 'toggle-tr-scrambled',
|
|
70
|
-
language: 'tr',
|
|
71
|
-
command: 'toggle',
|
|
72
|
-
priority: 70,
|
|
73
|
-
template: {
|
|
74
|
-
format: '{patient} {destination} üzerinde değiştir',
|
|
75
|
-
tokens: [
|
|
76
|
-
{ type: 'role', role: 'patient' },
|
|
77
|
-
{ type: 'role', role: 'destination' },
|
|
78
|
-
{ type: 'literal', value: 'üzerinde', alternatives: ['üstünde'] },
|
|
79
|
-
{ type: 'literal', value: 'değiştir', alternatives: ['değistir'] },
|
|
80
|
-
],
|
|
81
|
-
},
|
|
82
|
-
extraction: {
|
|
83
|
-
patient: { position: 0 },
|
|
84
|
-
destination: { position: 1 },
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
];
|
|
14
|
+
return [];
|
|
88
15
|
}
|