@lokascript/semantic 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ar.ar.global.js +2 -2
- package/dist/browser-core.core.global.js +2 -2
- package/dist/browser-de.de.global.js +2 -2
- package/dist/browser-east-asian.east-asian.global.js +2 -2
- package/dist/browser-en-tr.en-tr.global.js +2 -2
- package/dist/browser-en.en.global.js +2 -2
- package/dist/browser-es-en.es-en.global.js +2 -2
- package/dist/browser-es.es.global.js +2 -2
- package/dist/browser-fr.fr.global.js +2 -2
- package/dist/browser-id.id.global.js +2 -2
- package/dist/browser-ja.ja.global.js +2 -2
- package/dist/browser-ko.ko.global.js +2 -2
- package/dist/browser-lazy.lazy.global.js +2 -2
- package/dist/browser-priority.priority.global.js +2 -2
- package/dist/browser-pt.pt.global.js +2 -2
- package/dist/browser-qu.qu.global.js +2 -2
- package/dist/browser-sw.sw.global.js +2 -2
- package/dist/browser-tr.tr.global.js +2 -2
- package/dist/browser-western.western.global.js +2 -2
- package/dist/browser-zh.zh.global.js +2 -2
- package/dist/browser.global.js +2 -2
- package/dist/browser.global.js.map +1 -1
- package/dist/index.cjs +13042 -17462
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -5
- package/dist/index.d.ts +49 -5
- package/dist/index.js +14044 -18464
- package/dist/index.js.map +1 -1
- package/dist/languages/ar.d.ts +1 -1
- package/dist/languages/ar.js +31 -44
- package/dist/languages/ar.js.map +1 -1
- package/dist/languages/de.d.ts +1 -1
- package/dist/languages/de.js +14 -2
- package/dist/languages/de.js.map +1 -1
- package/dist/languages/en.d.ts +1 -1
- package/dist/languages/en.js +558 -12
- package/dist/languages/en.js.map +1 -1
- package/dist/languages/es.d.ts +1 -1
- package/dist/languages/es.js +16 -0
- package/dist/languages/es.js.map +1 -1
- package/dist/languages/fr.d.ts +1 -1
- package/dist/languages/fr.js +14 -2
- package/dist/languages/fr.js.map +1 -1
- package/dist/languages/id.d.ts +1 -1
- package/dist/languages/id.js +14 -2
- package/dist/languages/id.js.map +1 -1
- package/dist/languages/ja.d.ts +1 -1
- package/dist/languages/ja.js +18 -3
- package/dist/languages/ja.js.map +1 -1
- package/dist/languages/ko.d.ts +8 -1
- package/dist/languages/ko.js +75 -43
- package/dist/languages/ko.js.map +1 -1
- package/dist/languages/pt.d.ts +1 -1
- package/dist/languages/pt.js +17 -0
- package/dist/languages/pt.js.map +1 -1
- package/dist/languages/qu.d.ts +12 -1
- package/dist/languages/qu.js +77 -2
- package/dist/languages/qu.js.map +1 -1
- package/dist/languages/sw.d.ts +1 -1
- package/dist/languages/sw.js.map +1 -1
- package/dist/languages/tr.d.ts +9 -1
- package/dist/languages/tr.js +96 -72
- package/dist/languages/tr.js.map +1 -1
- package/dist/languages/zh.d.ts +1 -1
- package/dist/languages/zh.js +16 -0
- package/dist/languages/zh.js.map +1 -1
- package/dist/{types-C4dcj53L.d.ts → types-BY3Id07j.d.ts} +20 -5
- package/package.json +20 -29
- package/src/generators/command-schemas.ts +21 -10
- package/src/generators/event-handler-generator.ts +50 -44
- package/src/generators/language-profiles.ts +6 -0
- package/src/generators/pattern-generator.ts +883 -1
- package/src/generators/profiles/arabic.ts +19 -3
- package/src/generators/profiles/bengali.ts +12 -1
- package/src/generators/profiles/chinese.ts +15 -0
- package/src/generators/profiles/french.ts +12 -1
- package/src/generators/profiles/german.ts +12 -1
- package/src/generators/profiles/hebrew.ts +148 -0
- package/src/generators/profiles/hindi.ts +12 -1
- package/src/generators/profiles/index.ts +2 -0
- package/src/generators/profiles/indonesian.ts +12 -1
- package/src/generators/profiles/italian.ts +16 -0
- package/src/generators/profiles/japanese.ts +11 -2
- package/src/generators/profiles/korean.ts +15 -1
- package/src/generators/profiles/polish.ts +12 -0
- package/src/generators/profiles/portuguese.ts +16 -0
- package/src/generators/profiles/russian.ts +11 -0
- package/src/generators/profiles/spanish.ts +15 -0
- package/src/generators/profiles/spanishMexico.ts +176 -0
- package/src/generators/profiles/thai.ts +11 -0
- package/src/generators/profiles/turkish.ts +49 -7
- package/src/generators/profiles/types.ts +21 -5
- package/src/generators/profiles/ukrainian.ts +11 -0
- package/src/generators/profiles/vietnamese.ts +11 -0
- package/src/language-building-schema.ts +111 -0
- package/src/languages/_all.ts +5 -1
- package/src/languages/es-MX.ts +32 -0
- package/src/languages/he.ts +15 -0
- package/src/parser/pattern-matcher.ts +10 -1
- package/src/parser/semantic-parser.ts +3 -0
- package/src/patterns/add/ar.ts +3 -59
- package/src/patterns/add/index.ts +5 -1
- package/src/patterns/add/ja.ts +3 -81
- package/src/patterns/add/ko.ts +3 -62
- package/src/patterns/add/qu.ts +69 -0
- package/src/patterns/add/tr.ts +3 -59
- package/src/patterns/builders.ts +1 -0
- package/src/patterns/decrement/tr.ts +3 -36
- package/src/patterns/event-handler/ar.ts +3 -139
- package/src/patterns/event-handler/he.ts +15 -0
- package/src/patterns/event-handler/index.ts +5 -1
- package/src/patterns/event-handler/ja.ts +3 -106
- package/src/patterns/event-handler/ko.ts +3 -121
- package/src/patterns/event-handler/ms.ts +45 -20
- package/src/patterns/event-handler/tr.ts +3 -158
- package/src/patterns/get/ar.ts +3 -37
- package/src/patterns/get/ja.ts +3 -41
- package/src/patterns/get/ko.ts +3 -41
- package/src/patterns/grammar-transformed/ja.ts +3 -1701
- package/src/patterns/grammar-transformed/ko.ts +3 -1299
- package/src/patterns/grammar-transformed/tr.ts +3 -1055
- package/src/patterns/hide/ar.ts +3 -55
- package/src/patterns/hide/ja.ts +3 -57
- package/src/patterns/hide/ko.ts +3 -57
- package/src/patterns/hide/tr.ts +3 -53
- package/src/patterns/increment/tr.ts +3 -40
- package/src/patterns/put/ar.ts +3 -62
- package/src/patterns/put/ja.ts +3 -63
- package/src/patterns/put/ko.ts +3 -55
- package/src/patterns/put/tr.ts +3 -55
- package/src/patterns/remove/ar.ts +3 -59
- package/src/patterns/remove/index.ts +5 -1
- package/src/patterns/remove/ja.ts +3 -62
- package/src/patterns/remove/ko.ts +3 -66
- package/src/patterns/remove/qu.ts +69 -0
- package/src/patterns/remove/tr.ts +3 -66
- package/src/patterns/set/ar.ts +3 -72
- package/src/patterns/set/ja.ts +3 -74
- package/src/patterns/set/ko.ts +3 -73
- package/src/patterns/set/tr.ts +3 -95
- package/src/patterns/show/ar.ts +3 -55
- package/src/patterns/show/ja.ts +3 -57
- package/src/patterns/show/ko.ts +3 -61
- package/src/patterns/show/tr.ts +3 -53
- package/src/patterns/take/ar.ts +3 -39
- package/src/patterns/toggle/ar.ts +3 -49
- package/src/patterns/toggle/index.ts +5 -1
- package/src/patterns/toggle/ja.ts +3 -144
- package/src/patterns/toggle/ko.ts +3 -101
- package/src/patterns/toggle/qu.ts +90 -0
- package/src/patterns/toggle/tr.ts +3 -76
- package/src/registry.ts +179 -15
- package/src/tokenizers/arabic.ts +13 -46
- package/src/tokenizers/bengali.ts +2 -16
- package/src/tokenizers/he.ts +542 -0
- package/src/tokenizers/index.ts +1 -0
- package/src/tokenizers/japanese.ts +3 -1
- package/src/tokenizers/korean.ts +104 -48
- package/src/tokenizers/ms.ts +3 -0
- package/src/tokenizers/quechua.ts +101 -2
- package/src/tokenizers/turkish.ts +64 -69
- package/src/types.ts +13 -0
|
@@ -63,20 +63,20 @@ export const arabicProfile: LanguageProfile = {
|
|
|
63
63
|
put: { primary: 'ضع', alternatives: ['اجعل'], normalized: 'put' },
|
|
64
64
|
append: { primary: 'ألحق', normalized: 'append' },
|
|
65
65
|
prepend: { primary: 'سبق', normalized: 'prepend' },
|
|
66
|
-
take: { primary: 'خذ',
|
|
66
|
+
take: { primary: 'خذ', normalized: 'take' }, // Removed احصل to avoid collision with get
|
|
67
67
|
make: { primary: 'اصنع', alternatives: ['أنشئ'], normalized: 'make' },
|
|
68
68
|
clone: { primary: 'استنسخ', alternatives: ['انسخ'], normalized: 'clone' },
|
|
69
69
|
swap: { primary: 'استبدل', alternatives: ['تبادل'], normalized: 'swap' },
|
|
70
70
|
morph: { primary: 'حوّل', alternatives: ['غيّر'], normalized: 'morph' },
|
|
71
71
|
// Variable operations
|
|
72
72
|
set: { primary: 'اضبط', alternatives: ['عيّن', 'حدد'], normalized: 'set' },
|
|
73
|
-
get: { primary: 'احصل',
|
|
73
|
+
get: { primary: 'احصل', normalized: 'get' }, // Removed خذ to avoid collision with take
|
|
74
74
|
increment: { primary: 'زِد', alternatives: ['زد', 'ارفع'], normalized: 'increment' },
|
|
75
75
|
decrement: { primary: 'أنقص', alternatives: ['انقص', 'قلل'], normalized: 'decrement' },
|
|
76
76
|
log: { primary: 'سجل', normalized: 'log' },
|
|
77
77
|
// Visibility
|
|
78
78
|
show: { primary: 'اظهر', alternatives: ['أظهر', 'اعرض'], normalized: 'show' },
|
|
79
|
-
hide: { primary: 'اخف', alternatives: ['أخفِ', 'اخفي'], normalized: 'hide' },
|
|
79
|
+
hide: { primary: 'اخف', alternatives: ['أخفِ', 'اخفي', 'أخف'], normalized: 'hide' }, // Added hamza variant
|
|
80
80
|
transition: { primary: 'انتقال', alternatives: ['انتقل'], normalized: 'transition' },
|
|
81
81
|
// Events
|
|
82
82
|
on: { primary: 'على', alternatives: ['عند', 'لدى', 'حين'], normalized: 'on' },
|
|
@@ -128,4 +128,20 @@ export const arabicProfile: LanguageProfile = {
|
|
|
128
128
|
tokenization: {
|
|
129
129
|
prefixes: ['ال', 'و', 'ف', 'ب', 'ك', 'ل'],
|
|
130
130
|
},
|
|
131
|
+
eventHandler: {
|
|
132
|
+
// Event marker: عند (at/upon), used in VSO pattern
|
|
133
|
+
// Pattern: عند [event] [action] [patient] [على destination]
|
|
134
|
+
// Example: عند النقر بدّل .active على #button
|
|
135
|
+
// Includes temporal conjunctions (عندما = formal "when", حين = neutral, لمّا = dialectal)
|
|
136
|
+
eventMarker: {
|
|
137
|
+
primary: 'عند',
|
|
138
|
+
alternatives: ['في', 'لدى', 'عندما', 'حين', 'حينما', 'لمّا', 'لما'],
|
|
139
|
+
position: 'before',
|
|
140
|
+
},
|
|
141
|
+
temporalMarkers: ['عندما', 'حين', 'لمّا'], // kept for reference/documentation
|
|
142
|
+
// Negation marker: عدم (not/lack of), used for negated events
|
|
143
|
+
// Pattern: عند عدم [event] [action] [patient]
|
|
144
|
+
// Example: عند عدم التركيز أخف #tooltip = "on blur hide #tooltip"
|
|
145
|
+
negationMarker: { primary: 'عدم', alternatives: ['عدم'], position: 'before' },
|
|
146
|
+
},
|
|
131
147
|
};
|
|
@@ -81,7 +81,13 @@ export const bengaliProfile: LanguageProfile = {
|
|
|
81
81
|
send: { primary: 'পাঠান', alternatives: ['পাঠাও'], normalized: 'send' },
|
|
82
82
|
// DOM focus
|
|
83
83
|
focus: { primary: 'ফোকাস', alternatives: ['মনোযোগ'], normalized: 'focus' },
|
|
84
|
-
blur: { primary: 'ঝাপসা', alternatives: [], normalized: 'blur' },
|
|
84
|
+
blur: { primary: 'ঝাপসা', alternatives: ['ফোকাস_সরান'], normalized: 'blur' },
|
|
85
|
+
// Common event names (for event handler patterns)
|
|
86
|
+
click: { primary: 'ক্লিক', normalized: 'click' },
|
|
87
|
+
hover: { primary: 'হোভার', alternatives: ['উপরে_রাখুন'], normalized: 'hover' },
|
|
88
|
+
submit: { primary: 'সাবমিট', alternatives: ['জমা'], normalized: 'submit' },
|
|
89
|
+
input: { primary: 'ইনপুট', alternatives: ['প্রবেশ'], normalized: 'input' },
|
|
90
|
+
change: { primary: 'পরিবর্তন', normalized: 'change' },
|
|
85
91
|
// Navigation
|
|
86
92
|
go: { primary: 'যান', alternatives: ['যাও'], normalized: 'go' },
|
|
87
93
|
// Async
|
|
@@ -128,5 +134,10 @@ export const bengaliProfile: LanguageProfile = {
|
|
|
128
134
|
eventHandler: {
|
|
129
135
|
keyword: { primary: 'তে', alternatives: ['এ', 'যখন'], normalized: 'on' },
|
|
130
136
|
sourceMarker: { primary: 'থেকে', position: 'after' },
|
|
137
|
+
// Event marker: তে (at/on), used in SOV pattern
|
|
138
|
+
// Pattern: [event] তে [destination র?] [patient] কে [action]
|
|
139
|
+
// Example: ক্লিক তে #button র .active কে টগল
|
|
140
|
+
eventMarker: { primary: 'তে', alternatives: ['এ'], position: 'after' },
|
|
141
|
+
temporalMarkers: ['যখন', 'যখনই'], // temporal conjunctions (when, whenever)
|
|
131
142
|
},
|
|
132
143
|
};
|
|
@@ -78,6 +78,12 @@ export const chineseProfile: LanguageProfile = {
|
|
|
78
78
|
// DOM focus
|
|
79
79
|
focus: { primary: '聚焦', normalized: 'focus' },
|
|
80
80
|
blur: { primary: '失焦', normalized: 'blur' },
|
|
81
|
+
// Common event names (for event handler patterns)
|
|
82
|
+
click: { primary: '点击', normalized: 'click' },
|
|
83
|
+
hover: { primary: '悬停', alternatives: ['悬浮'], normalized: 'hover' },
|
|
84
|
+
submit: { primary: '提交', normalized: 'submit' },
|
|
85
|
+
input: { primary: '输入', normalized: 'input' },
|
|
86
|
+
change: { primary: '改变', alternatives: ['变化'], normalized: 'change' },
|
|
81
87
|
// Navigation
|
|
82
88
|
go: { primary: '前往', normalized: 'go' },
|
|
83
89
|
// Async
|
|
@@ -121,4 +127,13 @@ export const chineseProfile: LanguageProfile = {
|
|
|
121
127
|
tokenization: {
|
|
122
128
|
boundaryStrategy: 'character',
|
|
123
129
|
},
|
|
130
|
+
eventHandler: {
|
|
131
|
+
keyword: { primary: '当', alternatives: ['在...时'], normalized: 'on' },
|
|
132
|
+
sourceMarker: { primary: '从', position: 'before' },
|
|
133
|
+
// Event marker: 当 (when), used in SVO pattern
|
|
134
|
+
// Pattern: 当 [event] [verb] [patient] 在 [destination?]
|
|
135
|
+
// Example: 当 点击 切换 .active 在 #button
|
|
136
|
+
eventMarker: { primary: '当', alternatives: ['在'], position: 'before' },
|
|
137
|
+
temporalMarkers: ['当', '在...时'], // temporal conjunctions (when)
|
|
138
|
+
},
|
|
124
139
|
};
|
|
@@ -112,14 +112,25 @@ export const frenchProfile: LanguageProfile = {
|
|
|
112
112
|
into: { primary: 'dans', normalized: 'into' },
|
|
113
113
|
before: { primary: 'avant', normalized: 'before' },
|
|
114
114
|
after: { primary: 'après', normalized: 'after' },
|
|
115
|
+
// Common event names (for event handler patterns)
|
|
116
|
+
click: { primary: 'clic', alternatives: ['clique'], normalized: 'click' },
|
|
117
|
+
hover: { primary: 'survol', alternatives: ['survoler'], normalized: 'hover' },
|
|
118
|
+
submit: { primary: 'soumission', alternatives: ['soumettre'], normalized: 'submit' },
|
|
119
|
+
input: { primary: 'saisie', alternatives: ['entrée'], normalized: 'input' },
|
|
120
|
+
change: { primary: 'changement', alternatives: ['modifier'], normalized: 'change' },
|
|
115
121
|
// Event modifiers (for repeat until event)
|
|
116
122
|
until: { primary: "jusqu'à", alternatives: ['jusque'], normalized: 'until' },
|
|
117
123
|
event: { primary: 'événement', normalized: 'event' },
|
|
118
124
|
from: { primary: 'de', alternatives: ['depuis'], normalized: 'from' },
|
|
119
125
|
},
|
|
120
126
|
eventHandler: {
|
|
121
|
-
keyword: { primary: 'sur', alternatives: ['lors'] },
|
|
127
|
+
keyword: { primary: 'sur', alternatives: ['lors'], normalized: 'on' },
|
|
122
128
|
sourceMarker: { primary: 'de', alternatives: ['depuis'], position: 'before' },
|
|
123
129
|
conditionalKeyword: { primary: 'quand', alternatives: ['lorsque'] },
|
|
130
|
+
// Event marker: au (at/upon), used in SVO pattern
|
|
131
|
+
// Pattern: au [event] [verb] [patient] sur [destination?]
|
|
132
|
+
// Example: au clic basculer .active sur #button
|
|
133
|
+
eventMarker: { primary: 'au', alternatives: ['lors du', 'lors de'], position: 'before' },
|
|
134
|
+
temporalMarkers: ['quand', 'lorsque'], // temporal conjunctions (when)
|
|
124
135
|
},
|
|
125
136
|
};
|
|
@@ -113,14 +113,25 @@ export const germanProfile: LanguageProfile = {
|
|
|
113
113
|
into: { primary: 'hinein', normalized: 'into' },
|
|
114
114
|
before: { primary: 'vor', normalized: 'before' },
|
|
115
115
|
after: { primary: 'nach', normalized: 'after' },
|
|
116
|
+
// Common event names (for event handler patterns)
|
|
117
|
+
click: { primary: 'Klick', alternatives: ['Klicken'], normalized: 'click' },
|
|
118
|
+
hover: { primary: 'Hover', alternatives: ['Schweben'], normalized: 'hover' },
|
|
119
|
+
submit: { primary: 'Absenden', alternatives: ['Senden'], normalized: 'submit' },
|
|
120
|
+
input: { primary: 'Eingabe', normalized: 'input' },
|
|
121
|
+
change: { primary: 'Änderung', alternatives: ['Ändern'], normalized: 'change' },
|
|
116
122
|
// Event modifiers (for repeat until event)
|
|
117
123
|
until: { primary: 'bis', normalized: 'until' },
|
|
118
124
|
event: { primary: 'Ereignis', alternatives: ['Event'], normalized: 'event' },
|
|
119
125
|
from: { primary: 'von', alternatives: ['aus'], normalized: 'from' },
|
|
120
126
|
},
|
|
121
127
|
eventHandler: {
|
|
122
|
-
keyword: { primary: 'bei', alternatives: ['auf'] },
|
|
128
|
+
keyword: { primary: 'bei', alternatives: ['auf'], normalized: 'on' },
|
|
123
129
|
sourceMarker: { primary: 'von', alternatives: ['aus'], position: 'before' },
|
|
124
130
|
conditionalKeyword: { primary: 'wenn', alternatives: ['falls'] },
|
|
131
|
+
// Event marker: bei (at/on), used in SVO pattern
|
|
132
|
+
// Pattern: bei [event] [verb] [patient] auf [destination?]
|
|
133
|
+
// Example: bei Klick umschalten .active auf #button
|
|
134
|
+
eventMarker: { primary: 'bei', alternatives: ['beim'], position: 'before' },
|
|
135
|
+
temporalMarkers: ['wenn', 'bei'], // temporal conjunctions (when, at)
|
|
125
136
|
},
|
|
126
137
|
};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hebrew Language Profile
|
|
3
|
+
*
|
|
4
|
+
* SVO word order, prepositions, RTL (right-to-left), space-separated.
|
|
5
|
+
* Hebrew uses prefix prepositions (ב, ל, מ, כ) that attach to the following word.
|
|
6
|
+
* Features optional vowel points (nikkud) which are typically omitted in modern text.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { LanguageProfile } from './types';
|
|
10
|
+
|
|
11
|
+
export const hebrewProfile: LanguageProfile = {
|
|
12
|
+
code: 'he',
|
|
13
|
+
name: 'Hebrew',
|
|
14
|
+
nativeName: 'עברית',
|
|
15
|
+
direction: 'rtl',
|
|
16
|
+
wordOrder: 'SVO',
|
|
17
|
+
markingStrategy: 'preposition',
|
|
18
|
+
usesSpaces: true,
|
|
19
|
+
verb: {
|
|
20
|
+
position: 'second', // SVO - verb comes after subject
|
|
21
|
+
subjectDrop: true,
|
|
22
|
+
},
|
|
23
|
+
references: {
|
|
24
|
+
me: 'אני', // "I/me"
|
|
25
|
+
it: 'זה', // "it" (masculine) / "this"
|
|
26
|
+
you: 'אתה', // "you" (masculine singular)
|
|
27
|
+
result: 'תוצאה',
|
|
28
|
+
event: 'אירוע',
|
|
29
|
+
target: 'יעד',
|
|
30
|
+
body: 'גוף',
|
|
31
|
+
},
|
|
32
|
+
possessive: {
|
|
33
|
+
marker: 'של', // "of" - used for general possession
|
|
34
|
+
markerPosition: 'before-property',
|
|
35
|
+
usePossessiveAdjectives: true,
|
|
36
|
+
specialForms: {
|
|
37
|
+
// Hebrew: "property שלי" (property of-me) - possessive follows property
|
|
38
|
+
me: 'שלי', // "of me" / "mine"
|
|
39
|
+
it: 'שלו', // "of it" / "its" (masculine)
|
|
40
|
+
you: 'שלך', // "of you" / "yours"
|
|
41
|
+
},
|
|
42
|
+
keywords: {
|
|
43
|
+
// "my" / "mine"
|
|
44
|
+
שלי: 'me',
|
|
45
|
+
// "your" / "yours"
|
|
46
|
+
שלך: 'you',
|
|
47
|
+
// "its/his/her"
|
|
48
|
+
שלו: 'it', // his/its (masculine)
|
|
49
|
+
שלה: 'it', // her/its (feminine)
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
roleMarkers: {
|
|
53
|
+
destination: { primary: 'על', alternatives: ['ב', 'אל', 'ל'], position: 'before' },
|
|
54
|
+
source: { primary: 'מ', alternatives: ['מן', 'מאת'], position: 'before' },
|
|
55
|
+
patient: { primary: 'את', position: 'before' }, // Direct object marker
|
|
56
|
+
style: { primary: 'עם', alternatives: ['ב'], position: 'before' },
|
|
57
|
+
},
|
|
58
|
+
keywords: {
|
|
59
|
+
// Class/Attribute operations
|
|
60
|
+
toggle: { primary: 'החלף', alternatives: ['שנה', 'הפוך'], normalized: 'toggle' },
|
|
61
|
+
add: { primary: 'הוסף', alternatives: ['הכנס'], normalized: 'add' },
|
|
62
|
+
remove: { primary: 'הסר', alternatives: ['מחק', 'הורד'], normalized: 'remove' },
|
|
63
|
+
// Content operations
|
|
64
|
+
put: { primary: 'שים', alternatives: ['הנח', 'הכנס'], normalized: 'put' },
|
|
65
|
+
append: { primary: 'צרף', alternatives: ['הוסף בסוף'], normalized: 'append' },
|
|
66
|
+
prepend: { primary: 'הקדם', alternatives: ['הוסף בהתחלה'], normalized: 'prepend' },
|
|
67
|
+
take: { primary: 'קח', normalized: 'take' },
|
|
68
|
+
make: { primary: 'צור', alternatives: ['הכן'], normalized: 'make' },
|
|
69
|
+
clone: { primary: 'שכפל', alternatives: ['העתק'], normalized: 'clone' },
|
|
70
|
+
swap: { primary: 'החלף', alternatives: ['המר'], normalized: 'swap' },
|
|
71
|
+
morph: { primary: 'הפוך', alternatives: ['שנה'], normalized: 'morph' },
|
|
72
|
+
// Variable operations
|
|
73
|
+
set: { primary: 'קבע', alternatives: ['הגדר'], normalized: 'set' },
|
|
74
|
+
get: { primary: 'קבל', alternatives: ['השג'], normalized: 'get' },
|
|
75
|
+
increment: { primary: 'הגדל', alternatives: ['הוסף אחד'], normalized: 'increment' },
|
|
76
|
+
decrement: { primary: 'הקטן', alternatives: ['הפחת'], normalized: 'decrement' },
|
|
77
|
+
log: { primary: 'רשום', normalized: 'log' },
|
|
78
|
+
// Visibility
|
|
79
|
+
show: { primary: 'הראה', alternatives: ['הצג'], normalized: 'show' },
|
|
80
|
+
hide: { primary: 'הסתר', alternatives: ['החבא'], normalized: 'hide' },
|
|
81
|
+
transition: { primary: 'מעבר', alternatives: ['הנפש'], normalized: 'transition' },
|
|
82
|
+
// Events
|
|
83
|
+
on: { primary: 'ב', alternatives: ['כש', 'כאשר', 'עם'], normalized: 'on' },
|
|
84
|
+
trigger: { primary: 'הפעל', alternatives: ['שגר'], normalized: 'trigger' },
|
|
85
|
+
send: { primary: 'שלח', normalized: 'send' },
|
|
86
|
+
// DOM focus
|
|
87
|
+
focus: { primary: 'מקד', alternatives: ['התמקד'], normalized: 'focus' },
|
|
88
|
+
blur: { primary: 'טשטש', alternatives: ['הסר מיקוד'], normalized: 'blur' },
|
|
89
|
+
// Navigation
|
|
90
|
+
go: { primary: 'לך', alternatives: ['נווט', 'עבור'], normalized: 'go' },
|
|
91
|
+
// Async
|
|
92
|
+
wait: { primary: 'חכה', alternatives: ['המתן'], normalized: 'wait' },
|
|
93
|
+
fetch: { primary: 'הבא', alternatives: ['טען'], normalized: 'fetch' },
|
|
94
|
+
settle: { primary: 'התייצב', normalized: 'settle' },
|
|
95
|
+
// Control flow
|
|
96
|
+
if: { primary: 'אם', normalized: 'if' },
|
|
97
|
+
when: { primary: 'כאשר', alternatives: ['כש'], normalized: 'when' },
|
|
98
|
+
where: { primary: 'איפה', alternatives: ['היכן'], normalized: 'where' },
|
|
99
|
+
else: { primary: 'אחרת', alternatives: ['אם לא'], normalized: 'else' },
|
|
100
|
+
repeat: { primary: 'חזור', normalized: 'repeat' },
|
|
101
|
+
for: { primary: 'עבור', alternatives: ['לכל'], normalized: 'for' },
|
|
102
|
+
while: { primary: 'כל עוד', alternatives: ['בזמן'], normalized: 'while' },
|
|
103
|
+
continue: { primary: 'המשך', normalized: 'continue' },
|
|
104
|
+
halt: { primary: 'עצור', alternatives: ['הפסק'], normalized: 'halt' },
|
|
105
|
+
throw: { primary: 'זרוק', normalized: 'throw' },
|
|
106
|
+
call: { primary: 'קרא', alternatives: ['הפעל'], normalized: 'call' },
|
|
107
|
+
return: { primary: 'החזר', alternatives: ['חזור'], normalized: 'return' },
|
|
108
|
+
then: { primary: 'אז', alternatives: ['אחרי', 'ואז'], normalized: 'then' },
|
|
109
|
+
and: { primary: 'וגם', alternatives: ['גם'], normalized: 'and' },
|
|
110
|
+
end: { primary: 'סוף', alternatives: ['סיום'], normalized: 'end' },
|
|
111
|
+
// Advanced
|
|
112
|
+
js: { primary: 'js', alternatives: ['ג׳אווהסקריפט'], normalized: 'js' },
|
|
113
|
+
async: { primary: 'אסינכרוני', normalized: 'async' },
|
|
114
|
+
tell: { primary: 'אמור', normalized: 'tell' },
|
|
115
|
+
default: { primary: 'ברירת מחדל', normalized: 'default' },
|
|
116
|
+
init: { primary: 'אתחל', alternatives: ['התחל'], normalized: 'init' },
|
|
117
|
+
behavior: { primary: 'התנהגות', normalized: 'behavior' },
|
|
118
|
+
install: { primary: 'התקן', normalized: 'install' },
|
|
119
|
+
measure: { primary: 'מדוד', normalized: 'measure' },
|
|
120
|
+
// Modifiers
|
|
121
|
+
into: { primary: 'לתוך', alternatives: ['אל'], normalized: 'into' },
|
|
122
|
+
before: { primary: 'לפני', normalized: 'before' },
|
|
123
|
+
after: { primary: 'אחרי', normalized: 'after' },
|
|
124
|
+
// Common event names (for event handler patterns)
|
|
125
|
+
click: { primary: 'לחיצה', alternatives: ['קליק'], normalized: 'click' },
|
|
126
|
+
hover: { primary: 'ריחוף', alternatives: ['מעבר'], normalized: 'hover' },
|
|
127
|
+
submit: { primary: 'שליחה', alternatives: ['הגשה'], normalized: 'submit' },
|
|
128
|
+
input: { primary: 'קלט', alternatives: ['הזנה'], normalized: 'input' },
|
|
129
|
+
change: { primary: 'שינוי', alternatives: ['עדכון'], normalized: 'change' },
|
|
130
|
+
// Event modifiers (for repeat until event)
|
|
131
|
+
until: { primary: 'עד', normalized: 'until' },
|
|
132
|
+
event: { primary: 'אירוע', normalized: 'event' },
|
|
133
|
+
from: { primary: 'מ', alternatives: ['מאת'], normalized: 'from' },
|
|
134
|
+
},
|
|
135
|
+
tokenization: {
|
|
136
|
+
prefixes: ['ה', 'ו', 'ב', 'כ', 'ל', 'מ', 'ש'], // Common Hebrew prefixes
|
|
137
|
+
},
|
|
138
|
+
eventHandler: {
|
|
139
|
+
keyword: { primary: 'ב', alternatives: ['כש', 'כאשר', 'עם'], normalized: 'on' },
|
|
140
|
+
sourceMarker: { primary: 'מ', alternatives: ['מאת'], position: 'before' },
|
|
141
|
+
conditionalKeyword: { primary: 'כאשר', alternatives: ['כש', 'אם'] },
|
|
142
|
+
// Event marker: ב (at/upon), used in SVO pattern
|
|
143
|
+
// Pattern: ב [event] [verb] [patient] על [destination?]
|
|
144
|
+
// Example: בלחיצה החלף .active על #button
|
|
145
|
+
eventMarker: { primary: 'ב', alternatives: ['כש', 'עם'], position: 'before' },
|
|
146
|
+
temporalMarkers: ['כאשר', 'כש', 'עם'], // temporal conjunctions (when)
|
|
147
|
+
},
|
|
148
|
+
};
|
|
@@ -95,7 +95,13 @@ export const hindiProfile: LanguageProfile = {
|
|
|
95
95
|
send: { primary: 'भेजें', alternatives: ['भेज'], normalized: 'send' },
|
|
96
96
|
// DOM focus
|
|
97
97
|
focus: { primary: 'फोकस', alternatives: ['केंद्रित'], normalized: 'focus' },
|
|
98
|
-
blur: { primary: 'धुंधला', alternatives: [], normalized: 'blur' },
|
|
98
|
+
blur: { primary: 'धुंधला', alternatives: ['फोकस_हटाएं'], normalized: 'blur' },
|
|
99
|
+
// Common event names (for event handler patterns)
|
|
100
|
+
click: { primary: 'क्लिक', normalized: 'click' },
|
|
101
|
+
hover: { primary: 'होवर', alternatives: ['ऊपर_रखें'], normalized: 'hover' },
|
|
102
|
+
submit: { primary: 'सबमिट', alternatives: ['जमा'], normalized: 'submit' },
|
|
103
|
+
input: { primary: 'इनपुट', alternatives: ['दर्ज'], normalized: 'input' },
|
|
104
|
+
change: { primary: 'बदलाव', alternatives: ['परिवर्तन'], normalized: 'change' },
|
|
99
105
|
// Navigation
|
|
100
106
|
go: { primary: 'जाएं', alternatives: ['जा'], normalized: 'go' },
|
|
101
107
|
// Async
|
|
@@ -142,5 +148,10 @@ export const hindiProfile: LanguageProfile = {
|
|
|
142
148
|
eventHandler: {
|
|
143
149
|
keyword: { primary: 'पर', alternatives: ['में', 'जब'], normalized: 'on' },
|
|
144
150
|
sourceMarker: { primary: 'से', position: 'after' },
|
|
151
|
+
// Event marker: पर (at/on), used in SOV pattern
|
|
152
|
+
// Pattern: [event] पर [destination का?] [patient] को [action]
|
|
153
|
+
// Example: क्लिक पर #button का .active को टॉगल
|
|
154
|
+
eventMarker: { primary: 'पर', alternatives: ['में'], position: 'after' },
|
|
155
|
+
temporalMarkers: ['जब', 'जब भी'], // temporal conjunctions (when, whenever)
|
|
145
156
|
},
|
|
146
157
|
};
|
|
@@ -27,6 +27,7 @@ export { chineseProfile } from './chinese';
|
|
|
27
27
|
export { englishProfile } from './english';
|
|
28
28
|
export { frenchProfile } from './french';
|
|
29
29
|
export { germanProfile } from './german';
|
|
30
|
+
export { hebrewProfile } from './hebrew';
|
|
30
31
|
export { hindiProfile } from './hindi';
|
|
31
32
|
export { indonesianProfile } from './indonesian';
|
|
32
33
|
export { italianProfile } from './italian';
|
|
@@ -38,6 +39,7 @@ export { portugueseProfile } from './portuguese';
|
|
|
38
39
|
export { quechuaProfile } from './quechua';
|
|
39
40
|
export { russianProfile } from './russian';
|
|
40
41
|
export { spanishProfile } from './spanish';
|
|
42
|
+
export { spanishMexicoProfile } from './spanishMexico';
|
|
41
43
|
export { swahiliProfile } from './swahili';
|
|
42
44
|
export { thaiProfile } from './thai';
|
|
43
45
|
export { tagalogProfile } from './tl';
|
|
@@ -112,14 +112,25 @@ export const indonesianProfile: LanguageProfile = {
|
|
|
112
112
|
into: { primary: 'ke dalam', normalized: 'into' },
|
|
113
113
|
before: { primary: 'sebelum', normalized: 'before' },
|
|
114
114
|
after: { primary: 'sesudah', alternatives: ['setelah'], normalized: 'after' },
|
|
115
|
+
// Common event names (for event handler patterns)
|
|
116
|
+
click: { primary: 'klik', alternatives: ['tekan'], normalized: 'click' },
|
|
117
|
+
hover: { primary: 'hover', alternatives: ['arahkan'], normalized: 'hover' },
|
|
118
|
+
submit: { primary: 'kirim', alternatives: ['submit'], normalized: 'submit' },
|
|
119
|
+
input: { primary: 'masuk', alternatives: ['input'], normalized: 'input' },
|
|
120
|
+
change: { primary: 'ubah', alternatives: ['berubah'], normalized: 'change' },
|
|
115
121
|
// Event modifiers (for repeat until event)
|
|
116
122
|
until: { primary: 'sampai', normalized: 'until' },
|
|
117
123
|
event: { primary: 'peristiwa', alternatives: ['event'], normalized: 'event' },
|
|
118
124
|
from: { primary: 'dari', normalized: 'from' },
|
|
119
125
|
},
|
|
120
126
|
eventHandler: {
|
|
121
|
-
keyword: { primary: 'pada', alternatives: ['ketika', 'saat'] },
|
|
127
|
+
keyword: { primary: 'pada', alternatives: ['ketika', 'saat'], normalized: 'on' },
|
|
122
128
|
sourceMarker: { primary: 'dari', position: 'before' },
|
|
123
129
|
conditionalKeyword: { primary: 'ketika', alternatives: ['saat', 'waktu'] },
|
|
130
|
+
// Event marker: saat (when), used in SVO pattern
|
|
131
|
+
// Pattern: saat [event] [verb] [patient] pada [destination?]
|
|
132
|
+
// Example: saat klik alihkan .active pada #button
|
|
133
|
+
eventMarker: { primary: 'saat', alternatives: ['ketika'], position: 'before' },
|
|
134
|
+
temporalMarkers: ['ketika', 'saat'], // temporal conjunctions (when)
|
|
124
135
|
},
|
|
125
136
|
};
|
|
@@ -131,9 +131,25 @@ export const italianProfile: LanguageProfile = {
|
|
|
131
131
|
into: { primary: 'in', alternatives: ['dentro'], normalized: 'into' },
|
|
132
132
|
before: { primary: 'prima', normalized: 'before' },
|
|
133
133
|
after: { primary: 'dopo', normalized: 'after' },
|
|
134
|
+
// Common event names (for event handler patterns)
|
|
135
|
+
click: { primary: 'clic', alternatives: ['clicca'], normalized: 'click' },
|
|
136
|
+
hover: { primary: 'passaggio', alternatives: ['sorvolo'], normalized: 'hover' },
|
|
137
|
+
submit: { primary: 'invio', alternatives: ['inviare'], normalized: 'submit' },
|
|
138
|
+
input: { primary: 'inserimento', alternatives: ['input'], normalized: 'input' },
|
|
139
|
+
change: { primary: 'cambio', alternatives: ['cambiamento'], normalized: 'change' },
|
|
134
140
|
// Event modifiers
|
|
135
141
|
until: { primary: 'fino', normalized: 'until' },
|
|
136
142
|
event: { primary: 'evento', normalized: 'event' },
|
|
137
143
|
from: { primary: 'da', alternatives: ['di'], normalized: 'from' },
|
|
138
144
|
},
|
|
145
|
+
eventHandler: {
|
|
146
|
+
keyword: { primary: 'su', alternatives: ['al', 'quando'], normalized: 'on' },
|
|
147
|
+
sourceMarker: { primary: 'da', alternatives: ['di'], position: 'before' },
|
|
148
|
+
conditionalKeyword: { primary: 'quando', alternatives: ['se'] },
|
|
149
|
+
// Event marker: al (at/upon), used in SVO pattern
|
|
150
|
+
// Pattern: al [event] [verb] [patient] su [destination?]
|
|
151
|
+
// Example: al clic commutare .active su #button
|
|
152
|
+
eventMarker: { primary: 'al', alternatives: ['allo', 'alla'], position: 'before' },
|
|
153
|
+
temporalMarkers: ['quando', 'al'], // temporal conjunctions (when)
|
|
154
|
+
},
|
|
139
155
|
};
|
|
@@ -44,7 +44,7 @@ export const japaneseProfile: LanguageProfile = {
|
|
|
44
44
|
},
|
|
45
45
|
roleMarkers: {
|
|
46
46
|
patient: { primary: 'を', position: 'after' },
|
|
47
|
-
destination: { primary: 'に', alternatives: ['へ', 'で'], position: 'after' },
|
|
47
|
+
destination: { primary: 'に', alternatives: ['へ', 'で', 'の'], position: 'after' },
|
|
48
48
|
source: { primary: 'から', position: 'after' },
|
|
49
49
|
style: { primary: 'で', position: 'after' },
|
|
50
50
|
event: { primary: 'を', position: 'after' }, // Event as object marker
|
|
@@ -68,7 +68,7 @@ export const japaneseProfile: LanguageProfile = {
|
|
|
68
68
|
alternatives: ['先頭に追加', 'プリペンド'],
|
|
69
69
|
normalized: 'prepend',
|
|
70
70
|
},
|
|
71
|
-
take: { primary: '取る',
|
|
71
|
+
take: { primary: '取る', normalized: 'take' }, // Removed 取得 (belongs to get)
|
|
72
72
|
make: { primary: '作る', alternatives: ['作成'], normalized: 'make' },
|
|
73
73
|
clone: { primary: '複製', alternatives: ['クローン'], normalized: 'clone' },
|
|
74
74
|
swap: { primary: '交換', alternatives: ['スワップ', '入れ替え'], normalized: 'swap' },
|
|
@@ -146,4 +146,13 @@ export const japaneseProfile: LanguageProfile = {
|
|
|
146
146
|
particles: ['を', 'に', 'で', 'から', 'の', 'が', 'は', 'も', 'へ', 'と'],
|
|
147
147
|
boundaryStrategy: 'particle',
|
|
148
148
|
},
|
|
149
|
+
eventHandler: {
|
|
150
|
+
// Event marker: で (at/on/when), used in SOV pattern
|
|
151
|
+
// Pattern: [event] で [destination] の [patient] を [action]
|
|
152
|
+
// Example: クリック で #button の .active を 切り替え
|
|
153
|
+
// Note: に is NOT an event marker - it marks direction/destination
|
|
154
|
+
// で specifically marks the means/method of action (by/via)
|
|
155
|
+
eventMarker: { primary: 'で', position: 'after' },
|
|
156
|
+
temporalMarkers: ['時', 'とき'], // temporal markers that can optionally appear
|
|
157
|
+
},
|
|
149
158
|
};
|
|
@@ -45,7 +45,7 @@ export const koreanProfile: LanguageProfile = {
|
|
|
45
45
|
},
|
|
46
46
|
roleMarkers: {
|
|
47
47
|
patient: { primary: '을', alternatives: ['를'], position: 'after' },
|
|
48
|
-
destination: { primary: '에', alternatives: ['으로', '로', '에서'], position: 'after' },
|
|
48
|
+
destination: { primary: '에', alternatives: ['으로', '로', '에서', '의'], position: 'after' },
|
|
49
49
|
source: { primary: '에서', alternatives: ['부터'], position: 'after' },
|
|
50
50
|
style: { primary: '로', alternatives: ['으로'], position: 'after' },
|
|
51
51
|
event: { primary: '을', alternatives: ['를'], position: 'after' }, // Event as object marker
|
|
@@ -80,6 +80,12 @@ export const koreanProfile: LanguageProfile = {
|
|
|
80
80
|
// DOM focus
|
|
81
81
|
focus: { primary: '포커스', normalized: 'focus' },
|
|
82
82
|
blur: { primary: '블러', normalized: 'blur' },
|
|
83
|
+
// Common event names (for event handler patterns)
|
|
84
|
+
click: { primary: '클릭', normalized: 'click' },
|
|
85
|
+
hover: { primary: '호버', normalized: 'hover' },
|
|
86
|
+
submit: { primary: '제출', normalized: 'submit' },
|
|
87
|
+
input: { primary: '입력', normalized: 'input' },
|
|
88
|
+
change: { primary: '변경', normalized: 'change' },
|
|
83
89
|
// Navigation
|
|
84
90
|
go: { primary: '이동', normalized: 'go' },
|
|
85
91
|
// Async
|
|
@@ -124,4 +130,12 @@ export const koreanProfile: LanguageProfile = {
|
|
|
124
130
|
particles: ['을', '를', '이', '가', '은', '는', '에', '에서', '으로', '로', '와', '과', '도'],
|
|
125
131
|
boundaryStrategy: 'space',
|
|
126
132
|
},
|
|
133
|
+
eventHandler: {
|
|
134
|
+
// Event marker: 할 때 (when/at the time of), used in SOV pattern
|
|
135
|
+
// Pattern: [event] 할 때 [destination] 의 [patient] 를 [action]
|
|
136
|
+
// Example: 클릭 할 때 #button 의 .active 를 토글
|
|
137
|
+
// Compact forms (no space): 클릭할때 .active를토글
|
|
138
|
+
eventMarker: { primary: '할 때', alternatives: ['할때', '때', '에'], position: 'after' },
|
|
139
|
+
temporalMarkers: ['할 때', '할때', '때'], // temporal markers (with and without space)
|
|
140
|
+
},
|
|
127
141
|
};
|
|
@@ -237,6 +237,12 @@ export const polishProfile: LanguageProfile = {
|
|
|
237
237
|
into: { primary: 'do', alternatives: ['w'], normalized: 'into' },
|
|
238
238
|
before: { primary: 'przed', normalized: 'before' },
|
|
239
239
|
after: { primary: 'po', normalized: 'after' },
|
|
240
|
+
// Common event names (for event handler patterns)
|
|
241
|
+
click: { primary: 'kliknięciu', alternatives: ['klikniecie', 'klik'], normalized: 'click' },
|
|
242
|
+
hover: { primary: 'najechaniu', alternatives: ['hover'], normalized: 'hover' },
|
|
243
|
+
submit: { primary: 'wysłaniu', alternatives: ['wyslaniu', 'submit'], normalized: 'submit' },
|
|
244
|
+
input: { primary: 'wprowadzeniu', alternatives: ['input'], normalized: 'input' },
|
|
245
|
+
change: { primary: 'zmianie', alternatives: ['zmiana'], normalized: 'change' },
|
|
240
246
|
// Event modifiers
|
|
241
247
|
until: { primary: 'aż', alternatives: ['az', 'do'], normalized: 'until' },
|
|
242
248
|
event: { primary: 'zdarzenie', normalized: 'event' },
|
|
@@ -245,5 +251,11 @@ export const polishProfile: LanguageProfile = {
|
|
|
245
251
|
eventHandler: {
|
|
246
252
|
keyword: { primary: 'gdy', alternatives: ['kiedy', 'przy', 'na'], normalized: 'on' },
|
|
247
253
|
sourceMarker: { primary: 'na', alternatives: ['w', 'przy'], position: 'before' },
|
|
254
|
+
conditionalKeyword: { primary: 'kiedy', alternatives: ['gdy', 'jeśli'] },
|
|
255
|
+
// Event marker: przy (at/on), used in SVO pattern
|
|
256
|
+
// Pattern: przy [event] [verb] [patient] na [destination?]
|
|
257
|
+
// Example: przy kliknięciu przełącz .active na #button
|
|
258
|
+
eventMarker: { primary: 'przy', alternatives: ['na'], position: 'before' },
|
|
259
|
+
temporalMarkers: ['kiedy', 'gdy', 'przy'], // temporal conjunctions (when, at)
|
|
248
260
|
},
|
|
249
261
|
};
|
|
@@ -107,9 +107,25 @@ export const portugueseProfile: LanguageProfile = {
|
|
|
107
107
|
into: { primary: 'em', alternatives: ['dentro de'], normalized: 'into' },
|
|
108
108
|
before: { primary: 'antes', normalized: 'before' },
|
|
109
109
|
after: { primary: 'depois', normalized: 'after' },
|
|
110
|
+
// Common event names (for event handler patterns)
|
|
111
|
+
click: { primary: 'clique', alternatives: ['clicar'], normalized: 'click' },
|
|
112
|
+
hover: { primary: 'sobrevoar', alternatives: ['passar'], normalized: 'hover' },
|
|
113
|
+
submit: { primary: 'envio', alternatives: ['submeter'], normalized: 'submit' },
|
|
114
|
+
input: { primary: 'entrada', alternatives: ['inserção'], normalized: 'input' },
|
|
115
|
+
change: { primary: 'alteração', alternatives: ['mudança'], normalized: 'change' },
|
|
110
116
|
// Event modifiers (for repeat until event)
|
|
111
117
|
until: { primary: 'até', normalized: 'until' },
|
|
112
118
|
event: { primary: 'evento', normalized: 'event' },
|
|
113
119
|
from: { primary: 'de', alternatives: ['desde'], normalized: 'from' },
|
|
114
120
|
},
|
|
121
|
+
eventHandler: {
|
|
122
|
+
keyword: { primary: 'em', alternatives: ['ao', 'quando'], normalized: 'on' },
|
|
123
|
+
sourceMarker: { primary: 'de', alternatives: ['desde'], position: 'before' },
|
|
124
|
+
conditionalKeyword: { primary: 'quando', alternatives: ['se'] },
|
|
125
|
+
// Event marker: ao (at/upon), used in SVO pattern
|
|
126
|
+
// Pattern: ao [event] [verb] [patient] em [destination?]
|
|
127
|
+
// Example: ao clique alternar .active em #button
|
|
128
|
+
eventMarker: { primary: 'ao', alternatives: ['no'], position: 'before' },
|
|
129
|
+
temporalMarkers: ['quando', 'ao'], // temporal conjunctions (when)
|
|
130
|
+
},
|
|
115
131
|
};
|
|
@@ -168,6 +168,12 @@ export const russianProfile: LanguageProfile = {
|
|
|
168
168
|
form: 'infinitive',
|
|
169
169
|
},
|
|
170
170
|
blur: { primary: 'размыть', alternatives: ['размой'], normalized: 'blur', form: 'infinitive' },
|
|
171
|
+
// Common event names (for event handler patterns)
|
|
172
|
+
click: { primary: 'клик', alternatives: ['клике', 'нажатии'], normalized: 'click' },
|
|
173
|
+
hover: { primary: 'наведении', alternatives: ['наведение'], normalized: 'hover' },
|
|
174
|
+
submit: { primary: 'отправке', alternatives: ['отправка'], normalized: 'submit' },
|
|
175
|
+
input: { primary: 'вводе', alternatives: ['ввод'], normalized: 'input' },
|
|
176
|
+
change: { primary: 'изменении', alternatives: ['изменение'], normalized: 'change' },
|
|
171
177
|
// Navigation
|
|
172
178
|
go: {
|
|
173
179
|
primary: 'перейти',
|
|
@@ -256,5 +262,10 @@ export const russianProfile: LanguageProfile = {
|
|
|
256
262
|
eventHandler: {
|
|
257
263
|
keyword: { primary: 'при', alternatives: ['когда'], normalized: 'on' },
|
|
258
264
|
sourceMarker: { primary: 'на', alternatives: ['в', 'при'], position: 'before' },
|
|
265
|
+
// Event marker: при (at/on/upon), used in SVO pattern
|
|
266
|
+
// Pattern: при [event] [verb] [patient] на [destination?]
|
|
267
|
+
// Example: при клике переключить .active на #button
|
|
268
|
+
eventMarker: { primary: 'при', alternatives: ['когда'], position: 'before' },
|
|
269
|
+
temporalMarkers: ['когда', 'если'], // temporal conjunctions (when, if)
|
|
259
270
|
},
|
|
260
271
|
};
|
|
@@ -87,6 +87,12 @@ export const spanishProfile: LanguageProfile = {
|
|
|
87
87
|
// DOM focus
|
|
88
88
|
focus: { primary: 'enfocar', normalized: 'focus' },
|
|
89
89
|
blur: { primary: 'desenfocar', normalized: 'blur' },
|
|
90
|
+
// Common event names (for event handler patterns)
|
|
91
|
+
click: { primary: 'clic', alternatives: ['hacer clic'], normalized: 'click' },
|
|
92
|
+
hover: { primary: 'sobrevolar', alternatives: ['pasar por encima'], normalized: 'hover' },
|
|
93
|
+
submit: { primary: 'envío', alternatives: ['enviar'], normalized: 'submit' },
|
|
94
|
+
input: { primary: 'entrada', alternatives: ['introducir'], normalized: 'input' },
|
|
95
|
+
change: { primary: 'cambio', alternatives: ['cambiar'], normalized: 'change' },
|
|
90
96
|
// Navigation
|
|
91
97
|
go: { primary: 'ir', alternatives: ['navegar'], normalized: 'go' },
|
|
92
98
|
// Async
|
|
@@ -127,4 +133,13 @@ export const spanishProfile: LanguageProfile = {
|
|
|
127
133
|
event: { primary: 'evento', normalized: 'event' },
|
|
128
134
|
from: { primary: 'de', alternatives: ['desde'], normalized: 'from' },
|
|
129
135
|
},
|
|
136
|
+
eventHandler: {
|
|
137
|
+
keyword: { primary: 'al', alternatives: ['cuando', 'en'], normalized: 'on' },
|
|
138
|
+
sourceMarker: { primary: 'de', alternatives: ['desde'], position: 'before' },
|
|
139
|
+
// Event marker: al (when), used in SVO pattern
|
|
140
|
+
// Pattern: al [event] [verb] [patient] en [destination?]
|
|
141
|
+
// Example: al clic alternar .active en #button
|
|
142
|
+
eventMarker: { primary: 'al', alternatives: ['cuando'], position: 'before' },
|
|
143
|
+
temporalMarkers: ['cuando', 'al'], // temporal conjunctions (when)
|
|
144
|
+
},
|
|
130
145
|
};
|