@lokascript/semantic 1.0.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 (435) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +686 -0
  3. package/dist/browser-ar.ar.global.js +2 -0
  4. package/dist/browser-core.core.global.js +2 -0
  5. package/dist/browser-de.de.global.js +2 -0
  6. package/dist/browser-east-asian.east-asian.global.js +2 -0
  7. package/dist/browser-en-tr.en-tr.global.js +2 -0
  8. package/dist/browser-en.en.global.js +2 -0
  9. package/dist/browser-es-en.es-en.global.js +2 -0
  10. package/dist/browser-es.es.global.js +2 -0
  11. package/dist/browser-fr.fr.global.js +2 -0
  12. package/dist/browser-id.id.global.js +2 -0
  13. package/dist/browser-ja.ja.global.js +2 -0
  14. package/dist/browser-ko.ko.global.js +2 -0
  15. package/dist/browser-lazy.lazy.global.js +2 -0
  16. package/dist/browser-priority.priority.global.js +2 -0
  17. package/dist/browser-pt.pt.global.js +2 -0
  18. package/dist/browser-qu.qu.global.js +2 -0
  19. package/dist/browser-sw.sw.global.js +2 -0
  20. package/dist/browser-tr.tr.global.js +2 -0
  21. package/dist/browser-western.western.global.js +2 -0
  22. package/dist/browser-zh.zh.global.js +2 -0
  23. package/dist/browser.global.js +3 -0
  24. package/dist/browser.global.js.map +1 -0
  25. package/dist/index.cjs +35051 -0
  26. package/dist/index.cjs.map +1 -0
  27. package/dist/index.d.cts +3426 -0
  28. package/dist/index.d.ts +3426 -0
  29. package/dist/index.js +34890 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/languages/ar.d.ts +78 -0
  32. package/dist/languages/ar.js +1622 -0
  33. package/dist/languages/ar.js.map +1 -0
  34. package/dist/languages/de.d.ts +38 -0
  35. package/dist/languages/de.js +1168 -0
  36. package/dist/languages/de.js.map +1 -0
  37. package/dist/languages/en.d.ts +44 -0
  38. package/dist/languages/en.js +3491 -0
  39. package/dist/languages/en.js.map +1 -0
  40. package/dist/languages/es.d.ts +52 -0
  41. package/dist/languages/es.js +1493 -0
  42. package/dist/languages/es.js.map +1 -0
  43. package/dist/languages/fr.d.ts +37 -0
  44. package/dist/languages/fr.js +1159 -0
  45. package/dist/languages/fr.js.map +1 -0
  46. package/dist/languages/id.d.ts +35 -0
  47. package/dist/languages/id.js +1152 -0
  48. package/dist/languages/id.js.map +1 -0
  49. package/dist/languages/ja.d.ts +53 -0
  50. package/dist/languages/ja.js +1430 -0
  51. package/dist/languages/ja.js.map +1 -0
  52. package/dist/languages/ko.d.ts +51 -0
  53. package/dist/languages/ko.js +1729 -0
  54. package/dist/languages/ko.js.map +1 -0
  55. package/dist/languages/pt.d.ts +37 -0
  56. package/dist/languages/pt.js +1127 -0
  57. package/dist/languages/pt.js.map +1 -0
  58. package/dist/languages/qu.d.ts +36 -0
  59. package/dist/languages/qu.js +1143 -0
  60. package/dist/languages/qu.js.map +1 -0
  61. package/dist/languages/sw.d.ts +35 -0
  62. package/dist/languages/sw.js +1147 -0
  63. package/dist/languages/sw.js.map +1 -0
  64. package/dist/languages/tr.d.ts +45 -0
  65. package/dist/languages/tr.js +1529 -0
  66. package/dist/languages/tr.js.map +1 -0
  67. package/dist/languages/zh.d.ts +58 -0
  68. package/dist/languages/zh.js +1257 -0
  69. package/dist/languages/zh.js.map +1 -0
  70. package/dist/types-C4dcj53L.d.ts +600 -0
  71. package/package.json +202 -0
  72. package/src/__test-utils__/index.ts +7 -0
  73. package/src/__test-utils__/test-helpers.ts +8 -0
  74. package/src/__types__/test-helpers.ts +122 -0
  75. package/src/analysis/index.ts +479 -0
  76. package/src/ast-builder/command-mappers.ts +1133 -0
  77. package/src/ast-builder/expression-parser/index.ts +41 -0
  78. package/src/ast-builder/expression-parser/parser.ts +563 -0
  79. package/src/ast-builder/expression-parser/tokenizer.ts +394 -0
  80. package/src/ast-builder/expression-parser/types.ts +208 -0
  81. package/src/ast-builder/index.ts +536 -0
  82. package/src/ast-builder/value-converters.ts +172 -0
  83. package/src/bridge.ts +275 -0
  84. package/src/browser-ar.ts +162 -0
  85. package/src/browser-core.ts +231 -0
  86. package/src/browser-de.ts +162 -0
  87. package/src/browser-east-asian.ts +173 -0
  88. package/src/browser-en-tr.ts +165 -0
  89. package/src/browser-en.ts +157 -0
  90. package/src/browser-es-en.ts +200 -0
  91. package/src/browser-es.ts +170 -0
  92. package/src/browser-fr.ts +162 -0
  93. package/src/browser-id.ts +162 -0
  94. package/src/browser-ja.ts +162 -0
  95. package/src/browser-ko.ts +162 -0
  96. package/src/browser-lazy.ts +189 -0
  97. package/src/browser-priority.ts +214 -0
  98. package/src/browser-pt.ts +162 -0
  99. package/src/browser-qu.ts +162 -0
  100. package/src/browser-sw.ts +162 -0
  101. package/src/browser-tr.ts +162 -0
  102. package/src/browser-western.ts +181 -0
  103. package/src/browser-zh.ts +162 -0
  104. package/src/browser.ts +268 -0
  105. package/src/cache/index.ts +14 -0
  106. package/src/cache/semantic-cache.ts +344 -0
  107. package/src/core-bridge.ts +372 -0
  108. package/src/explicit/converter.ts +258 -0
  109. package/src/explicit/index.ts +18 -0
  110. package/src/explicit/parser.ts +236 -0
  111. package/src/explicit/renderer.ts +424 -0
  112. package/src/generators/command-schemas.ts +1636 -0
  113. package/src/generators/event-handler-generator.ts +109 -0
  114. package/src/generators/index.ts +117 -0
  115. package/src/generators/language-profiles.ts +139 -0
  116. package/src/generators/pattern-generator.ts +537 -0
  117. package/src/generators/profiles/arabic.ts +131 -0
  118. package/src/generators/profiles/bengali.ts +132 -0
  119. package/src/generators/profiles/chinese.ts +124 -0
  120. package/src/generators/profiles/english.ts +113 -0
  121. package/src/generators/profiles/french.ts +125 -0
  122. package/src/generators/profiles/german.ts +126 -0
  123. package/src/generators/profiles/hindi.ts +146 -0
  124. package/src/generators/profiles/index.ts +46 -0
  125. package/src/generators/profiles/indonesian.ts +125 -0
  126. package/src/generators/profiles/italian.ts +139 -0
  127. package/src/generators/profiles/japanese.ts +149 -0
  128. package/src/generators/profiles/korean.ts +127 -0
  129. package/src/generators/profiles/marker-templates.ts +288 -0
  130. package/src/generators/profiles/ms.ts +130 -0
  131. package/src/generators/profiles/polish.ts +249 -0
  132. package/src/generators/profiles/portuguese.ts +115 -0
  133. package/src/generators/profiles/quechua.ts +113 -0
  134. package/src/generators/profiles/russian.ts +260 -0
  135. package/src/generators/profiles/spanish.ts +130 -0
  136. package/src/generators/profiles/swahili.ts +129 -0
  137. package/src/generators/profiles/thai.ts +132 -0
  138. package/src/generators/profiles/tl.ts +128 -0
  139. package/src/generators/profiles/turkish.ts +124 -0
  140. package/src/generators/profiles/types.ts +165 -0
  141. package/src/generators/profiles/ukrainian.ts +270 -0
  142. package/src/generators/profiles/vietnamese.ts +133 -0
  143. package/src/generators/schema-error-codes.ts +160 -0
  144. package/src/generators/schema-validator.ts +391 -0
  145. package/src/index.ts +429 -0
  146. package/src/language-building-schema.ts +3170 -0
  147. package/src/language-loader.ts +394 -0
  148. package/src/languages/_all.ts +65 -0
  149. package/src/languages/ar.ts +15 -0
  150. package/src/languages/bn.ts +16 -0
  151. package/src/languages/de.ts +15 -0
  152. package/src/languages/en.ts +29 -0
  153. package/src/languages/es.ts +15 -0
  154. package/src/languages/fr.ts +15 -0
  155. package/src/languages/hi.ts +26 -0
  156. package/src/languages/id.ts +15 -0
  157. package/src/languages/index.ts +18 -0
  158. package/src/languages/it.ts +15 -0
  159. package/src/languages/ja.ts +15 -0
  160. package/src/languages/ko.ts +15 -0
  161. package/src/languages/ms.ts +16 -0
  162. package/src/languages/pl.ts +18 -0
  163. package/src/languages/pt.ts +15 -0
  164. package/src/languages/qu.ts +15 -0
  165. package/src/languages/ru.ts +26 -0
  166. package/src/languages/sw.ts +15 -0
  167. package/src/languages/th.ts +16 -0
  168. package/src/languages/tl.ts +16 -0
  169. package/src/languages/tr.ts +15 -0
  170. package/src/languages/uk.ts +26 -0
  171. package/src/languages/vi.ts +16 -0
  172. package/src/languages/zh.ts +15 -0
  173. package/src/parser/index.ts +15 -0
  174. package/src/parser/pattern-matcher.ts +1181 -0
  175. package/src/parser/semantic-parser.ts +573 -0
  176. package/src/parser/utils/index.ts +35 -0
  177. package/src/parser/utils/marker-resolution.ts +111 -0
  178. package/src/parser/utils/possessive-keywords.ts +43 -0
  179. package/src/parser/utils/role-positioning.ts +70 -0
  180. package/src/parser/utils/type-validation.ts +134 -0
  181. package/src/patterns/add/ar.ts +71 -0
  182. package/src/patterns/add/bn.ts +70 -0
  183. package/src/patterns/add/hi.ts +69 -0
  184. package/src/patterns/add/index.ts +87 -0
  185. package/src/patterns/add/it.ts +61 -0
  186. package/src/patterns/add/ja.ts +93 -0
  187. package/src/patterns/add/ko.ts +74 -0
  188. package/src/patterns/add/ms.ts +30 -0
  189. package/src/patterns/add/pl.ts +62 -0
  190. package/src/patterns/add/ru.ts +62 -0
  191. package/src/patterns/add/th.ts +49 -0
  192. package/src/patterns/add/tl.ts +30 -0
  193. package/src/patterns/add/tr.ts +71 -0
  194. package/src/patterns/add/uk.ts +62 -0
  195. package/src/patterns/add/vi.ts +61 -0
  196. package/src/patterns/add/zh.ts +71 -0
  197. package/src/patterns/builders.ts +207 -0
  198. package/src/patterns/decrement/bn.ts +70 -0
  199. package/src/patterns/decrement/de.ts +42 -0
  200. package/src/patterns/decrement/hi.ts +68 -0
  201. package/src/patterns/decrement/index.ts +79 -0
  202. package/src/patterns/decrement/it.ts +69 -0
  203. package/src/patterns/decrement/ms.ts +30 -0
  204. package/src/patterns/decrement/pl.ts +58 -0
  205. package/src/patterns/decrement/ru.ts +58 -0
  206. package/src/patterns/decrement/th.ts +49 -0
  207. package/src/patterns/decrement/tl.ts +30 -0
  208. package/src/patterns/decrement/tr.ts +48 -0
  209. package/src/patterns/decrement/uk.ts +58 -0
  210. package/src/patterns/decrement/vi.ts +61 -0
  211. package/src/patterns/decrement/zh.ts +32 -0
  212. package/src/patterns/en.ts +302 -0
  213. package/src/patterns/event-handler/ar.ts +151 -0
  214. package/src/patterns/event-handler/bn.ts +72 -0
  215. package/src/patterns/event-handler/de.ts +117 -0
  216. package/src/patterns/event-handler/en.ts +117 -0
  217. package/src/patterns/event-handler/es.ts +136 -0
  218. package/src/patterns/event-handler/fr.ts +117 -0
  219. package/src/patterns/event-handler/hi.ts +64 -0
  220. package/src/patterns/event-handler/id.ts +117 -0
  221. package/src/patterns/event-handler/index.ts +119 -0
  222. package/src/patterns/event-handler/it.ts +54 -0
  223. package/src/patterns/event-handler/ja.ts +118 -0
  224. package/src/patterns/event-handler/ko.ts +133 -0
  225. package/src/patterns/event-handler/ms.ts +30 -0
  226. package/src/patterns/event-handler/pl.ts +62 -0
  227. package/src/patterns/event-handler/pt.ts +117 -0
  228. package/src/patterns/event-handler/qu.ts +66 -0
  229. package/src/patterns/event-handler/ru.ts +62 -0
  230. package/src/patterns/event-handler/shared.ts +270 -0
  231. package/src/patterns/event-handler/sw.ts +117 -0
  232. package/src/patterns/event-handler/th.ts +53 -0
  233. package/src/patterns/event-handler/tl.ts +30 -0
  234. package/src/patterns/event-handler/tr.ts +170 -0
  235. package/src/patterns/event-handler/uk.ts +62 -0
  236. package/src/patterns/event-handler/vi.ts +61 -0
  237. package/src/patterns/event-handler/zh.ts +150 -0
  238. package/src/patterns/get/ar.ts +49 -0
  239. package/src/patterns/get/bn.ts +47 -0
  240. package/src/patterns/get/de.ts +32 -0
  241. package/src/patterns/get/hi.ts +52 -0
  242. package/src/patterns/get/index.ts +83 -0
  243. package/src/patterns/get/it.ts +56 -0
  244. package/src/patterns/get/ja.ts +53 -0
  245. package/src/patterns/get/ko.ts +53 -0
  246. package/src/patterns/get/ms.ts +30 -0
  247. package/src/patterns/get/pl.ts +57 -0
  248. package/src/patterns/get/ru.ts +57 -0
  249. package/src/patterns/get/th.ts +29 -0
  250. package/src/patterns/get/tl.ts +30 -0
  251. package/src/patterns/get/uk.ts +57 -0
  252. package/src/patterns/get/vi.ts +48 -0
  253. package/src/patterns/grammar-transformed/index.ts +39 -0
  254. package/src/patterns/grammar-transformed/ja.ts +1713 -0
  255. package/src/patterns/grammar-transformed/ko.ts +1311 -0
  256. package/src/patterns/grammar-transformed/tr.ts +1067 -0
  257. package/src/patterns/hide/ar.ts +67 -0
  258. package/src/patterns/hide/bn.ts +47 -0
  259. package/src/patterns/hide/de.ts +36 -0
  260. package/src/patterns/hide/hi.ts +61 -0
  261. package/src/patterns/hide/index.ts +91 -0
  262. package/src/patterns/hide/it.ts +56 -0
  263. package/src/patterns/hide/ja.ts +69 -0
  264. package/src/patterns/hide/ko.ts +69 -0
  265. package/src/patterns/hide/ms.ts +30 -0
  266. package/src/patterns/hide/pl.ts +57 -0
  267. package/src/patterns/hide/ru.ts +57 -0
  268. package/src/patterns/hide/th.ts +29 -0
  269. package/src/patterns/hide/tl.ts +30 -0
  270. package/src/patterns/hide/tr.ts +65 -0
  271. package/src/patterns/hide/uk.ts +57 -0
  272. package/src/patterns/hide/vi.ts +56 -0
  273. package/src/patterns/hide/zh.ts +68 -0
  274. package/src/patterns/increment/bn.ts +70 -0
  275. package/src/patterns/increment/de.ts +36 -0
  276. package/src/patterns/increment/hi.ts +68 -0
  277. package/src/patterns/increment/index.ts +79 -0
  278. package/src/patterns/increment/it.ts +69 -0
  279. package/src/patterns/increment/ms.ts +30 -0
  280. package/src/patterns/increment/pl.ts +58 -0
  281. package/src/patterns/increment/ru.ts +58 -0
  282. package/src/patterns/increment/th.ts +49 -0
  283. package/src/patterns/increment/tl.ts +30 -0
  284. package/src/patterns/increment/tr.ts +52 -0
  285. package/src/patterns/increment/uk.ts +58 -0
  286. package/src/patterns/increment/vi.ts +61 -0
  287. package/src/patterns/increment/zh.ts +32 -0
  288. package/src/patterns/index.ts +84 -0
  289. package/src/patterns/languages/en/control-flow.ts +93 -0
  290. package/src/patterns/languages/en/fetch.ts +62 -0
  291. package/src/patterns/languages/en/index.ts +42 -0
  292. package/src/patterns/languages/en/repeat.ts +67 -0
  293. package/src/patterns/languages/en/set.ts +48 -0
  294. package/src/patterns/languages/en/swap.ts +38 -0
  295. package/src/patterns/languages/en/temporal.ts +57 -0
  296. package/src/patterns/put/ar.ts +74 -0
  297. package/src/patterns/put/bn.ts +53 -0
  298. package/src/patterns/put/en.ts +74 -0
  299. package/src/patterns/put/es.ts +74 -0
  300. package/src/patterns/put/hi.ts +69 -0
  301. package/src/patterns/put/id.ts +96 -0
  302. package/src/patterns/put/index.ts +99 -0
  303. package/src/patterns/put/it.ts +56 -0
  304. package/src/patterns/put/ja.ts +75 -0
  305. package/src/patterns/put/ko.ts +67 -0
  306. package/src/patterns/put/ms.ts +30 -0
  307. package/src/patterns/put/pl.ts +81 -0
  308. package/src/patterns/put/ru.ts +85 -0
  309. package/src/patterns/put/th.ts +32 -0
  310. package/src/patterns/put/tl.ts +30 -0
  311. package/src/patterns/put/tr.ts +67 -0
  312. package/src/patterns/put/uk.ts +85 -0
  313. package/src/patterns/put/vi.ts +72 -0
  314. package/src/patterns/put/zh.ts +62 -0
  315. package/src/patterns/registry.ts +163 -0
  316. package/src/patterns/remove/ar.ts +71 -0
  317. package/src/patterns/remove/bn.ts +68 -0
  318. package/src/patterns/remove/hi.ts +69 -0
  319. package/src/patterns/remove/index.ts +87 -0
  320. package/src/patterns/remove/it.ts +69 -0
  321. package/src/patterns/remove/ja.ts +74 -0
  322. package/src/patterns/remove/ko.ts +78 -0
  323. package/src/patterns/remove/ms.ts +30 -0
  324. package/src/patterns/remove/pl.ts +62 -0
  325. package/src/patterns/remove/ru.ts +62 -0
  326. package/src/patterns/remove/th.ts +49 -0
  327. package/src/patterns/remove/tl.ts +30 -0
  328. package/src/patterns/remove/tr.ts +78 -0
  329. package/src/patterns/remove/uk.ts +62 -0
  330. package/src/patterns/remove/vi.ts +61 -0
  331. package/src/patterns/remove/zh.ts +72 -0
  332. package/src/patterns/set/ar.ts +84 -0
  333. package/src/patterns/set/bn.ts +53 -0
  334. package/src/patterns/set/de.ts +84 -0
  335. package/src/patterns/set/es.ts +92 -0
  336. package/src/patterns/set/fr.ts +88 -0
  337. package/src/patterns/set/hi.ts +56 -0
  338. package/src/patterns/set/id.ts +84 -0
  339. package/src/patterns/set/index.ts +107 -0
  340. package/src/patterns/set/it.ts +56 -0
  341. package/src/patterns/set/ja.ts +86 -0
  342. package/src/patterns/set/ko.ts +85 -0
  343. package/src/patterns/set/ms.ts +30 -0
  344. package/src/patterns/set/pl.ts +57 -0
  345. package/src/patterns/set/pt.ts +84 -0
  346. package/src/patterns/set/ru.ts +57 -0
  347. package/src/patterns/set/th.ts +31 -0
  348. package/src/patterns/set/tl.ts +30 -0
  349. package/src/patterns/set/tr.ts +107 -0
  350. package/src/patterns/set/uk.ts +57 -0
  351. package/src/patterns/set/vi.ts +53 -0
  352. package/src/patterns/set/zh.ts +84 -0
  353. package/src/patterns/show/ar.ts +67 -0
  354. package/src/patterns/show/bn.ts +47 -0
  355. package/src/patterns/show/de.ts +32 -0
  356. package/src/patterns/show/fr.ts +32 -0
  357. package/src/patterns/show/hi.ts +61 -0
  358. package/src/patterns/show/index.ts +95 -0
  359. package/src/patterns/show/it.ts +56 -0
  360. package/src/patterns/show/ja.ts +69 -0
  361. package/src/patterns/show/ko.ts +73 -0
  362. package/src/patterns/show/ms.ts +30 -0
  363. package/src/patterns/show/pl.ts +57 -0
  364. package/src/patterns/show/ru.ts +57 -0
  365. package/src/patterns/show/th.ts +29 -0
  366. package/src/patterns/show/tl.ts +30 -0
  367. package/src/patterns/show/tr.ts +65 -0
  368. package/src/patterns/show/uk.ts +57 -0
  369. package/src/patterns/show/vi.ts +56 -0
  370. package/src/patterns/show/zh.ts +68 -0
  371. package/src/patterns/take/ar.ts +51 -0
  372. package/src/patterns/take/index.ts +31 -0
  373. package/src/patterns/toggle/ar.ts +61 -0
  374. package/src/patterns/toggle/bn.ts +70 -0
  375. package/src/patterns/toggle/en.ts +61 -0
  376. package/src/patterns/toggle/es.ts +61 -0
  377. package/src/patterns/toggle/hi.ts +80 -0
  378. package/src/patterns/toggle/index.ts +95 -0
  379. package/src/patterns/toggle/it.ts +69 -0
  380. package/src/patterns/toggle/ja.ts +156 -0
  381. package/src/patterns/toggle/ko.ts +113 -0
  382. package/src/patterns/toggle/ms.ts +30 -0
  383. package/src/patterns/toggle/pl.ts +62 -0
  384. package/src/patterns/toggle/ru.ts +62 -0
  385. package/src/patterns/toggle/th.ts +50 -0
  386. package/src/patterns/toggle/tl.ts +30 -0
  387. package/src/patterns/toggle/tr.ts +88 -0
  388. package/src/patterns/toggle/uk.ts +62 -0
  389. package/src/patterns/toggle/vi.ts +61 -0
  390. package/src/patterns/toggle/zh.ts +99 -0
  391. package/src/public-api.ts +286 -0
  392. package/src/registry.ts +441 -0
  393. package/src/tokenizers/arabic.ts +723 -0
  394. package/src/tokenizers/base.ts +1300 -0
  395. package/src/tokenizers/bengali.ts +289 -0
  396. package/src/tokenizers/chinese.ts +481 -0
  397. package/src/tokenizers/english.ts +416 -0
  398. package/src/tokenizers/french.ts +326 -0
  399. package/src/tokenizers/german.ts +324 -0
  400. package/src/tokenizers/hindi.ts +319 -0
  401. package/src/tokenizers/index.ts +127 -0
  402. package/src/tokenizers/indonesian.ts +306 -0
  403. package/src/tokenizers/italian.ts +458 -0
  404. package/src/tokenizers/japanese.ts +447 -0
  405. package/src/tokenizers/korean.ts +642 -0
  406. package/src/tokenizers/morphology/arabic-normalizer.ts +242 -0
  407. package/src/tokenizers/morphology/french-normalizer.ts +268 -0
  408. package/src/tokenizers/morphology/german-normalizer.ts +256 -0
  409. package/src/tokenizers/morphology/index.ts +46 -0
  410. package/src/tokenizers/morphology/italian-normalizer.ts +329 -0
  411. package/src/tokenizers/morphology/japanese-normalizer.ts +288 -0
  412. package/src/tokenizers/morphology/korean-normalizer.ts +428 -0
  413. package/src/tokenizers/morphology/polish-normalizer.ts +264 -0
  414. package/src/tokenizers/morphology/portuguese-normalizer.ts +310 -0
  415. package/src/tokenizers/morphology/spanish-normalizer.ts +327 -0
  416. package/src/tokenizers/morphology/turkish-normalizer.ts +412 -0
  417. package/src/tokenizers/morphology/types.ts +211 -0
  418. package/src/tokenizers/ms.ts +198 -0
  419. package/src/tokenizers/polish.ts +354 -0
  420. package/src/tokenizers/portuguese.ts +304 -0
  421. package/src/tokenizers/quechua.ts +339 -0
  422. package/src/tokenizers/russian.ts +375 -0
  423. package/src/tokenizers/spanish.ts +403 -0
  424. package/src/tokenizers/swahili.ts +303 -0
  425. package/src/tokenizers/thai.ts +236 -0
  426. package/src/tokenizers/tl.ts +198 -0
  427. package/src/tokenizers/turkish.ts +411 -0
  428. package/src/tokenizers/ukrainian.ts +369 -0
  429. package/src/tokenizers/vietnamese.ts +410 -0
  430. package/src/types/grammar-types.ts +617 -0
  431. package/src/types/unified-profile.ts +267 -0
  432. package/src/types.ts +709 -0
  433. package/src/utils/confidence-calculator.ts +147 -0
  434. package/src/validators/command-validator.ts +380 -0
  435. package/src/validators/index.ts +15 -0
@@ -0,0 +1,1311 @@
1
+ /**
2
+ * Korean Grammar-Transformed Patterns
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.
12
+ */
13
+
14
+ import type { LanguagePattern } from '../../types';
15
+
16
+ /**
17
+ * Get Korean grammar-transformed patterns.
18
+ */
19
+ 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
+ ];
1311
+ }