-
Notifications
You must be signed in to change notification settings - Fork 0
/
adjective_rule.txt
734 lines (708 loc) · 12.2 KB
/
adjective_rule.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
#################################
# Gender-adjusting adjectives #
#################################
# written for FR, IT, ES, PT #
#################################
# Default adjective is usually in
# Feminine Singular
#The braces define the language
#When it's "^X(.+)", it means "all adjectives starting with X"
#When it's "(.+)er$", it means "all adjectives ending with X"
#$1Y means, let's say it's AX, "write AY"
#First rule to fit is the first rule that gets applied
# Language replacement rules are done by language and use regexes: http://www.cplusplus.com/reference/regex/ECMAScript/
# They have the following general structure:
# language = {
# matcher = {
# suffix = replacement_rule
# suffix = replacement_rule
# ...
# }
# }
#
# Language should match the localisation files (eg. 'french', 'german', 'english')
# Matcher determines if to apply rules to an adjective, and is case insensitive.
# The first matcher to match is the only one applied for a localisation.
# It must be a regex, and must be in quotes
# "^de (.+)" would match all adjectives beginning with "de "
# "(.+)er$" would match all adjectives ending with "er"
# Suffix is added to the end of the localisation key.
# _MS would make dfsdf become sfdfdf_MS
# Replacement rule is a regex replacement rule applied to the matched adjective.
# If the matcher is written to only match some of the adjective ("er$"),
# the replacement rule will only replace that part.
# If the matcher is written to match the whole adjective ("(.+)er$"),
# the replacement will replace the whole thing.
# There are some special things with replacements:
# If a matcher has items in parenthesis, those become groups that can be accessed
# with $1, $2, etc. This can be used to bring in portions of matched adjectives.
french = {
#_MS, _FS, _MP, _FP are respectively m. sing., f. sing., m. pl., f. pl.
#_FR is added because of the language
#Not-adjectives (i.e. literally "of X") - should not exist!
"^de (.+)" = {
_MS_FR = "de $1"
_FS_FR = "de $1"
_MP_FR = "de $1"
_FP_FR = "de $1"
}
"^du (.+)" = {
_MS_FR = "du $1"
_FS_FR = "du $1"
_MP_FR = "du $1"
_FP_FR = "du $1"
}
"^des (.+)" = {
_MS_FR = "des $1"
_FS_FR = "des $1"
_MP_FR = "des $1"
_FP_FR = "des $1"
}
#Special rules
"ouzbèke" = { # Uzbek
_MS_FR = ouzbek
_FS_FR = ouzbèke
_MP_FR = ouzbeks
_FP_FR = ouzbèkes
}
"grecque" = { # Greek
_MS_FR = grec
_FS_FR = grecque
_MP_FR = grecs
_FP_FR = grecques
}
"russe" = { # Russian
_MS_FR = russe
_FS_FR = russe
_MP_FR = russes
_FP_FR = russes
}
"suisse" = { # Swiss
_MS_FR = suisse
_FS_FR = suisse
_MP_FR = suisses
_FP_FR = suisses
}
"belge" = { # Belgian
_MS_FR = belge
_FS_FR = belge
_MP_FR = belges
_FP_FR = belges
}
#Actual adjectives
"(.+)èse$" = {
_MS_FR = $1ès
_FS_FR = $1èse
_MP_FR = $1ès
_FP_FR = $1èses
}
"(.+)eux$" = {
_MS_FR = $1eux
_FS_FR = $1euse
_MP_FR = $1eux
_FP_FR = $1euses
}
"(.+)èque$" = {
_MS_FR = $1èque
_FS_FR = $1èque
_MP_FR = $1èques
_FP_FR = $1èques
}
"(.+)que$" = {
_MS_FR = $1c
_FS_FR = $1ques
_MP_FR = $1cs
_FP_FR = $1ques
}
"(.+)gue$" = {
_MS_FR = $1g
_FS_FR = $1gue
_MP_FR = $1gs
_FP_FR = $1gues
}
"(.+)che$" = {
_MS_FR = $1c
_FS_FR = $1che
_MP_FR = $1cs
_FP_FR = $1ches
}
"(.+)ausse$" = {
_MS_FR = $1aux
_FS_FR = $1ausse
_MP_FR = $1aux
_FP_FR = $1ausses
}
"(.+)sse$" = {
_MS_FR = $1s
_FS_FR = $1sse
_MP_FR = $1s
_FP_FR = $1sses
}
"(.+)ère$" = {
_MS_FR = $1er
_FS_FR = $1ère
_MP_FR = $1ers
_FP_FR = $1ères
}
"(.+)trice$" = {
_MS_FR = $1teur
_FS_FR = $1trice
_MP_FR = $1teurs
_FP_FR = $1trices
}
"(.+)euse$" = {
_MS_FR = $1eux
_FS_FR = $1euse
_MP_FR = $1eux
_FP_FR = $1euses
}
"(.+)ve$" = {
_MS_FR = $1f
_FS_FR = $1ve
_MP_FR = $1fs
_FP_FR = $1ves
}
"(.+)nne$" = {
_MS_FR = $1n
_FS_FR = $1nne
_MP_FR = $1ns
_FP_FR = $1nnes
}
"(.+)lle$" = {
_MS_FR = $1l
_FS_FR = $1lle
_MP_FR = $1ls
_FP_FR = $1lles
}
"(.+)iste$" = {
_MS_FR = $1iste
_FS_FR = $1iste
_MP_FR = $1istes
_FP_FR = $1istes
}
"(.+)asque$" = {
_MS_FR = $1asque
_FS_FR = $1asque
_MP_FR = $1asques
_FP_FR = $1asques
}
"(.+)ène$" = {
_MS_FR = $1ène
_FS_FR = $1ène
_MP_FR = $1ènes
_FP_FR = $1ènes
}
"(.+)ète$" = {
_MS_FR = $1ète
_FS_FR = $1ète
_MP_FR = $1ètes
_FP_FR = $1ètes
}
"(.+)ote$" = {
_MS_FR = $1ote
_FS_FR = $1ote
_MP_FR = $1otes
_FP_FR = $1otes
}
"(.+)ite$" = {
_MS_FR = $1ite
_FS_FR = $1ite
_MP_FR = $1ites
_FP_FR = $1ites
}
"(.+)e$" = { # Problem is, some adjectives have -e in both genders...
_MS_FR = $1
_FS_FR = $1e
_MP_FR = $1s
_FP_FR = $1es
}
#Fallback
"^(.+)$" = {
_MS = $1
_FS = $1
_MP = $1s
_FP = $1s
}
}
italian = {
#_MS, _FS, _MP, _FP are respectively m. sing., f. sing., m. pl., f. pl.
#_IT is added because of the language code
#Default adjective in Italian is f. sing.
#Not-adjectives (i.e. literally "of X")
"^di (.+)" = {
_MS_IT = "di $1"
_FS_IT = "di $1"
_MP_IT = "di $1"
_FP_IT = "di $1"
}
"^d'(.+)" = {
_MS_IT = "d'$1"
_FS_IT = "d'$1"
_MP_IT = "d'$1"
_FP_IT = "d'$1"
}
"^del (.+)" = {
_MS_IT = "del $1"
_FS_IT = "del $1"
_MP_IT = "del $1"
_FP_IT = "del $1"
}
"^della (.+)" = {
_MS_IT = "della $1"
_FS_IT = "della $1"
_MP_IT = "della $1"
_FP_IT = "della $1"
}
"(.+)é$" = { #Burkinabé (of Burkina Faso)
_MS_IT = $1é
_FS_IT = $1é
_MP_IT = $1é
_FP_IT = $1é
}
"(.+)i$" = {
_MS_IT = $1i
_FS_IT = $1i
_MP_IT = $1i
_FP_IT = $1i
}
#Special rules
"belga" = { #Belgian
_MS_IT = "belga"
_FS_IT = "belga"
_MP_IT = "belgi"
_FP_IT = "belghe"
}
"austriaca" = { #Austrian
_MS_IT = "austriaco"
_FS_IT = "austriaca"
_MP_IT = "austriaci"
_FP_IT = "austriache"
}
"britannica" = { #British
_MS_IT = "britannico"
_FS_IT = "britannica"
_MP_IT = "britannici"
_FP_IT = "britanniche"
}
"greca" = { #Greek
_MS_IT = "greco"
_FS_IT = "greca"
_MP_IT = "greci"
_FP_IT = "greche"
}
"bosniaca" = { #Bosniak
_MS_IT = "bosniaco"
_FS_IT = "bosniaca"
_MP_IT = "bosniaci"
_FP_IT = "bosniache"
}
"libica" = { #Lybian
_MS_IT = "libico"
_FS_IT = "libica"
_MP_IT = "libici"
_FP_IT = "libiche"
}
#Actual adjectives
"(.+)ita$" = {
_MS_IT = $1ita
_FS_IT = $1ita
_MP_IT = $1iti
_FP_IT = $1ite
}
"(.+)ana$" = {
_MS_IT = $1ano
_FS_IT = $1ana
_MP_IT = $1ani
_FP_IT = $1ane
}
"(.+)ese$" = {
_MS_IT = $1ese
_FS_IT = $1ese
_MP_IT = $1esi
_FP_IT = $1esi
}
"(.+)ense$" = {
_MS_IT = $1ense
_FS_IT = $1ense
_MP_IT = $1ensi
_FP_IT = $1ensi
}
"(.+)ina$" = {
_MS_IT = $1ino
_FS_IT = $1ina
_MP_IT = $1ini
_FP_IT = $1ine
}
"(.+)ena$" = {
_MS_IT = $1eno
_FS_IT = $1ena
_MP_IT = $1eni
_FP_IT = $1ene
}
"(.+)egna$" = {
_MS_IT = $1egno
_FS_IT = $1egna
_MP_IT = $1egni
_FP_IT = $1egne
}
"(.+)ota$" = {
_MS_IT = $1ota
_FS_IT = $1ota
_MP_IT = $1oti
_FP_IT = $1ote
}
"(.+)ca$" = {
_MS_IT = $1co
_FS_IT = $1ca
_MP_IT = $1chi
_FP_IT = $1che
}
"(.+)cia$" = {
_MS_IT = $1cio
_FS_IT = $1cia
_MP_IT = $1ci
_FP_IT = $1ce
}
"(.+)ista$" = {
_MS_IT = $1ista
_FS_IT = $1ista
_MP_IT = $1isti
_FP_IT = $1iste
}
"(.+)ia$" = {
_MS_IT = $1io
_FS_IT = $1ia
_MP_IT = $1i
_FP_IT = $1ie
}
"(.+)a$" = {
_MS_IT = $1o
_FS_IT = $1a
_MP_IT = $1i
_FP_IT = $1e
}
"(.+)e$" = {
_MS_IT = $1e
_FS_IT = $1e
_MP_IT = $1i
_FP_IT = $1i
}
#Fallback
"^(.+)$" = {
_MS_IT = $1
_FS_IT = $1
_MP_IT = $1
_FP_IT = $1
}
}
spanish = {
#_MS, _FS, _MP, _FP are respectively m. sing., f. sing., m. pl., f. pl.
#_ES is used because of the language code
#Default adjective in Spanish is f. sing.
#Not-adjectives (i.e. literally "of X")
"^de (.+)" = {
_MS_ES = "de $1"
_FS_ES = "de $1"
_MP_ES = "de $1"
_FP_ES = "de $1"
}
"^del (.+)" = {
_MS_ES = "del $1"
_FS_ES = "del $1"
_MP_ES = "del $1"
_FP_ES = "del $1"
}
#Special rules
"alemana" = { #German
_MS_ES = "alemán"
_FS_ES = "alemana"
_MP_ES = "alemanes"
_FP_ES = "alemanas"
}
"belga" = { #Belgian
_MS_ES = "belga"
_FS_ES = "belga"
_MP_ES = "belgas"
_FP_ES = "belgas"
}
"croata" = { #Croat
_MS_ES = "croata"
_FS_ES = "croata"
_MP_ES = "croatas"
_FP_ES = "croatas"
}
#Actual adjectives
"(.+)i$" = {
_MS_ES = $1í
_FS_ES = $1í
_MP_ES = $1íes
_FP_ES = $1íes
}
"(.+)í$" = {
_MS_ES = $1í
_FS_ES = $1í
_MP_ES = $1íes
_FP_ES = $1íes
}
"(.+)al$" = {
_MS_ES = $1al
_FS_ES = $1al
_MP_ES = $1ales
_FP_ES = $1ales
}
"(.+)e$" = {
_MS_ES = $1e
_FS_ES = $1e
_MP_ES = $1es
_FP_ES = $1es
}
"(.+)esa$" = {
_MS_ES = $1és
_FS_ES = $1esa
_MP_ES = $1eses
_FP_ES = $1esas
}
"(.+)ola$" = {
_MS_ES = $1ol
_FS_ES = $1ola
_MP_ES = $1oles
_FP_ES = $1olas
}
"(.+)ona$" = {
_MS_ES = $1ón
_FS_ES = $1ona
_MP_ES = $1ones
_FP_ES = $1onas
}
"(.+)ita$" = {
_MS_ES = $1ita
_FS_ES = $1ita
_MP_ES = $1itas
_FP_ES = $1itas
}
"(.+)ota$" = {
_MS_ES = $1ota
_FS_ES = $1ota
_MP_ES = $1otas
_FP_ES = $1otas
}
"(.+)ista$" = {
_MS_ES = $1ista
_FS_ES = $1ista
_MP_ES = $1istas
_FP_ES = $1istas
}
"(.+)a$" = {
_MS_ES = $1o
_FS_ES = $1a
_MP_ES = $1os
_FP_ES = $1as
}
#Fallback
"(.+)ch$" = {
_MS_ES = $1ch
_FS_ES = $1ch
_MP_ES = $1ches
_FP_ES = $1ches
}
"(.+)d$" = {
_MS_ES = $1d
_FS_ES = $1d
_MP_ES = $1des
_FP_ES = $1des
}
"(.+)j$" = {
_MS_ES = $1j
_FS_ES = $1j
_MP_ES = $1jes
_FP_ES = $1jes
}
"(.+)l$" = {
_MS_ES = $1l
_FS_ES = $1l
_MP_ES = $1les
_FP_ES = $1les
}
"(.+)n$" = {
_MS_ES = $1n
_FS_ES = $1na
_MP_ES = $1nes
_FP_ES = $1nas
}
"(.+)r$" = {
_MS_ES = $1r
_FS_ES = $1r
_MP_ES = $1res
_FP_ES = $1res
}
"(.+)s$" = {
_MS_ES = $1s
_FS_ES = $1s
_MP_ES = $1ses
_FP_ES = $1ses
}
"(.+)x$" = {
_MS_ES = $1x
_FS_ES = $1x
_MP_ES = $1xes
_FP_ES = $1xes
}
"(.+)y$" = {
_MS_ES = $1y
_FS_ES = $1y
_MP_ES = $1yes
_FP_ES = $1yes
}
"(.+)z$" = {
_MS_ES = $1z
_FS_ES = $1z
_MP_ES = $1zes
_FP_ES = $1zes
}
"^(.+)$" = {
_MS_ES = $1
_FS_ES = $1
_MP_ES = $1s
_FP_ES = $1s
}
}
braz_por = {
#_MS, _FS, _MP, _FP are respectively m. sing., f. sing., m. pl., f. pl.
#_PT is used because of the language code
#Not-adjectives (i.e. literally "of X")
"^de (.+)" = {
_MS_PT = "de $1"
_FS_PT = "de $1"
_MP_PT = "de $1"
_FP_PT = "de $1"
}
"^d'(.+)" = {
_MS_PT = "d'$1"
_FS_PT = "d'$1"
_MP_PT = "d'$1"
_FP_PT = "d'$1"
}
"^do (.+)" = {
_MS_PT = "do $1"
_FS_PT = "do $1"
_MP_PT = "do $1"
_FP_PT = "do $1"
}
"^da (.+)" = {
_MS_PT = "da $1"
_FS_PT = "da $1"
_MP_PT = "da $1"
_FP_PT = "da $1"
}
"^dos (.+)" = {
_MS_PT = "dos $1"
_FS_PT = "dos $1"
_MP_PT = "dos $1"
_FP_PT = "dos $1"
}
"^das (.+)" = {
_MS_PT = "das $1"
_FS_PT = "das $1"
_MP_PT = "das $1"
_FP_PT = "das $1"
}
#Special rules
"belga" = { #Belgian
_MS_PT = "belga"
_FS_PT = "belga"
_MP_PT = "belgas"
_FP_PT = "belgas"
}
"croata" = { #Croatian
_MS_PT = "croata"
_FS_PT = "croata"
_MP_PT = "croatas"
_FP_PT = "croatas"
}
"letã" = { #Latvian
_MS_PT = letão
_FS_PT = letã
_MP_PT = latões
_FP_PT = letãs
}
#Actual adjectives
"(.+)ota$" = {
_MS_PT = $1ota
_FS_PT = $1ota
_MP_PT = $1otas
_FP_PT = $1otas
}
"(.+)ita$" = {
_MS_PT = $1ita
_FS_PT = $1ita
_MP_PT = $1itas
_FP_PT = $1itas
}
"(.+)ol$" = {
_MS_PT = $1ol
_FS_PT = $1ol
_MP_PT = $1óis
_FP_PT = $1óis
}
"(.+)i$" = {
_MS_PT = $1i
_FS_PT = $1i
_MP_PT = $1is
_FP_PT = $1is
}
"(.+)ia$" = {
_MS_PT = $1u
_FS_PT = $1ia
_MP_PT = $1us
_FP_PT = $1ias
}
"(.+)esa$" = {
_MS_PT = $1ês
_FS_PT = $1esa
_MP_PT = $1eses
_FP_PT = $1esas
}
"(.+)ola$" = {
_MS_PT = $1ol
_FS_PT = $1ola
_MP_PT = $1óis
_FP_PT = $1olas
}
"(.+)e$" = {
_MS_PT = $1e
_FS_PT = $1e
_MP_PT = $1es
_FP_PT = $1es
}
"(.+)mã$" = {
_MS_PT = $1mão
_FS_PT = $1mã
_MP_PT = $1mães
_FP_PT = $1mãs
}
"(.+)tã$" = {
_MS_PT = $1tão
_FS_PT = $1tã
_MP_PT = $1tões
_FP_PT = $1tãs
}
"(.+)ã$" = {
_MS_PT = $1ão
_FS_PT = $1ã
_MP_PT = $1ãos
_FP_PT = $1ãs
}
"(.+)a$" = {
_MS_PT = $1o
_FS_PT = $1a
_MP_PT = $1os
_FP_PT = $1as
}
#Fallback
"^(.+)$" = {
_MS_PT = $1
_FS_PT = $1
_MP_PT = $1's
_FP_PT = $1's
}
}