@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.
Files changed (162) hide show
  1. package/dist/browser-ar.ar.global.js +2 -2
  2. package/dist/browser-core.core.global.js +2 -2
  3. package/dist/browser-de.de.global.js +2 -2
  4. package/dist/browser-east-asian.east-asian.global.js +2 -2
  5. package/dist/browser-en-tr.en-tr.global.js +2 -2
  6. package/dist/browser-en.en.global.js +2 -2
  7. package/dist/browser-es-en.es-en.global.js +2 -2
  8. package/dist/browser-es.es.global.js +2 -2
  9. package/dist/browser-fr.fr.global.js +2 -2
  10. package/dist/browser-id.id.global.js +2 -2
  11. package/dist/browser-ja.ja.global.js +2 -2
  12. package/dist/browser-ko.ko.global.js +2 -2
  13. package/dist/browser-lazy.lazy.global.js +2 -2
  14. package/dist/browser-priority.priority.global.js +2 -2
  15. package/dist/browser-pt.pt.global.js +2 -2
  16. package/dist/browser-qu.qu.global.js +2 -2
  17. package/dist/browser-sw.sw.global.js +2 -2
  18. package/dist/browser-tr.tr.global.js +2 -2
  19. package/dist/browser-western.western.global.js +2 -2
  20. package/dist/browser-zh.zh.global.js +2 -2
  21. package/dist/browser.global.js +2 -2
  22. package/dist/browser.global.js.map +1 -1
  23. package/dist/index.cjs +13042 -17462
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +49 -5
  26. package/dist/index.d.ts +49 -5
  27. package/dist/index.js +14044 -18464
  28. package/dist/index.js.map +1 -1
  29. package/dist/languages/ar.d.ts +1 -1
  30. package/dist/languages/ar.js +31 -44
  31. package/dist/languages/ar.js.map +1 -1
  32. package/dist/languages/de.d.ts +1 -1
  33. package/dist/languages/de.js +14 -2
  34. package/dist/languages/de.js.map +1 -1
  35. package/dist/languages/en.d.ts +1 -1
  36. package/dist/languages/en.js +558 -12
  37. package/dist/languages/en.js.map +1 -1
  38. package/dist/languages/es.d.ts +1 -1
  39. package/dist/languages/es.js +16 -0
  40. package/dist/languages/es.js.map +1 -1
  41. package/dist/languages/fr.d.ts +1 -1
  42. package/dist/languages/fr.js +14 -2
  43. package/dist/languages/fr.js.map +1 -1
  44. package/dist/languages/id.d.ts +1 -1
  45. package/dist/languages/id.js +14 -2
  46. package/dist/languages/id.js.map +1 -1
  47. package/dist/languages/ja.d.ts +1 -1
  48. package/dist/languages/ja.js +18 -3
  49. package/dist/languages/ja.js.map +1 -1
  50. package/dist/languages/ko.d.ts +8 -1
  51. package/dist/languages/ko.js +75 -43
  52. package/dist/languages/ko.js.map +1 -1
  53. package/dist/languages/pt.d.ts +1 -1
  54. package/dist/languages/pt.js +17 -0
  55. package/dist/languages/pt.js.map +1 -1
  56. package/dist/languages/qu.d.ts +12 -1
  57. package/dist/languages/qu.js +77 -2
  58. package/dist/languages/qu.js.map +1 -1
  59. package/dist/languages/sw.d.ts +1 -1
  60. package/dist/languages/sw.js.map +1 -1
  61. package/dist/languages/tr.d.ts +9 -1
  62. package/dist/languages/tr.js +96 -72
  63. package/dist/languages/tr.js.map +1 -1
  64. package/dist/languages/zh.d.ts +1 -1
  65. package/dist/languages/zh.js +16 -0
  66. package/dist/languages/zh.js.map +1 -1
  67. package/dist/{types-C4dcj53L.d.ts → types-BY3Id07j.d.ts} +20 -5
  68. package/package.json +20 -29
  69. package/src/generators/command-schemas.ts +21 -10
  70. package/src/generators/event-handler-generator.ts +50 -44
  71. package/src/generators/language-profiles.ts +6 -0
  72. package/src/generators/pattern-generator.ts +883 -1
  73. package/src/generators/profiles/arabic.ts +19 -3
  74. package/src/generators/profiles/bengali.ts +12 -1
  75. package/src/generators/profiles/chinese.ts +15 -0
  76. package/src/generators/profiles/french.ts +12 -1
  77. package/src/generators/profiles/german.ts +12 -1
  78. package/src/generators/profiles/hebrew.ts +148 -0
  79. package/src/generators/profiles/hindi.ts +12 -1
  80. package/src/generators/profiles/index.ts +2 -0
  81. package/src/generators/profiles/indonesian.ts +12 -1
  82. package/src/generators/profiles/italian.ts +16 -0
  83. package/src/generators/profiles/japanese.ts +11 -2
  84. package/src/generators/profiles/korean.ts +15 -1
  85. package/src/generators/profiles/polish.ts +12 -0
  86. package/src/generators/profiles/portuguese.ts +16 -0
  87. package/src/generators/profiles/russian.ts +11 -0
  88. package/src/generators/profiles/spanish.ts +15 -0
  89. package/src/generators/profiles/spanishMexico.ts +176 -0
  90. package/src/generators/profiles/thai.ts +11 -0
  91. package/src/generators/profiles/turkish.ts +49 -7
  92. package/src/generators/profiles/types.ts +21 -5
  93. package/src/generators/profiles/ukrainian.ts +11 -0
  94. package/src/generators/profiles/vietnamese.ts +11 -0
  95. package/src/language-building-schema.ts +111 -0
  96. package/src/languages/_all.ts +5 -1
  97. package/src/languages/es-MX.ts +32 -0
  98. package/src/languages/he.ts +15 -0
  99. package/src/parser/pattern-matcher.ts +10 -1
  100. package/src/parser/semantic-parser.ts +3 -0
  101. package/src/patterns/add/ar.ts +3 -59
  102. package/src/patterns/add/index.ts +5 -1
  103. package/src/patterns/add/ja.ts +3 -81
  104. package/src/patterns/add/ko.ts +3 -62
  105. package/src/patterns/add/qu.ts +69 -0
  106. package/src/patterns/add/tr.ts +3 -59
  107. package/src/patterns/builders.ts +1 -0
  108. package/src/patterns/decrement/tr.ts +3 -36
  109. package/src/patterns/event-handler/ar.ts +3 -139
  110. package/src/patterns/event-handler/he.ts +15 -0
  111. package/src/patterns/event-handler/index.ts +5 -1
  112. package/src/patterns/event-handler/ja.ts +3 -106
  113. package/src/patterns/event-handler/ko.ts +3 -121
  114. package/src/patterns/event-handler/ms.ts +45 -20
  115. package/src/patterns/event-handler/tr.ts +3 -158
  116. package/src/patterns/get/ar.ts +3 -37
  117. package/src/patterns/get/ja.ts +3 -41
  118. package/src/patterns/get/ko.ts +3 -41
  119. package/src/patterns/grammar-transformed/ja.ts +3 -1701
  120. package/src/patterns/grammar-transformed/ko.ts +3 -1299
  121. package/src/patterns/grammar-transformed/tr.ts +3 -1055
  122. package/src/patterns/hide/ar.ts +3 -55
  123. package/src/patterns/hide/ja.ts +3 -57
  124. package/src/patterns/hide/ko.ts +3 -57
  125. package/src/patterns/hide/tr.ts +3 -53
  126. package/src/patterns/increment/tr.ts +3 -40
  127. package/src/patterns/put/ar.ts +3 -62
  128. package/src/patterns/put/ja.ts +3 -63
  129. package/src/patterns/put/ko.ts +3 -55
  130. package/src/patterns/put/tr.ts +3 -55
  131. package/src/patterns/remove/ar.ts +3 -59
  132. package/src/patterns/remove/index.ts +5 -1
  133. package/src/patterns/remove/ja.ts +3 -62
  134. package/src/patterns/remove/ko.ts +3 -66
  135. package/src/patterns/remove/qu.ts +69 -0
  136. package/src/patterns/remove/tr.ts +3 -66
  137. package/src/patterns/set/ar.ts +3 -72
  138. package/src/patterns/set/ja.ts +3 -74
  139. package/src/patterns/set/ko.ts +3 -73
  140. package/src/patterns/set/tr.ts +3 -95
  141. package/src/patterns/show/ar.ts +3 -55
  142. package/src/patterns/show/ja.ts +3 -57
  143. package/src/patterns/show/ko.ts +3 -61
  144. package/src/patterns/show/tr.ts +3 -53
  145. package/src/patterns/take/ar.ts +3 -39
  146. package/src/patterns/toggle/ar.ts +3 -49
  147. package/src/patterns/toggle/index.ts +5 -1
  148. package/src/patterns/toggle/ja.ts +3 -144
  149. package/src/patterns/toggle/ko.ts +3 -101
  150. package/src/patterns/toggle/qu.ts +90 -0
  151. package/src/patterns/toggle/tr.ts +3 -76
  152. package/src/registry.ts +179 -15
  153. package/src/tokenizers/arabic.ts +13 -46
  154. package/src/tokenizers/bengali.ts +2 -16
  155. package/src/tokenizers/he.ts +542 -0
  156. package/src/tokenizers/index.ts +1 -0
  157. package/src/tokenizers/japanese.ts +3 -1
  158. package/src/tokenizers/korean.ts +104 -48
  159. package/src/tokenizers/ms.ts +3 -0
  160. package/src/tokenizers/quechua.ts +101 -2
  161. package/src/tokenizers/turkish.ts +64 -69
  162. package/src/types.ts +13 -0
