-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.cg3
546 lines (372 loc) · 17.6 KB
/
functions.cg3
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
#Distributed under the terms of the GNU General Public License version 2
# or any later version.
# ====================================================================== #
#!! S Y N T A C T I C F U N C T I O N S F O R (LANGUAGE NAME HERE)
# ====================================================================== #
# ====================================================================== #
#!! Sámi language technology project 2003-2014, University of Tromsø #
#!! This file adds syntactic functions. It was copied from sme.
# ========== #
# Delimiters #
# ========== #
DELIMITERS = "<.>" "<!>" "<?>" "<...>" "<¶>";
#PARENTHESES = "<$(>" "<$)>" "<$[>" "<$]>" "<${>" "<$}>" "<$«>" "<$»>" ;
# ============= #
# Tags and sets #
# ============= #
# ========
SETS
# ========
LIST BOS = (>>>) (<s>);
LIST EOS = (<<<) (</s>); # vislcg and CG-2 together.
# THIS TAGLIST SHOULD BE ADJUSTED TO fst/root.lexc and
# disambiguator.cg3 and dependency.cg3
LIST N = N ;
LIST V = V ;
LIST A = A ;
LIST Prop = Prop ;
LIST Adv = Adv ;
LIST Num = Num ;
LIST Arab = Arab ;
LIST CC = CC ;
LIST CS = CS ;
LIST Interj = Interj ;
LIST Abbr = Abbr ;
LIST ACR = ACR ;
LIST Pr = Pr ;
LIST Pron = Pron ;
LIST Pers = Pers ;
LIST Det = Det ;
LIST Dem = Dem ;
LIST Refl = Refl ;
LIST Recipr = Recipr ;
LIST Poss = Poss ;
LIST Interr = Interr ;
LIST Nom = Nom ;
LIST Acc = Acc ;
LIST Gen = Gen ;
LIST Dat = Dat ;
LIST Msc = Msc ;
LIST Fem = Fem ;
LIST Neu = Neu ;
LIST Sg = Sg ;
LIST Pl = Pl ;
LIST Def = Def ;
LIST Indef = Indef ;
LIST Cmp = Cmp ;
LIST Cmp/SplitR = Cmp/SplitR ;
LIST ABBR = ABBR ;
LIST Attr = Attr ;
LIST Ord = Ord ;
LIST Superl = Superl ;
LIST Prs = Prs ;
LIST Prt = Prt ;
LIST 1Sg = 1Sg ;
LIST 2Sg = 2Sg ;
LIST 3Sg = 3Sg ;
LIST Inf = Inf ;
LIST PrfPrc = PrfPrc ;
LIST PrsPrc = PrsPrc ;
LIST Ind = Ind ;
LIST Imp = Imp ;
LIST Sbj = Sbj ;
LIST Sup = Sup ;
LIST Cmpnd = Cmpnd ;
LIST CLB = CLB ;
LIST PUNCT = PUNCT ;
LIST LEFT = LEFT ;
LIST RIGHT = RIGHT ;
LIST Guess = Guess ;
LIST Sem/Fem = Sem/Fem ;
LIST Sem/Mal = Sem/Mal ;
LIST Sem/Plc = Sem/Plc ;
LIST Sem/Sur = Sem/Sur ;
LIST Sem/Org = Sem/Org ;
LIST Sem/Veh = Sem/Veh ;
LIST Sem/Adr = Sem/Adr ;
LIST Sem/Year = Sem/Year ;
LIST TAG = N V A Adv CC CS Interj Pr Pron Pers Det Refl Recipr Poss Nom Acc Gen
Dat Msc Fem Neu Sg Pl Def Indef Cmp Sup Prs Prt 1Sg 2Sg 3Sg Inf PrfPrc
PrsPrc Sup Imp CLB PUNCT LEFT RIGHT Sem/Fem Sem/Mal Sem/Plc Sem/Sur Sem/Org Sem/Veh Guess ;
LIST NAGD = Nom Acc Gen Dat ;
LIST AGD = Acc Gen Dat ;
LIST GENDER = Msc Fem Neu ;
LIST NUMBER = Sg Pl ;
LIST DEFNESS = Def Indef ;
LIST COMMA = "," ;
SET CRD = COMMA OR ("/") OR ("-") ; # TODO fix Trond sept 2019
# Sets
# ====
SET WORD = N | V | A | Pr | Pron | Det | Adv | CC | CS | Interj | Num | ("\?") ;
# Noun sets
SET NounMscFem = (N Msc) OR (N Fem) ;
SET NounMscNeu = (N Msc) OR (N Neu) ;
SET NounFemNeu = (N Fem) OR (N Neu) ;
SET MscFem = Msc OR Fem ;
SET MscNeu = Msc OR Neu ;
SET FemNeu = Fem OR Neu ;
LIST 3PERS = "hann" "hon" "tað" ;
# Adjective sets
SET REALADJ = A ;
# Nominal sets
LIST NOMINALHEAD = N Num Pers Refl Recipr "Pron Interr" "Pron Indef" ;
LIST NorA = N A ;
LIST PRENAGR = Det A ;
LIST MIDJA = "miðja" ; # in the middle of - construction. More N in here, also bottle constr.
SET NOT-ACC = TAG - Acc ;
# Verb sets
LIST COPULA = "vera" "verða" ;
LIST HAVA = "hava" ;
LIST MODV = "kunna" "láta" "skula" "vilja" "munna" "mega" ;
SET AUX = COPULA OR HAVA OR MODV ;
LIST VFIN = Prs Prt Imp Sbj ;
LIST INDSBJ = Ind Sbj ;
#LIST Ind = Prs Prt ;
LIST NONTHIRDV = 1Sg 2Sg 1Pl 2Pl ;
LIST VINFIN = Inf Sup PrfPrs PrsPrc ;
LIST DATV = "bjóða" "hýsa" "sleppa" "smakka" "takka" ; # "undirvísa"
# sleppa3 = sleppa manninum leysum
LIST DATPREPV = "liggja" "vera" "standa" "fiska" "vera"; # use only ACCPREPV
LIST ACCPREPV = "leggja" "fara" "renda" "koma" "liða" "seta" ;
LIST OBJPREDVERB = "kalla" "doypa" "nevna" "taka" ;
LIST MOVEMENTVERB = "koma" "koyra" ;
SET TV = V - COPULA - MODV ;
# Noun-Verb sets
LIST THIRDSG = Sg 3Sg ;
LIST THIRDPL = Sg 3Pl ;
LIST THIRD = Sg 3Sg Pl 3Pl ;
# Number sets
SET NUMBERS = Num - ("eitt") - ("1") ;
# Preposition sets
LIST ACCPREP = "aftan" "aftanvert" "ábeint" "áraka" "foruttan" "gjøgnum" "hóast" "inntil" "ígjøgnum" "íkring" "kring" "niðan" "oman" "síðan" "umframt" "umhvørvis" "umkring" "báðumegin" "hasumegin" "hvørgumegin" "høgrumegin" "sínumegin" "skeivumegin" "somumegin" "vinstrumegin" "øðrumegin" "eystan" "norðan" "sunnan" "sum" "vestan" ;
LIST DATPREP = "hjá" "með" "aftrat" "afturat" "afturímóti" "andstøðis" "andsýnis" "frá" "mótvegis" "nær" "sambært" "viðvíkjandi" "úr" ; # úr?
LIST ACCDATPREP = "í" "á" "undir" "yvir" "eftir" "fyri" "við" ;
LIST ACCGENPREP = "innan" "uttan" "millum" "til" "vegna" ;
LIST ACCDATGENPREP = "at" "av" "hjá" "móti" "um" "undan" "úr" ;
SET SOMEACCPREP = ACCPREP | ACCDATPREP | ACCGENPREP | ACCDATGENPREP ;
SET SOMEDATPREP = DATPREP | ACCDATPREP | ACCDATGENPREP ;
SET SOMEGENPREP = ACCGENPREP | ACCDATGENPREP ;
SET SOMEACCDATPREP = ACCDATPREP | ACCDATGENPREP ;
# Boundary sets
SET S-BOUNDARY = CS | Interr | (";") | (":") | BOS | EOS ;
SET S-BOUNDARY2 = CS | Interr | (";") | (":") | BOS | EOS | (@CVP) ;
# Complementary set
# Case sets
# Some case, but not...
SET NOTNOM = Dat | Gen | Acc ;
SET NOTDAT = Nom | Gen | Acc ;
SET NOTACC = Nom | Gen | Dat ;
SET NOTACCDAT = Nom | Gen ;
SET OBL = Acc | Dat | Gen ;
# Anything but the following case...
SET NOACC = WORD - Acc ;
SET NODAT = WORD - Dat ;
SET NOACCDAT = WORD - Acc - Dat ;
#SET NO
LIST COMMA = (",") ;
SET MARK = COMMA | ("\\") | ("\;") ; #"
LIST PUNCT-LEFT = (PUNCT LEFT) ;
LIST PUNCT-RIGHT = (PUNCT RIGHT) ;
#!! Syntactic sets
LIST <cs> = <cs> ; #!! * <cs> :
LIST @+FAUXV = @+FAUXV ; #!! * @+FAUXV : finite auxiliary verb
LIST @+FMAINV = @+FMAINV ; #!! * @+FMAINV : finite main verb
LIST @-F<OBJ = @-F<OBJ ; #!! * @-F<OBJ : Subject of infinite verb outside the verbal.
LIST @-F<SPRED = @-F<SPRED ; #!! * @-F<PRED : Predicative complement of infinite verb outside the verbal.
LIST @-FADVL = @-FADVL ; #!! * @-FADVL : Adverbial complement of infinite verb outside the verbal.
LIST @-FAUXV = @-FAUXV ; #!! * @-FAUXV : infinite auxiliary verb
LIST @-FMAINV = @-FMAINV ; #!! * @-FMAINV : infinite main verb
LIST @-FOBJ> = @-FOBJ> ; #!! * @-FOBJ> : Object of infinite verb outside the verbal.
LIST @-FSUBJ> = @-FSUBJ> ; #!! * @-FSUBJ> : Subject of infinite verb outside the verbal.
LIST @<ADVL = @<ADVL ; #!! * @<ADVL : Adverbial after the main verb.
LIST @<OBJ = @<OBJ ; #!! * @<OBJ : Object, the verb is to the left.
LIST @<OPRED = @<OPRED ; #!! * @<OPRED : Object predicative, the verb is to the left.
LIST @<SPRED = @<SPRED ; #!! * @<SPRED : Subject predicative, the verb is to the left.
LIST @<SUBJ = @<SUBJ ; #!! * @<SUBJ : Subject, the finite verb is to the left.
LIST @>A = @>A ; #!! * @>A : Modifier of an adjective to the right.
LIST @>ADVL = @>ADVL ; #!! * @>ADVL : Modifier of an adverbial to the right.
LIST @>N = @>N ; #!! * @>N : Modifier of a noun to the right.
LIST @>Num = @>Num ; #!! * @>Num : Attribute of numeral to the right.
LIST @>Pron = @>Pron ; #!! * @>Pron : Modifyer of pronoun to the right.
LIST @ADVL< = @ADVL< ; #!! * @ADVL< : Komplement for adverbial.
LIST @ADVL> = @ADVL> ; #!! * @ADVL> : Adverbial to the left of the main verb
LIST @ADVL>CS = @ADVL>CS ; #!! * @ADVL>CS : Adverbial modifying subjunction.
LIST @APP = @APP ; #!! * @APP : Apposition
LIST @APP-ADVL< = @APP-ADVL< ; #!! * @APP-ADVL< : Apposition to adverbial to the left.
LIST @APP-N< = @APP-N< ; #!! * @APP-N< : Apposition to noun to the left.
LIST @APP-Num< = @APP-Num< ; #!! * @APP-Num< : Apposition to numeral to the left.
LIST @APP-Pron< = @APP-Pron< ; #!! * @APP-Pron< : Apposition to pronoun to the left.
LIST @APP>Pron = @APP>Pron ; #!! * @APP>Pron : Apposition to noun to the right.
LIST @CMPND = @CMPND ; #!! * @CMPND
LIST @CNP = @CNP ; #!! * @CNP : Local conjunction or subjunction.
LIST @COMP-CS< = @COMP-CS< ; #!! * @COMP-CS< : Complement of subjunction.
LIST @CVP = @CVP ; #!! * @CVP : Conjunction or subjunction that conjoins finite verb phrases.
LIST @HNOUN = @HNOUN ; #!! * @HNOUN : Stray noun in sentence fragment.
LIST @INTERJ = @INTERJ ; #!! * @INTERJ : Interjection.
LIST @N< = @N< ; #!! * @N< : Complement of noun to the left.
LIST @Num< = @Num< ; #!! * @Num< : Complement of numeral to the left.
LIST @OBJ = @OBJ ; #!! * @OBJ : Object, the verb is not in the sentence (ellipse)
LIST @OBJ> = @OBJ> ; #!! * @OBJ> : Object, the verb is to the right.
LIST @OPRED = @OPRED ; #!! * @OPRED : Object predicative, the verb is not in the sentence (ellipse).
LIST @OPRED> = @OPRED> ; #!! * @OPRED> : Object predicative, the verb is to the right.
LIST @P< = @P< ; #!! * @P< : Complement of preposition.
LIST @PCLE = @PCLE ; #!! * @PCLE : Particle.
LIST @PPRED = @PPRED ; #!! * @PPRED : Predicative for predicative.
LIST @Pron< = @Pron< ; #!! * @Pron< : Complement of pronoun to the left.
LIST @SPRED = @SPRED ; #!! * @SPRED : Subject predicative, the verb is not in the sentence (ellipse).
LIST @SPRED<OBJ = @SPRED<OBJ ; #!! * @SPRED<OBJ : Object of an subsject predicative. (some adjectives are transitive)
LIST @SPRED> = @SPRED> ; #!! * @SPRED> : Subject predicative, the verb is to the left.
LIST @SUBJ = @SUBJ ; #!! * @SUBJ : Subject, the finite verb is not in the sentence (ellipse).
LIST @SUBJ> = @SUBJ> ; #!! * @SUBJ> : Subject, the finite verb is to the right.
LIST @VOC = @VOC ; #!! * @VOC : Vocative
LIST @X = @X ; #!! * @X : The function is unknown, e.g. because of that the word is unknown
LIST <OBJ = @-F<OBJ @<OBJ ;
LIST ADVL = @ADVL @ADVL> @ADVL< @<ADVL @>ADVL @-F<ADVL ;
LIST HAB-V-TAGS = Pl3 Sg3 ConNeg PrfPrc Inf ;
LIST OBJ> = @OBJ> @-FOBJ> ;
SET FAUXV = @-FAUXV OR @+FAUXV ;
SET FMAINV = @-FMAINV OR @+FMAINV OR (V @<OBJ) OR (V @N<) OR (V @A<) OR (V @<SUBJ) OR (V @<ADVL) ;
SET FOBJ = @-F<OBJ OR @-FOBJ> ;
SET OBJ = (@<OBJ) OR (@OBJ>) OR (@OBJ) OR (@-F<OBJ) OR (@-FOBJ>) ;
SET OPRED = @<OPRED OR @OPRED> OR @OPRED ;
SET SPRED = @<SPRED OR @SPRED> OR @SPRED ;
SET SUBJ = @<SUBJ OR @SUBJ> OR @SUBJ ;
SET SYN-V = V + SUBJ OR OBJ + V OR ADVL + V OR (V @N<) OR (V @A<) OR V + SPRED OR (V @COMP-CS<) ;
#!! * NP sets defined according to their morphosyntactic features
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#!! * The PRE-NP-HEAD family of sets
#!! These sets model noun phrases (NPs). The idea is to first define whatever can
#!! occur in front of the head of the NP, and thereafter negate that with the
#!! expression **WORD - premodifiers**.
SET PRE-NP-HEAD = (Prop Attr) OR (Prop @>N) OR A OR ABBR
OR (Pron Pers Gen) OR (N Gen) OR (A Gen) OR
Num OR Cmp/SplitR OR CC OR (Pron Dem) OR Pron + Refl + Gen OR
(PrfPrc @>N) OR PrsPrc OR (A Ord) OR (Num @>N) OR (A @>N) OR @>N OR @>A OR @>Pron OR @Num< OR (CC @CNP) OR (@>CC) OR (@Pron<) OR Det OR Num ;
# The strict version of items that can only be premodifiers, not parts of the predicate
#LIST PRE-NP-HEAD = @>N @>A @>Pron @Num< @CNP ;
SET PRE-NP-V = PrfPrc OR PrsPrc OR (Prs 3Sg) + Ind OR (Prs 1Sg) + Ind OR (Imprt 2Du) ;
# to be used together with PRE-NP-HEAD before @>N is disambiguated
SET NP-MEMBER = PRE-NP-HEAD OR N ;
SET PRE-A-N = (Pron Pers Gen) OR (Pron Pers Acc) OR (Pron Indef) OR Num OR (A Ord) OR (Pron Dem) OR Pron + Refl + Gen OR Pron + Refl + Acc ; # Acc pga av manglende disambiguering tidlig i fila
SET NOT-PRE-A-N = WORD - PRE-A-N ;
LIST PUNCT-LEFT = (PUNCT LEFT) ;
LIST PUNCT-RIGHT = (PUNCT RIGHT) ;
SET PRE-APP = COMMA OR PUNCT-LEFT OR PRE-NP-HEAD ;
# This set ist not only for what can
# stand in front of appositions but also
# postmodifiers.
#!! The set **NOT-NPMOD** is used to find barriers between NPs.
#!! Typical usage: ... (*1 N BARRIER NPT-NPMOD) ...
#!! meaning: Scan to the first noun, ignoring anything that can be
#!! part of the noun phrase of that noun (i.e., "scan to the next NP head")
SET NOT-NPMOD = WORD - PRE-NP-HEAD OR ABBR ;
# This is the previous NPNH (npnh) set.
# NOT-NPMOD = "NOT-PRE-NP-HEAD"
SET NOT-NPMOD-ACC = NOT-NPMOD - Acc OR ABBR ;
SET NOT-NPMOD-ACC-ADV = NOT-NPMOD - Acc - Adv OR ABBR ;
# To be used in mappingrules, before the disambuation of Acc and Gen.
SET NOT-NPMODADV = WORD - PRE-NP-HEAD - Adv ;
# NOT-NPMODADV = "NOT-PRE-NP-HEAD-OR-ADV"
SET NOT-NPMODADV-INDEF = WORD - PRE-NP-HEAD - Adv - Indef ;
## NOT-NPMODADVI = " ...-OR-INDEF"
SET NOT-NPMODADVII = WORD - PRE-NP-HEAD - Adv - Indef ;
# Illative indir.obj.
SET NOT-NPMODADVIIP = WORD - PRE-NP-HEAD - Adv - Indef ;
# <== is this our NOT-NPMOD set?
SET NOT-NPMODCC = WORD - PRE-NP-HEAD - COMMA - @CNP ;
SET NAPP = WORD - PRE-APP ;
#SET WORDMARK = WORD | MARK ;
#SET NPNH = WORDMARK - PRE-N ;
#SET NPNHA = WORDMARK - PRE-N - Adv ;
#SET NOT-ADV = WORDMARK - Adv - CC ; # adding CC
#SET NOT-PROP = WORDMARK - Prop - CC ;
#SET NOT-A = WORDMARK - A ;
#SET NOT-CC = WORDMARK - CC ;
#SET NOUNADJ = N | A ;
#SET NOT-NPMOD = NPNH ; # fix this 2019 sept Trond
#SET NP-MEMBER = PRE-N | N | Pron ;
#LIST N-SG-NOM = (N Sg Nom);
#SET HEAD-N = N - Cmp/SplitR ;
#SET HEAD-N-NOM = (N Nom) - Cmp/SplitR ;
#SET SUBJECTHEAD = N OR A OR Pron - Refl ; # These, can be subject heads
#SET HEAD-N = N - Cmp/SplitR ;
#SET HEAD-N-NOM = (N Nom) - Cmp/SplitR ;
#SET SUBJECTHEAD = N OR A OR Pron - Refl ; # These, can be subject heads
#SET NP = N OR A ; # anything that can take except numerals
#SET NP-HEAD = Pron OR HEAD-N ;
#SET NP-HEAD-SG = (Pron Sg) OR (N Sg) OR (A Sg) - Cmp/SplitR - Dem ;
#SET NP-HEAD-PL = (Pron Pl) OR (N Pl) OR (A Pl) - Cmp/SplitR - Dem ;
#SET NP-HEAD-SG-NOM = Pron + Sg + Nom OR (N Sg Nom) OR (A Sg Nom) - Cmp/SplitR ;
#SET NP-HEAD-PL-NOM = Pron + Pl + Nom OR (N Pl Nom) OR (A Pl Nom) - Cmp/SplitR ;
#SET NP-HEAD-NOM = NP-HEAD-SG-NOM OR NP-HEAD-PL-NOM ;
#SET NP-HEAD-ACC = (Pron Acc) OR (N Acc) OR (A Acc) - Cmp/SplitR ;
#SET NP-HEAD-GEN = (Pron Gen) OR (N Gen) OR (A Gen) - Cmp/SplitR ;
LIST TIME = "sunnudagur" ;
# Semantic sets
LIST ABSTRACT = "ráð" "byráð" ;
LIST BAREPLURALS = "barn" "fólk" "bygdafólk" "konufólk" ;
# these words are usually plurals when used alone. All countable neuters?
## Tú sært barn standa.
# @ me > mother: @me>, @>mother, @me>mother
# @ mother < me: @mother<, @<me, @mother<me
# Initials
# --------
LIST INITIAL = "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m"
"n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z"
"á" "æ" "ø" "å" "ö" "ä" ;
LIST CAP-INITIAL = "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M"
"N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z"
"Á" "Æ" "Ø" "Å" "Ö" "Ä" ;
LIST ALLSYNTAG = @+FAUXV @+FMAINV @-FAUXV @-FMAINV @-FSUBJ> @-FOBJ @-F<ADVL @-FADVL> @-F<SPRED @>A @>ADVL @ADVL< @<ADVL @ADVL> @ADVL @>N @APP @APP-N< @APP-Pron< @APP>Pron @APP-Num< @APP-ADVL< @VOC@CNP @CVP @P< @>P @HNOUN @INTERJ @Pron< @OBJ @OBJ> @<OBJ @OPRED @<OPRED @OPRED> @SPRED<OBJ @PCLE @COMP-CS< @N< @SPRED @<SPRED @SPRED> @PPRED @Num< @SUBJ @<SUBJ @SUBJ> @X ;
LIST HEAD = @SUBJ> @<SUBJ @SUBJ @OBJ @OBJ> @<OBJ @ADVL @ADVL> @<ADVL @SPRED> @<SPRED @SPRED @OPRED> @<OPRED @OPRED @-FSUBJ> @-FOBJ> @-FADVL> @-FSPRED> @-F<SUBJ @-F<OBJ @-F<ADVL @-F<SPRED ;
SECTION #
#!! * **ordHNOUN**
MAP:NumHNOUN (@HNOUN) TARGET (ord) (-1 BOS) ;
#$ 4. Álbmotskuvlla ja oahpaheaddjiseminára gaskasaš áigi.
MAP:fmv (@FMV) TARGET VFIN ;
MAP:subj (@SUBJ>) TARGET Nom IF (*1 VFIN);
MAP:spred (@<SPRED) TARGET N + Nom IF (*-1 ("vera") + VFIN BARRIER NOT-NPMOD);
MAP:npmod (@>N) TARGET Det OR A IF (0 (Det $$GENDER $$NUMBER $$NAGD $$DEFNESS))(1 (N $$GENDER $$NUMBER $$NAGD $$DEFNESS));
#MAP:npmod (@>N) TARGET Det IF (0 Det)(1 N);
MAP:qnpmod (@>N) TARGET Ord IF (0 Arab + Ord + Attr)(1 N);
## 29. mars
MAP:interj (@INTERJ) TARGET Interj ;
MAP:advl (@<ADVL) TARGET Pr IF (0 Pr LINK -1 VFIN);
MAP:advl (@ADVL) TARGET Pr ;
MAP:advl (@<ADVL) TARGET Adv IF (0 Adv LINK *-1 VFIN) ;
MAP:advl (@ADVL>) TARGET Adv IF (0 Adv LINK *1 VFIN) ;
MAP:p< (@P<) Gen (*-1 Pr BARRIER NOT-NPMOD)(NEGATE 1 Gen) ;
MAP:p< (@P<) Acc (*-1 Pr BARRIER NOT-NPMOD)(NEGATE 1 Acc) ;
MAP:p< (@P<) Dat (*-1 Pr BARRIER NOT-NPMOD)(NEGATE 1 Dat) ;
MAP:nump< (@P<) Num (-1 Pr)(0 Arab or Sem/Year);
MAP:p<coor (@P<) Gen (-1 CRD OR CC LINK -1 @P<) ;
MAP:p<coor (@P<) Acc (-1 CRD OR CC LINK -1 @P<) ;
MAP:p<coor (@P<) Dat (-1 CRD OR CC LINK -1 @P<) ;
MAP:n<titel1 (@N<) TARGET ("jr") OR ("sr") (-1 Prop) ;
#!! ## HNOUN MAPPING
MAP:hnounNom (@HNOUN) TARGET (N Nom) OR (Pron N) OR (Num Nom)
(NEGATE *0 V BARRIER (":"))(NEGATE *-1 PUNCT BARRIER (":") LINK -1 WORD)
;
MAP:hnounNom (@HNOUN) TARGET A OR (Num Nom) (*-1 BOS BARRIER WORD)(*1 EOS BARRIER WORD) ;
MAP:sur (@>N) TARGET Sem/Mal OR Sem/Fem IF (1 Sem/Sur);
MAP:HNOUN<advl (@<SPRED) TARGET Sem/Adr (-1 (":") LINK -1 Nom) ;
#$ Fiskes, rukses, alit, ruoná ja muđui buotlágaš ivnnit.
#$ Bargolávdegotti bargu: Álgobargu lei čielggadit min mandáhta.
MAP:year (@<ADVL) TARGET Sem/Year IF (*-1 VFIN) ;
MAP:year (@ADVL>) TARGET Sem/Year IF (*1 VFIN) ;
MAP:hnounInterj (@HNOUN) TARGET Acc IF (*-1 Interj BARRIER NOT-NPMOD) ;
#!! * **NInfheadliner**
MAP:NInfheadliner (@HNOUN) TARGET Nom (NEGATE 0 VFIN)(1 Inf LINK NEGATE *1 WORD) ;
#$ Áigi soabadit.
#!! * **Superlheadliner**
MAP:Superlheadliner (@HNOUN) TARGET Superl (NEGATE 0 VFIN)(*-1 BOS BARRIER WORD)(1 CS LINK 1 VFIN LINK NEGATE *1 VFIN) ;
#$ Stuorimus maid sáhttá oažžut.
MAP:hnum (@HNOUN) TARGET Num ;
#!! The leftovers are tagged @X
#!! ### **missingX** adds @X to all missings
MAP:missingX (@X) TARGET (?) ;
MAP:leftoversX (@X) TARGET WORD ;
REMOVE:nox (@X) ;
AFTER-SECTIONS
REMOVE:WORD WORD - ALLSYNTAG ;
#!! ### **therestX** adds @X to all what is left, often errouneus disambiguated forms