@@ -1,14 +1,8 @@
1
1
  /**
2
2
  * Korean Grammar-Transformed Patterns
3
3
  *
4
- * These patterns match the hybrid output from GrammarTransformer where
5
- * event and command are combined in SOV order:
6
- * English: "on click toggle .active"
7
- * Grammar output: ".active 를 클릭 토글"
8
- *
9
- * Format: {patient} 를 {event-word} {action-word}
10
- *
11
- * Tree-shakeable: Only included when Korean is imported.
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.
12
6
  */
13
7
 
14
8
  import type { LanguagePattern } from '../../types';
@@ -17,1295 +11,5 @@ import type { LanguagePattern } from '../../types';
17
11
  * Get Korean grammar-transformed patterns.
18
12
  */
19
13
  export function getGrammarTransformedPatternsKo(): LanguagePattern[] {
20
- return [
21
- // ==========================================================================
22
- // Click + Toggle
23
- // ==========================================================================
24
- {
25
- id: 'grammar-ko-click-toggle',
26
- language: 'ko',
27
- command: 'on',
28
- priority: 75,
29
- template: {
30
- format: '{patient} 를 클릭 토글',
31
- tokens: [
32
- { type: 'role', role: 'patient' },
33
- { type: 'literal', value: '를', alternatives: ['을'] },
34
- { type: 'literal', value: '클릭' },
35
- { type: 'literal', value: '토글', alternatives: ['토글하다'] },
36
- ],
37
- },
38
- extraction: {
39
- patient: { position: 0 },
40
- event: { default: { type: 'literal', value: 'click' } },
41
- action: { default: { type: 'literal', value: 'toggle' } },
42
- },
43
- },
44
-
45
- // ==========================================================================
46
- // Click + Add
47
- // ==========================================================================
48
- {
49
- id: 'grammar-ko-click-add',
50
- language: 'ko',
51
- command: 'on',
52
- priority: 75,
53
- template: {
54
- format: '{patient} 를 클릭 추가',
55
- tokens: [
56
- { type: 'role', role: 'patient' },
57
- { type: 'literal', value: '를', alternatives: ['을'] },
58
- { type: 'literal', value: '클릭' },
59
- { type: 'literal', value: '추가', alternatives: ['추가하다', '더하다'] },
60
- ],
61
- },
62
- extraction: {
63
- patient: { position: 0 },
64
- event: { default: { type: 'literal', value: 'click' } },
65
- action: { default: { type: 'literal', value: 'add' } },
66
- },
67
- },
68
-
69
- // ==========================================================================
70
- // Click + Remove
71
- // ==========================================================================
72
- {
73
- id: 'grammar-ko-click-remove',
74
- language: 'ko',
75
- command: 'on',
76
- priority: 75,
77
- template: {
78
- format: '{patient} 를 클릭 제거',
79
- tokens: [
80
- { type: 'role', role: 'patient' },
81
- { type: 'literal', value: '를', alternatives: ['을'] },
82
- { type: 'literal', value: '클릭' },
83
- { type: 'literal', value: '제거', alternatives: ['제거하다', '삭제', '빼다'] },
84
- ],
85
- },
86
- extraction: {
87
- patient: { position: 0 },
88
- event: { default: { type: 'literal', value: 'click' } },
89
- action: { default: { type: 'literal', value: 'remove' } },
90
- },
91
- },
92
-
93
- // ==========================================================================
94
- // Click + Increment
95
- // ==========================================================================
96
- {
97
- id: 'grammar-ko-click-increment',
98
- language: 'ko',
99
- command: 'on',
100
- priority: 75,
101
- template: {
102
- format: '{patient} 를 클릭 증가',
103
- tokens: [
104
- { type: 'role', role: 'patient' },
105
- { type: 'literal', value: '를', alternatives: ['을'] },
106
- { type: 'literal', value: '클릭' },
107
- { type: 'literal', value: '증가', alternatives: ['증가하다', '늘리다'] },
108
- ],
109
- },
110
- extraction: {
111
- patient: { position: 0 },
112
- event: { default: { type: 'literal', value: 'click' } },
113
- action: { default: { type: 'literal', value: 'increment' } },
114
- },
115
- },
116
-
117
- // ==========================================================================
118
- // Click + Show
119
- // ==========================================================================
120
- {
121
- id: 'grammar-ko-click-show',
122
- language: 'ko',
123
- command: 'on',
124
- priority: 75,
125
- template: {
126
- format: '{patient} 를 클릭 보이기',
127
- tokens: [
128
- { type: 'role', role: 'patient' },
129
- { type: 'literal', value: '를', alternatives: ['을'] },
130
- { type: 'literal', value: '클릭' },
131
- { type: 'literal', value: '보이기', alternatives: ['보이다', '표시'] },
132
- ],
133
- },
134
- extraction: {
135
- patient: { position: 0 },
136
- event: { default: { type: 'literal', value: 'click' } },
137
- action: { default: { type: 'literal', value: 'show' } },
138
- },
139
- },
140
-
141
- // ==========================================================================
142
- // Click + Hide
143
- // ==========================================================================
144
- {
145
- id: 'grammar-ko-click-hide',
146
- language: 'ko',
147
- command: 'on',
148
- priority: 75,
149
- template: {
150
- format: '{patient} 를 클릭 숨기기',
151
- tokens: [
152
- { type: 'role', role: 'patient' },
153
- { type: 'literal', value: '를', alternatives: ['을'] },
154
- { type: 'literal', value: '클릭' },
155
- { type: 'literal', value: '숨기기', alternatives: ['숨기다', '감추다'] },
156
- ],
157
- },
158
- extraction: {
159
- patient: { position: 0 },
160
- event: { default: { type: 'literal', value: 'click' } },
161
- action: { default: { type: 'literal', value: 'hide' } },
162
- },
163
- },
164
-
165
- // ==========================================================================
166
- // Click + Set (for counters)
167
- // ==========================================================================
168
- {
169
- id: 'grammar-ko-click-set',
170
- language: 'ko',
171
- command: 'on',
172
- priority: 75,
173
- template: {
174
- format: '{patient} 를 클릭 설정',
175
- tokens: [
176
- { type: 'role', role: 'patient' },
177
- { type: 'literal', value: '를', alternatives: ['을'] },
178
- { type: 'literal', value: '클릭' },
179
- { type: 'literal', value: '설정', alternatives: ['설정하다', '지정'] },
180
- ],
181
- },
182
- extraction: {
183
- patient: { position: 0 },
184
- event: { default: { type: 'literal', value: 'click' } },
185
- action: { default: { type: 'literal', value: 'set' } },
186
- },
187
- },
188
-
189
- // ==========================================================================
190
- // Click + Decrement
191
- // ==========================================================================
192
- {
193
- id: 'grammar-ko-click-decrement',
194
- language: 'ko',
195
- command: 'on',
196
- priority: 75,
197
- template: {
198
- format: '{patient} 를 클릭 감소',
199
- tokens: [
200
- { type: 'role', role: 'patient' },
201
- { type: 'literal', value: '를', alternatives: ['을'] },
202
- { type: 'literal', value: '클릭' },
203
- { type: 'literal', value: '감소', alternatives: ['감소하다', '줄이다'] },
204
- ],
205
- },
206
- extraction: {
207
- patient: { position: 0 },
208
- event: { default: { type: 'literal', value: 'click' } },
209
- action: { default: { type: 'literal', value: 'decrement' } },
210
- },
211
- },
212
-
213
- // ==========================================================================
214
- // DESTINATION PATTERNS (higher priority)
215
- // ==========================================================================
216
-
217
- // Click + Set with destination: "{destination} 를 클릭 설정 {patient} 에"
218
- {
219
- id: 'grammar-ko-click-set-destination',
220
- language: 'ko',
221
- command: 'on',
222
- priority: 80,
223
- template: {
224
- format: '{destination} 를 클릭 설정 {patient} 에',
225
- tokens: [
226
- { type: 'role', role: 'destination' },
227
- { type: 'literal', value: '를', alternatives: ['을'] },
228
- { type: 'literal', value: '클릭' },
229
- { type: 'literal', value: '설정', alternatives: ['설정하다'] },
230
- { type: 'role', role: 'patient' },
231
- { type: 'literal', value: '에' },
232
- ],
233
- },
234
- extraction: {
235
- destination: { position: 0 },
236
- patient: { marker: '에' },
237
- event: { default: { type: 'literal', value: 'click' } },
238
- action: { default: { type: 'literal', value: 'set' } },
239
- },
240
- },
241
-
242
- // Click + Put with destination: "{patient} 를 클릭 넣다 {destination} 에"
243
- {
244
- id: 'grammar-ko-click-put-destination',
245
- language: 'ko',
246
- command: 'on',
247
- priority: 80,
248
- template: {
249
- format: '{patient} 를 클릭 넣다 {destination} 에',
250
- tokens: [
251
- { type: 'role', role: 'patient' },
252
- { type: 'literal', value: '를', alternatives: ['을'] },
253
- { type: 'literal', value: '클릭' },
254
- { type: 'literal', value: '넣다', alternatives: ['넣기'] },
255
- { type: 'role', role: 'destination' },
256
- { type: 'literal', value: '에' },
257
- ],
258
- },
259
- extraction: {
260
- patient: { position: 0 },
261
- destination: { marker: '에' },
262
- event: { default: { type: 'literal', value: 'click' } },
263
- action: { default: { type: 'literal', value: 'put' } },
264
- },
265
- },
266
-
267
- // Click + Add with destination: "{patient} 를 클릭 추가 {destination} 에"
268
- {
269
- id: 'grammar-ko-click-add-destination',
270
- language: 'ko',
271
- command: 'on',
272
- priority: 80,
273
- template: {
274
- format: '{patient} 를 클릭 추가 {destination} 에',
275
- tokens: [
276
- { type: 'role', role: 'patient' },
277
- { type: 'literal', value: '를', alternatives: ['을'] },
278
- { type: 'literal', value: '클릭' },
279
- { type: 'literal', value: '추가', alternatives: ['추가하다'] },
280
- { type: 'role', role: 'destination' },
281
- { type: 'literal', value: '에' },
282
- ],
283
- },
284
- extraction: {
285
- patient: { position: 0 },
286
- destination: { marker: '에' },
287
- event: { default: { type: 'literal', value: 'click' } },
288
- action: { default: { type: 'literal', value: 'add' } },
289
- },
290
- },
291
-
292
- // Click + Remove from destination: "{patient} 를 클릭 제거 {destination} 에서"
293
- {
294
- id: 'grammar-ko-click-remove-destination',
295
- language: 'ko',
296
- command: 'on',
297
- priority: 80,
298
- template: {
299
- format: '{patient} 를 클릭 제거 {destination} 에서',
300
- tokens: [
301
- { type: 'role', role: 'patient' },
302
- { type: 'literal', value: '를', alternatives: ['을'] },
303
- { type: 'literal', value: '클릭' },
304
- { type: 'literal', value: '제거', alternatives: ['제거하다'] },
305
- { type: 'role', role: 'destination' },
306
- { type: 'literal', value: '에서' },
307
- ],
308
- },
309
- extraction: {
310
- patient: { position: 0 },
311
- destination: { marker: '에서' },
312
- event: { default: { type: 'literal', value: 'click' } },
313
- action: { default: { type: 'literal', value: 'remove' } },
314
- },
315
- },
316
-
317
- // Click + Show with style: "{patient} 를 클릭 보이다 {style} 로"
318
- {
319
- id: 'grammar-ko-click-show-style',
320
- language: 'ko',
321
- command: 'on',
322
- priority: 80,
323
- template: {
324
- format: '{patient} 를 클릭 보이다 {style} 로',
325
- tokens: [
326
- { type: 'role', role: 'patient' },
327
- { type: 'literal', value: '를', alternatives: ['을'] },
328
- { type: 'literal', value: '클릭' },
329
- { type: 'literal', value: '보이다', alternatives: ['보이기'] },
330
- { type: 'role', role: 'style' },
331
- { type: 'literal', value: '로' },
332
- ],
333
- },
334
- extraction: {
335
- patient: { position: 0 },
336
- style: { marker: '로' },
337
- event: { default: { type: 'literal', value: 'click' } },
338
- action: { default: { type: 'literal', value: 'show' } },
339
- },
340
- },
341
-
342
- // Click + Hide with style: "{patient} 를 클릭 숨기다 {style} 로"
343
- {
344
- id: 'grammar-ko-click-hide-style',
345
- language: 'ko',
346
- command: 'on',
347
- priority: 80,
348
- template: {
349
- format: '{patient} 를 클릭 숨기다 {style} 로',
350
- tokens: [
351
- { type: 'role', role: 'patient' },
352
- { type: 'literal', value: '를', alternatives: ['을'] },
353
- { type: 'literal', value: '클릭' },
354
- { type: 'literal', value: '숨기다', alternatives: ['숨기기'] },
355
- { type: 'role', role: 'style' },
356
- { type: 'literal', value: '로' },
357
- ],
358
- },
359
- extraction: {
360
- patient: { position: 0 },
361
- style: { marker: '로' },
362
- event: { default: { type: 'literal', value: 'click' } },
363
- action: { default: { type: 'literal', value: 'hide' } },
364
- },
365
- },
366
-
367
- // ==========================================================================
368
- // THEN-CHAIN PATTERNS (with continuation marker)
369
- // These patterns match the first command and signal continuation
370
- // ==========================================================================
371
-
372
- // Click + Wait then: "{duration} 를 클릭 대기 그러면"
373
- {
374
- id: 'grammar-ko-click-wait-then',
375
- language: 'ko',
376
- command: 'on',
377
- priority: 85,
378
- template: {
379
- format: '{duration} 를 클릭 대기 그러면',
380
- tokens: [
381
- { type: 'role', role: 'duration' },
382
- { type: 'literal', value: '를', alternatives: ['을'] },
383
- { type: 'literal', value: '클릭' },
384
- { type: 'literal', value: '대기', alternatives: ['대기하다', '기다리다'] },
385
- { type: 'literal', value: '그러면', alternatives: ['그다음', '그리고'] },
386
- ],
387
- },
388
- extraction: {
389
- duration: { position: 0 },
390
- event: { default: { type: 'literal', value: 'click' } },
391
- action: { default: { type: 'literal', value: 'wait' } },
392
- continues: { default: { type: 'literal', value: 'then' } },
393
- },
394
- },
395
-
396
- // Click + Toggle then: "{patient} 를 클릭 토글 그러면"
397
- {
398
- id: 'grammar-ko-click-toggle-then',
399
- language: 'ko',
400
- command: 'on',
401
- priority: 85,
402
- template: {
403
- format: '{patient} 를 클릭 토글 그러면',
404
- tokens: [
405
- { type: 'role', role: 'patient' },
406
- { type: 'literal', value: '를', alternatives: ['을'] },
407
- { type: 'literal', value: '클릭' },
408
- { type: 'literal', value: '토글', alternatives: ['토글하다'] },
409
- { type: 'literal', value: '그러면', alternatives: ['그다음', '그리고'] },
410
- ],
411
- },
412
- extraction: {
413
- patient: { position: 0 },
414
- event: { default: { type: 'literal', value: 'click' } },
415
- action: { default: { type: 'literal', value: 'toggle' } },
416
- continues: { default: { type: 'literal', value: 'then' } },
417
- },
418
- },
419
-
420
- // Click + Add then: "{patient} 를 클릭 추가 그러면"
421
- {
422
- id: 'grammar-ko-click-add-then',
423
- language: 'ko',
424
- command: 'on',
425
- priority: 85,
426
- template: {
427
- format: '{patient} 를 클릭 추가 그러면',
428
- tokens: [
429
- { type: 'role', role: 'patient' },
430
- { type: 'literal', value: '를', alternatives: ['을'] },
431
- { type: 'literal', value: '클릭' },
432
- { type: 'literal', value: '추가', alternatives: ['추가하다'] },
433
- { type: 'literal', value: '그러면', alternatives: ['그다음', '그리고'] },
434
- ],
435
- },
436
- extraction: {
437
- patient: { position: 0 },
438
- event: { default: { type: 'literal', value: 'click' } },
439
- action: { default: { type: 'literal', value: 'add' } },
440
- continues: { default: { type: 'literal', value: 'then' } },
441
- },
442
- },
443
-
444
- // Click + Remove then: "{patient} 를 클릭 제거 그러면"
445
- {
446
- id: 'grammar-ko-click-remove-then',
447
- language: 'ko',
448
- command: 'on',
449
- priority: 85,
450
- template: {
451
- format: '{patient} 를 클릭 제거 그러면',
452
- tokens: [
453
- { type: 'role', role: 'patient' },
454
- { type: 'literal', value: '를', alternatives: ['을'] },
455
- { type: 'literal', value: '클릭' },
456
- { type: 'literal', value: '제거', alternatives: ['제거하다'] },
457
- { type: 'literal', value: '그러면', alternatives: ['그다음', '그리고'] },
458
- ],
459
- },
460
- extraction: {
461
- patient: { position: 0 },
462
- event: { default: { type: 'literal', value: 'click' } },
463
- action: { default: { type: 'literal', value: 'remove' } },
464
- continues: { default: { type: 'literal', value: 'then' } },
465
- },
466
- },
467
-
468
- // Click + Show then: "{patient} 를 클릭 보이기 그러면"
469
- {
470
- id: 'grammar-ko-click-show-then',
471
- language: 'ko',
472
- command: 'on',
473
- priority: 85,
474
- template: {
475
- format: '{patient} 를 클릭 보이기 그러면',
476
- tokens: [
477
- { type: 'role', role: 'patient' },
478
- { type: 'literal', value: '를', alternatives: ['을'] },
479
- { type: 'literal', value: '클릭' },
480
- { type: 'literal', value: '보이기', alternatives: ['보이다'] },
481
- { type: 'literal', value: '그러면', alternatives: ['그다음', '그리고'] },
482
- ],
483
- },
484
- extraction: {
485
- patient: { position: 0 },
486
- event: { default: { type: 'literal', value: 'click' } },
487
- action: { default: { type: 'literal', value: 'show' } },
488
- continues: { default: { type: 'literal', value: 'then' } },
489
- },
490
- },
491
-
492
- // Click + Hide then: "{patient} 를 클릭 숨기기 그러면"
493
- {
494
- id: 'grammar-ko-click-hide-then',
495
- language: 'ko',
496
- command: 'on',
497
- priority: 85,
498
- template: {
499
- format: '{patient} 를 클릭 숨기기 그러면',
500
- tokens: [
501
- { type: 'role', role: 'patient' },
502
- { type: 'literal', value: '를', alternatives: ['을'] },
503
- { type: 'literal', value: '클릭' },
504
- { type: 'literal', value: '숨기기', alternatives: ['숨기다'] },
505
- { type: 'literal', value: '그러면', alternatives: ['그다음', '그리고'] },
506
- ],
507
- },
508
- extraction: {
509
- patient: { position: 0 },
510
- event: { default: { type: 'literal', value: 'click' } },
511
- action: { default: { type: 'literal', value: 'hide' } },
512
- continues: { default: { type: 'literal', value: 'then' } },
513
- },
514
- },
515
-
516
- // ==========================================================================
517
- // CONTINUATION PATTERNS (for body after then)
518
- // These match commands that follow the "then" keyword
519
- // ==========================================================================
520
-
521
- // Remove continuation: "{patient} 를 제거"
522
- {
523
- id: 'grammar-ko-remove-continuation',
524
- language: 'ko',
525
- command: 'remove',
526
- priority: 70,
527
- template: {
528
- format: '{patient} 를 제거',
529
- tokens: [
530
- { type: 'role', role: 'patient' },
531
- { type: 'literal', value: '를', alternatives: ['을'] },
532
- { type: 'literal', value: '제거', alternatives: ['제거하다'] },
533
- ],
534
- },
535
- extraction: {
536
- patient: { position: 0 },
537
- action: { default: { type: 'literal', value: 'remove' } },
538
- },
539
- },
540
-
541
- // Toggle continuation: "{patient} 를 토글"
542
- {
543
- id: 'grammar-ko-toggle-continuation',
544
- language: 'ko',
545
- command: 'toggle',
546
- priority: 70,
547
- template: {
548
- format: '{patient} 를 토글',
549
- tokens: [
550
- { type: 'role', role: 'patient' },
551
- { type: 'literal', value: '를', alternatives: ['을'] },
552
- { type: 'literal', value: '토글', alternatives: ['토글하다'] },
553
- ],
554
- },
555
- extraction: {
556
- patient: { position: 0 },
557
- action: { default: { type: 'literal', value: 'toggle' } },
558
- },
559
- },
560
-
561
- // Add continuation: "{patient} 를 추가"
562
- {
563
- id: 'grammar-ko-add-continuation',
564
- language: 'ko',
565
- command: 'add',
566
- priority: 70,
567
- template: {
568
- format: '{patient} 를 추가',
569
- tokens: [
570
- { type: 'role', role: 'patient' },
571
- { type: 'literal', value: '를', alternatives: ['을'] },
572
- { type: 'literal', value: '추가', alternatives: ['추가하다'] },
573
- ],
574
- },
575
- extraction: {
576
- patient: { position: 0 },
577
- action: { default: { type: 'literal', value: 'add' } },
578
- },
579
- },
580
-
581
- // Show continuation: "{patient} 를 보이기"
582
- {
583
- id: 'grammar-ko-show-continuation',
584
- language: 'ko',
585
- command: 'show',
586
- priority: 70,
587
- template: {
588
- format: '{patient} 를 보이기',
589
- tokens: [
590
- { type: 'role', role: 'patient' },
591
- { type: 'literal', value: '를', alternatives: ['을'] },
592
- { type: 'literal', value: '보이기', alternatives: ['보이다'] },
593
- ],
594
- },
595
- extraction: {
596
- patient: { position: 0 },
597
- action: { default: { type: 'literal', value: 'show' } },
598
- },
599
- },
600
-
601
- // Hide continuation: "{patient} 를 숨기기"
602
- {
603
- id: 'grammar-ko-hide-continuation',
604
- language: 'ko',
605
- command: 'hide',
606
- priority: 70,
607
- template: {
608
- format: '{patient} 를 숨기기',
609
- tokens: [
610
- { type: 'role', role: 'patient' },
611
- { type: 'literal', value: '를', alternatives: ['을'] },
612
- { type: 'literal', value: '숨기기', alternatives: ['숨기다'] },
613
- ],
614
- },
615
- extraction: {
616
- patient: { position: 0 },
617
- action: { default: { type: 'literal', value: 'hide' } },
618
- },
619
- },
620
-
621
- // Put into continuation: "{patient} 를 {destination} 에 넣다"
622
- {
623
- id: 'grammar-ko-put-continuation',
624
- language: 'ko',
625
- command: 'put',
626
- priority: 72,
627
- template: {
628
- format: '{patient} 를 {destination} 에 넣다',
629
- tokens: [
630
- { type: 'role', role: 'patient' },
631
- { type: 'literal', value: '를', alternatives: ['을'] },
632
- { type: 'role', role: 'destination' },
633
- { type: 'literal', value: '에' },
634
- { type: 'literal', value: '넣다', alternatives: ['넣기'] },
635
- ],
636
- },
637
- extraction: {
638
- patient: { position: 0 },
639
- destination: { marker: '에' },
640
- action: { default: { type: 'literal', value: 'put' } },
641
- },
642
- },
643
-
644
- // ==========================================================================
645
- // PUT BEFORE/AFTER PATTERNS
646
- // ==========================================================================
647
-
648
- // Click + Put before: "{value} 전에 {target} 를 클릭 넣다"
649
- {
650
- id: 'grammar-ko-click-put-before',
651
- language: 'ko',
652
- command: 'on',
653
- priority: 78,
654
- template: {
655
- format: '{patient} 전에 {destination} 를 클릭 넣다',
656
- tokens: [
657
- { type: 'role', role: 'patient' },
658
- { type: 'literal', value: '전에' },
659
- { type: 'role', role: 'destination' },
660
- { type: 'literal', value: '를', alternatives: ['을'] },
661
- { type: 'literal', value: '클릭' },
662
- { type: 'literal', value: '넣다', alternatives: ['넣기'] },
663
- ],
664
- },
665
- extraction: {
666
- patient: { position: 0 },
667
- destination: { position: 1 },
668
- event: { default: { type: 'literal', value: 'click' } },
669
- action: { default: { type: 'literal', value: 'put' } },
670
- position: { default: { type: 'literal', value: 'before' } },
671
- },
672
- },
673
-
674
- // Click + Put after: "{value} 후에 {target} 를 클릭 넣다"
675
- {
676
- id: 'grammar-ko-click-put-after',
677
- language: 'ko',
678
- command: 'on',
679
- priority: 78,
680
- template: {
681
- format: '{patient} 후에 {destination} 를 클릭 넣다',
682
- tokens: [
683
- { type: 'role', role: 'patient' },
684
- { type: 'literal', value: '후에' },
685
- { type: 'role', role: 'destination' },
686
- { type: 'literal', value: '를', alternatives: ['을'] },
687
- { type: 'literal', value: '클릭' },
688
- { type: 'literal', value: '넣다', alternatives: ['넣기'] },
689
- ],
690
- },
691
- extraction: {
692
- patient: { position: 0 },
693
- destination: { position: 1 },
694
- event: { default: { type: 'literal', value: 'click' } },
695
- action: { default: { type: 'literal', value: 'put' } },
696
- position: { default: { type: 'literal', value: 'after' } },
697
- },
698
- },
699
-
700
- // ==========================================================================
701
- // FETCH PATTERNS
702
- // ==========================================================================
703
-
704
- // Click + Fetch: "{source} 를 클릭 가져오기"
705
- {
706
- id: 'grammar-ko-click-fetch',
707
- language: 'ko',
708
- command: 'on',
709
- priority: 75,
710
- template: {
711
- format: '{source} 를 클릭 가져오기',
712
- tokens: [
713
- { type: 'role', role: 'source' },
714
- { type: 'literal', value: '를', alternatives: ['을'] },
715
- { type: 'literal', value: '클릭' },
716
- { type: 'literal', value: '가져오기', alternatives: ['가져오다', '패치'] },
717
- ],
718
- },
719
- extraction: {
720
- source: { position: 0 },
721
- event: { default: { type: 'literal', value: 'click' } },
722
- action: { default: { type: 'literal', value: 'fetch' } },
723
- },
724
- },
725
-
726
- // Click + Fetch then: "{source} 를 클릭 가져오기 그러면"
727
- {
728
- id: 'grammar-ko-click-fetch-then',
729
- language: 'ko',
730
- command: 'on',
731
- priority: 85,
732
- template: {
733
- format: '{source} 를 클릭 가져오기 그러면',
734
- tokens: [
735
- { type: 'role', role: 'source' },
736
- { type: 'literal', value: '를', alternatives: ['을'] },
737
- { type: 'literal', value: '클릭' },
738
- { type: 'literal', value: '가져오기', alternatives: ['가져오다', '패치'] },
739
- { type: 'literal', value: '그러면', alternatives: ['그다음', '그리고'] },
740
- ],
741
- },
742
- extraction: {
743
- source: { position: 0 },
744
- event: { default: { type: 'literal', value: 'click' } },
745
- action: { default: { type: 'literal', value: 'fetch' } },
746
- continues: { default: { type: 'literal', value: 'then' } },
747
- },
748
- },
749
-
750
- // ==========================================================================
751
- // TRANSITION PATTERNS
752
- // ==========================================================================
753
-
754
- // Click + Transition: "{property} 를 클릭 전환 {value} 에 {duration}"
755
- {
756
- id: 'grammar-ko-click-transition',
757
- language: 'ko',
758
- command: 'on',
759
- priority: 77,
760
- template: {
761
- format: '{patient} 를 클릭 전환 {value} 에 {duration}',
762
- tokens: [
763
- { type: 'role', role: 'patient' },
764
- { type: 'literal', value: '를', alternatives: ['을'] },
765
- { type: 'literal', value: '클릭' },
766
- { type: 'literal', value: '전환', alternatives: ['전환하다', '애니메이션'] },
767
- { type: 'role', role: 'goal' },
768
- { type: 'literal', value: '에' },
769
- { type: 'role', role: 'duration' },
770
- ],
771
- },
772
- extraction: {
773
- patient: { position: 0 },
774
- goal: { position: 1 },
775
- duration: { position: 2 },
776
- event: { default: { type: 'literal', value: 'click' } },
777
- action: { default: { type: 'literal', value: 'transition' } },
778
- },
779
- },
780
-
781
- // Click + Transition then: "{property} 를 클릭 전환 {value} 에 {duration} 그러면"
782
- {
783
- id: 'grammar-ko-click-transition-then',
784
- language: 'ko',
785
- command: 'on',
786
- priority: 87,
787
- template: {
788
- format: '{patient} 를 클릭 전환 {value} 에 {duration} 그러면',
789
- tokens: [
790
- { type: 'role', role: 'patient' },
791
- { type: 'literal', value: '를', alternatives: ['을'] },
792
- { type: 'literal', value: '클릭' },
793
- { type: 'literal', value: '전환', alternatives: ['전환하다', '애니메이션'] },
794
- { type: 'role', role: 'goal' },
795
- { type: 'literal', value: '에' },
796
- { type: 'role', role: 'duration' },
797
- { type: 'literal', value: '그러면', alternatives: ['그다음', '그리고'] },
798
- ],
799
- },
800
- extraction: {
801
- patient: { position: 0 },
802
- goal: { position: 1 },
803
- duration: { position: 2 },
804
- event: { default: { type: 'literal', value: 'click' } },
805
- action: { default: { type: 'literal', value: 'transition' } },
806
- continues: { default: { type: 'literal', value: 'then' } },
807
- },
808
- },
809
-
810
- // ==========================================================================
811
- // SEND PATTERNS
812
- // ==========================================================================
813
-
814
- // Click + Send: "{message} 를 클릭 보내다 {target} 에"
815
- {
816
- id: 'grammar-ko-click-send',
817
- language: 'ko',
818
- command: 'on',
819
- priority: 77,
820
- template: {
821
- format: '{patient} 를 클릭 보내다 {destination} 에',
822
- tokens: [
823
- { type: 'role', role: 'patient' },
824
- { type: 'literal', value: '를', alternatives: ['을'] },
825
- { type: 'literal', value: '클릭' },
826
- { type: 'literal', value: '보내다', alternatives: ['보내기', '전송'] },
827
- { type: 'role', role: 'destination' },
828
- { type: 'literal', value: '에' },
829
- ],
830
- },
831
- extraction: {
832
- patient: { position: 0 },
833
- destination: { position: 1 },
834
- event: { default: { type: 'literal', value: 'click' } },
835
- action: { default: { type: 'literal', value: 'send' } },
836
- },
837
- },
838
-
839
- // ==========================================================================
840
- // TRIGGER PATTERNS
841
- // ==========================================================================
842
-
843
- // Load + Trigger: "{event} 를 로드 트리거"
844
- {
845
- id: 'grammar-ko-load-trigger',
846
- language: 'ko',
847
- command: 'on',
848
- priority: 75,
849
- template: {
850
- format: '{patient} 를 로드 트리거',
851
- tokens: [
852
- { type: 'role', role: 'patient' },
853
- { type: 'literal', value: '를', alternatives: ['을'] },
854
- { type: 'literal', value: '로드', alternatives: ['로딩'] },
855
- { type: 'literal', value: '트리거', alternatives: ['트리거하다', '발생'] },
856
- ],
857
- },
858
- extraction: {
859
- patient: { position: 0 },
860
- event: { default: { type: 'literal', value: 'load' } },
861
- action: { default: { type: 'literal', value: 'trigger' } },
862
- },
863
- },
864
-
865
- // ==========================================================================
866
- // FOCUS PATTERNS
867
- // ==========================================================================
868
-
869
- // Click + Focus: "{target} 를 클릭 포커스"
870
- {
871
- id: 'grammar-ko-click-focus',
872
- language: 'ko',
873
- command: 'on',
874
- priority: 75,
875
- template: {
876
- format: '{patient} 를 클릭 포커스',
877
- tokens: [
878
- { type: 'role', role: 'patient' },
879
- { type: 'literal', value: '를', alternatives: ['을'] },
880
- { type: 'literal', value: '클릭' },
881
- { type: 'literal', value: '포커스', alternatives: ['포커스하다', '집중'] },
882
- ],
883
- },
884
- extraction: {
885
- patient: { position: 0 },
886
- event: { default: { type: 'literal', value: 'click' } },
887
- action: { default: { type: 'literal', value: 'focus' } },
888
- },
889
- },
890
-
891
- // ==========================================================================
892
- // LOG PATTERNS
893
- // ==========================================================================
894
-
895
- // Click + Log: "{message} 를 클릭 로그"
896
- {
897
- id: 'grammar-ko-click-log',
898
- language: 'ko',
899
- command: 'on',
900
- priority: 75,
901
- template: {
902
- format: '{patient} 를 클릭 로그',
903
- tokens: [
904
- { type: 'role', role: 'patient' },
905
- { type: 'literal', value: '를', alternatives: ['을'] },
906
- { type: 'literal', value: '클릭' },
907
- { type: 'literal', value: '로그', alternatives: ['로그하다', '기록'] },
908
- ],
909
- },
910
- extraction: {
911
- patient: { position: 0 },
912
- event: { default: { type: 'literal', value: 'click' } },
913
- action: { default: { type: 'literal', value: 'log' } },
914
- },
915
- },
916
-
917
- // ==========================================================================
918
- // INPUT EVENT PATTERNS
919
- // ==========================================================================
920
-
921
- // Input + Put: "{value} 를 입력 넣다 {destination} 에"
922
- {
923
- id: 'grammar-ko-input-put',
924
- language: 'ko',
925
- command: 'on',
926
- priority: 75,
927
- template: {
928
- format: '{patient} 를 입력 넣다 {destination} 에',
929
- tokens: [
930
- { type: 'role', role: 'patient' },
931
- { type: 'literal', value: '를', alternatives: ['을'] },
932
- { type: 'literal', value: '입력' },
933
- { type: 'literal', value: '넣다', alternatives: ['넣기'] },
934
- { type: 'role', role: 'destination' },
935
- { type: 'literal', value: '에' },
936
- ],
937
- },
938
- extraction: {
939
- patient: { position: 0 },
940
- destination: { position: 1 },
941
- event: { default: { type: 'literal', value: 'input' } },
942
- action: { default: { type: 'literal', value: 'put' } },
943
- },
944
- },
945
-
946
- // Input + Set: "{patient} 를 입력 설정 {goal} 에"
947
- {
948
- id: 'grammar-ko-input-set',
949
- language: 'ko',
950
- command: 'on',
951
- priority: 75,
952
- template: {
953
- format: '{patient} 를 입력 설정 {goal} 에',
954
- tokens: [
955
- { type: 'role', role: 'patient' },
956
- { type: 'literal', value: '를', alternatives: ['을'] },
957
- { type: 'literal', value: '입력' },
958
- { type: 'literal', value: '설정', alternatives: ['설정하다'] },
959
- { type: 'role', role: 'goal' },
960
- { type: 'literal', value: '에' },
961
- ],
962
- },
963
- extraction: {
964
- patient: { position: 0 },
965
- goal: { position: 1 },
966
- event: { default: { type: 'literal', value: 'input' } },
967
- action: { default: { type: 'literal', value: 'set' } },
968
- },
969
- },
970
-
971
- // ==========================================================================
972
- // GO/NAVIGATE PATTERNS
973
- // ==========================================================================
974
-
975
- // Click + Go: "클릭 이동 url {destination} 에"
976
- {
977
- id: 'grammar-ko-click-go',
978
- language: 'ko',
979
- command: 'on',
980
- priority: 75,
981
- template: {
982
- format: '클릭 이동 url {destination} 에',
983
- tokens: [
984
- { type: 'literal', value: '클릭' },
985
- { type: 'literal', value: '이동', alternatives: ['이동하다', '가다'] },
986
- { type: 'literal', value: 'url' },
987
- { type: 'role', role: 'destination' },
988
- { type: 'literal', value: '에' },
989
- ],
990
- },
991
- extraction: {
992
- destination: { position: 0 },
993
- event: { default: { type: 'literal', value: 'click' } },
994
- action: { default: { type: 'literal', value: 'go' } },
995
- },
996
- },
997
-
998
- // Click + Go back: "back 를 클릭 이동"
999
- {
1000
- id: 'grammar-ko-click-go-back',
1001
- language: 'ko',
1002
- command: 'on',
1003
- priority: 75,
1004
- template: {
1005
- format: 'back 를 클릭 이동',
1006
- tokens: [
1007
- { type: 'literal', value: 'back' },
1008
- { type: 'literal', value: '를', alternatives: ['을'] },
1009
- { type: 'literal', value: '클릭' },
1010
- { type: 'literal', value: '이동', alternatives: ['이동하다', '가다'] },
1011
- ],
1012
- },
1013
- extraction: {
1014
- destination: { default: { type: 'literal', value: 'back' } },
1015
- event: { default: { type: 'literal', value: 'click' } },
1016
- action: { default: { type: 'literal', value: 'go' } },
1017
- },
1018
- },
1019
-
1020
- // ==========================================================================
1021
- // CALL PATTERNS
1022
- // ==========================================================================
1023
-
1024
- // Click + Call: "{function} 를 클릭 호출"
1025
- {
1026
- id: 'grammar-ko-click-call',
1027
- language: 'ko',
1028
- command: 'on',
1029
- priority: 75,
1030
- template: {
1031
- format: '{patient} 를 클릭 호출',
1032
- tokens: [
1033
- { type: 'role', role: 'patient' },
1034
- { type: 'literal', value: '를', alternatives: ['을'] },
1035
- { type: 'literal', value: '클릭' },
1036
- { type: 'literal', value: '호출', alternatives: ['호출하다', '부르다'] },
1037
- ],
1038
- },
1039
- extraction: {
1040
- patient: { position: 0 },
1041
- event: { default: { type: 'literal', value: 'click' } },
1042
- action: { default: { type: 'literal', value: 'call' } },
1043
- },
1044
- },
1045
-
1046
- // ==========================================================================
1047
- // WAIT FOR EVENT PATTERNS
1048
- // ==========================================================================
1049
-
1050
- // Click + Wait for event: "클릭 대기 {event}"
1051
- {
1052
- id: 'grammar-ko-click-wait-event',
1053
- language: 'ko',
1054
- command: 'on',
1055
- priority: 75,
1056
- template: {
1057
- format: '클릭 대기 {patient}',
1058
- tokens: [
1059
- { type: 'literal', value: '클릭' },
1060
- { type: 'literal', value: '대기', alternatives: ['대기하다', '기다리다'] },
1061
- { type: 'role', role: 'patient' },
1062
- ],
1063
- },
1064
- extraction: {
1065
- patient: { position: 0 },
1066
- event: { default: { type: 'literal', value: 'click' } },
1067
- action: { default: { type: 'literal', value: 'wait' } },
1068
- },
1069
- },
1070
-
1071
- // ==========================================================================
1072
- // GET PATTERNS
1073
- // ==========================================================================
1074
-
1075
- // Click + Get: "{target} 를 클릭 얻다"
1076
- {
1077
- id: 'grammar-ko-click-get',
1078
- language: 'ko',
1079
- command: 'on',
1080
- priority: 75,
1081
- template: {
1082
- format: '{patient} 를 클릭 얻다',
1083
- tokens: [
1084
- { type: 'role', role: 'patient' },
1085
- { type: 'literal', value: '를', alternatives: ['을'] },
1086
- { type: 'literal', value: '클릭' },
1087
- { type: 'literal', value: '얻다', alternatives: ['얻기', '가져오다'] },
1088
- ],
1089
- },
1090
- extraction: {
1091
- patient: { position: 0 },
1092
- event: { default: { type: 'literal', value: 'click' } },
1093
- action: { default: { type: 'literal', value: 'get' } },
1094
- },
1095
- },
1096
-
1097
- // Click + Get then: "{target} 를 클릭 얻다 그러면"
1098
- {
1099
- id: 'grammar-ko-click-get-then',
1100
- language: 'ko',
1101
- command: 'on',
1102
- priority: 85,
1103
- template: {
1104
- format: '{patient} 를 클릭 얻다 그러면',
1105
- tokens: [
1106
- { type: 'role', role: 'patient' },
1107
- { type: 'literal', value: '를', alternatives: ['을'] },
1108
- { type: 'literal', value: '클릭' },
1109
- { type: 'literal', value: '얻다', alternatives: ['얻기', '가져오다'] },
1110
- { type: 'literal', value: '그러면', alternatives: ['그다음', '그리고'] },
1111
- ],
1112
- },
1113
- extraction: {
1114
- patient: { position: 0 },
1115
- event: { default: { type: 'literal', value: 'click' } },
1116
- action: { default: { type: 'literal', value: 'get' } },
1117
- continues: { default: { type: 'literal', value: 'then' } },
1118
- },
1119
- },
1120
-
1121
- // ==========================================================================
1122
- // DEFAULT PATTERNS (load event)
1123
- // ==========================================================================
1124
-
1125
- // Load + Default: "{patient} 를 로드 기본값 {goal} 에"
1126
- {
1127
- id: 'grammar-ko-load-default',
1128
- language: 'ko',
1129
- command: 'on',
1130
- priority: 75,
1131
- template: {
1132
- format: '{patient} 를 로드 기본값 {goal} 에',
1133
- tokens: [
1134
- { type: 'role', role: 'patient' },
1135
- { type: 'literal', value: '를', alternatives: ['을'] },
1136
- { type: 'literal', value: '로드', alternatives: ['로딩'] },
1137
- { type: 'literal', value: '기본값', alternatives: ['기본', '디폴트'] },
1138
- { type: 'role', role: 'goal' },
1139
- { type: 'literal', value: '에' },
1140
- ],
1141
- },
1142
- extraction: {
1143
- patient: { position: 0 },
1144
- goal: { position: 1 },
1145
- event: { default: { type: 'literal', value: 'load' } },
1146
- action: { default: { type: 'literal', value: 'default' } },
1147
- },
1148
- },
1149
-
1150
- // ==========================================================================
1151
- // EXCHANGE/SWAP PATTERNS
1152
- // ==========================================================================
1153
-
1154
- // Click + Exchange: "{source} 를 클릭 교환 {target} 로"
1155
- {
1156
- id: 'grammar-ko-click-exchange',
1157
- language: 'ko',
1158
- command: 'on',
1159
- priority: 76,
1160
- template: {
1161
- format: '{patient} 를 클릭 교환 {destination} 로',
1162
- tokens: [
1163
- { type: 'role', role: 'patient' },
1164
- { type: 'literal', value: '를', alternatives: ['을'] },
1165
- { type: 'literal', value: '클릭' },
1166
- { type: 'literal', value: '교환', alternatives: ['교환하다', '바꾸다', '스왑'] },
1167
- { type: 'role', role: 'destination' },
1168
- { type: 'literal', value: '로', alternatives: ['으로'] },
1169
- ],
1170
- },
1171
- extraction: {
1172
- patient: { position: 0 },
1173
- destination: { position: 1 },
1174
- event: { default: { type: 'literal', value: 'click' } },
1175
- action: { default: { type: 'literal', value: 'swap' } },
1176
- },
1177
- },
1178
-
1179
- // ==========================================================================
1180
- // MAKE/CREATE PATTERNS
1181
- // ==========================================================================
1182
-
1183
- // Click + Make: "{target} 를 클릭 만들다"
1184
- {
1185
- id: 'grammar-ko-click-make',
1186
- language: 'ko',
1187
- command: 'on',
1188
- priority: 75,
1189
- template: {
1190
- format: '{patient} 를 클릭 만들다',
1191
- tokens: [
1192
- { type: 'role', role: 'patient' },
1193
- { type: 'literal', value: '를', alternatives: ['을'] },
1194
- { type: 'literal', value: '클릭' },
1195
- { type: 'literal', value: '만들다', alternatives: ['만들기', '생성'] },
1196
- ],
1197
- },
1198
- extraction: {
1199
- patient: { position: 0 },
1200
- event: { default: { type: 'literal', value: 'click' } },
1201
- action: { default: { type: 'literal', value: 'make' } },
1202
- },
1203
- },
1204
-
1205
- // Click + Make then: "{target} 를 클릭 만들다 그러면"
1206
- {
1207
- id: 'grammar-ko-click-make-then',
1208
- language: 'ko',
1209
- command: 'on',
1210
- priority: 85,
1211
- template: {
1212
- format: '{patient} 를 클릭 만들다 그러면',
1213
- tokens: [
1214
- { type: 'role', role: 'patient' },
1215
- { type: 'literal', value: '를', alternatives: ['을'] },
1216
- { type: 'literal', value: '클릭' },
1217
- { type: 'literal', value: '만들다', alternatives: ['만들기', '생성'] },
1218
- { type: 'literal', value: '그러면', alternatives: ['그다음', '그리고'] },
1219
- ],
1220
- },
1221
- extraction: {
1222
- patient: { position: 0 },
1223
- event: { default: { type: 'literal', value: 'click' } },
1224
- action: { default: { type: 'literal', value: 'make' } },
1225
- continues: { default: { type: 'literal', value: 'then' } },
1226
- },
1227
- },
1228
-
1229
- // ==========================================================================
1230
- // SUBMIT EVENT PATTERNS
1231
- // ==========================================================================
1232
-
1233
- // Submit + Fetch: "{source} 를 제출 가져오기"
1234
- {
1235
- id: 'grammar-ko-submit-fetch',
1236
- language: 'ko',
1237
- command: 'on',
1238
- priority: 75,
1239
- template: {
1240
- format: '{source} 를 제출 가져오기',
1241
- tokens: [
1242
- { type: 'role', role: 'source' },
1243
- { type: 'literal', value: '를', alternatives: ['을'] },
1244
- { type: 'literal', value: '제출' },
1245
- { type: 'literal', value: '가져오기', alternatives: ['가져오다', '패치'] },
1246
- ],
1247
- },
1248
- extraction: {
1249
- source: { position: 0 },
1250
- event: { default: { type: 'literal', value: 'submit' } },
1251
- action: { default: { type: 'literal', value: 'fetch' } },
1252
- },
1253
- },
1254
-
1255
- // ==========================================================================
1256
- // BLUR PATTERNS
1257
- // ==========================================================================
1258
-
1259
- // Keydown + Blur: "나 를 keydown[key=="Escape"] 블러"
1260
- {
1261
- id: 'grammar-ko-keydown-blur',
1262
- language: 'ko',
1263
- command: 'on',
1264
- priority: 76,
1265
- template: {
1266
- format: '{patient} 를 {event} 블러',
1267
- tokens: [
1268
- { type: 'role', role: 'patient' },
1269
- { type: 'literal', value: '를', alternatives: ['을'] },
1270
- { type: 'role', role: 'event' },
1271
- { type: 'literal', value: '블러', alternatives: ['흐리게', '포커스해제'] },
1272
- ],
1273
- },
1274
- extraction: {
1275
- patient: { position: 0 },
1276
- event: { position: 1 },
1277
- action: { default: { type: 'literal', value: 'blur' } },
1278
- },
1279
- },
1280
-
1281
- // ==========================================================================
1282
- // HIDE PATTERNS
1283
- // ==========================================================================
1284
-
1285
- // Click + Hide closest then: "가장가까운 .modal 를 클릭 숨기다 그러면"
1286
- {
1287
- id: 'grammar-ko-click-hide-closest-then',
1288
- language: 'ko',
1289
- command: 'on',
1290
- priority: 85,
1291
- template: {
1292
- format: '가장가까운 {patient} 를 클릭 숨기다 그러면',
1293
- tokens: [
1294
- { type: 'literal', value: '가장가까운', alternatives: ['가장 가까운', '제일가까운'] },
1295
- { type: 'role', role: 'patient' },
1296
- { type: 'literal', value: '를', alternatives: ['을'] },
1297
- { type: 'literal', value: '클릭' },
1298
- { type: 'literal', value: '숨기다', alternatives: ['숨기기', '감추다'] },
1299
- { type: 'literal', value: '그러면', alternatives: ['그다음', '그리고'] },
1300
- ],
1301
- },
1302
- extraction: {
1303
- patient: { position: 0 },
1304
- event: { default: { type: 'literal', value: 'click' } },
1305
- action: { default: { type: 'literal', value: 'hide' } },
1306
- modifier: { default: { type: 'literal', value: 'closest' } },
1307
- continues: { default: { type: 'literal', value: 'then' } },
1308
- },
1309
- },
1310
- ];
14
+ return [];
1311
15
  }