-
Notifications
You must be signed in to change notification settings - Fork 0
/
apertium-sme-nob.sme-nob.rtx
601 lines (492 loc) · 31.8 KB
/
apertium-sme-nob.sme-nob.rtx
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
! sme-nob.rtx
! Pick genders etc. from tl (and if not, from anaphoric referent), but don't fall back to sl:
SIDE_SOURCES = tl ref ;
!!!!!!!!!!!!!!!!!!!!!!!!!!
!! ATTRIBUTE CATEGORIES !!
!!!!!!!!!!!!!!!!!!!!!!!!!!
function = "@+FAUXV" "@+FAUXV" "@+FMAINV" "@-F←ADVL" "@-F←ADVL-ine" "@-F←ADVL-ela" "@-F←OBJ" "@-F←OPRED" "@-F←SUBJ" "@-FADVL→" "@-FAUXV" "@-FMAINV" "@-FOBJ→" "@-FSUBJ→" "@←ADVL" "@←ADVL-ela" "@←ADVL-ine" "@←OBJ" "@←OPRED" "@←PPRED" "@←SPRED" "@←SUBJ" "@→A" "@→ADVL" "@→CC" "@→N" "@→Num" "@→P" "@→Pron" "@A←" "@ADVL" "@ADVL←" "@ADVL→" "@ADVL-ela→" "@ADVL-ine→" "@ADVLcs-ela→" "@ADVLcs-ine→" "@ADVLqst-ela→" "@ADVLqst-ine→" "@ADVLhab→" "@←ADVLhab" "@←SUBJext" "@ADVL→CS" "@APP-ADVL←" "@APP-N←" "@APP-Pron←" "@CNP" "@COMP-CS←" "@CVP" "@HNOUN" "@INTERJ" "@N←" "@Num←" "@OBJ→" "@OPRED→" "@P←" "@PCLE" "@Pron←" "@SPRED←OBJ" "@SPRED→" "@SUBJ→" "@VOC" "@X" ;
number = sg pl du ; ! du just in case (?)
gender = f m nt un mf ;
defnes = (DD ind) def ind DD ;
comp = pst comp sup ;
sint = sint ;
prn_type = pers dem refl pos ; ! pos possessive
person = p1 p2 p3 ;
case = nom acc gen ill loc ess com ;
gramcase = nom acc gen ;
oblcase = acc gen ill loc ess ;
advlcase = ill loc ess ;
semtxt = sem_ani_build_hum_txt sem_ani_plc_txt sem_group_txt sem_mat_txt sem_money_txt sem_org_txt sem_plc_txt sem_prod-audio_txt sem_prod-cogn_txt sem_semcon_txt sem_txt ;
andretag = sem_hum ;
semtag = [semtxt] [andretag] ;
transitivity = tv iv ;
tense = pres pret imp ;
vbinfin = inf prfprc prsprc actio ; ! Linda/Daniel pp pprs
infl = [tense] [vbinfin] ;
conneg = conneg ;
npclass = ant org al top geo;
num = num ;
det_type = qnt emph dem itg pos ;
a_cmp = cmp cmp-split ;
a_split = cmp-split ;
a_hab = ←hab→ ;
! Begin Linda/Daniel definitions (to be integrated)
!inf = inf actio ; ! this is Linda & Daniel
pcp = pp pprs prfprc ;
finity = (FIN fin) inf actio pp prs pprs prfprc fin ;
derp = der_inchl der_passl der_passs ;
pass = pass ;
inch = inch ;
sep = sep ; !! separable stuff
fs = fs fm ; !! separable stuff
prntype = pers ind qnt itg dem pos rel;
!rtx ! vblex: _.tense ; ! This: vblex: _.infl ; where infl = [ense] [vbinfin] ;
! End Linda/Daniel definitions (to be integrated)
!!!!!!!!!!!!!!!!!!!!!!!
!! TAG-REWRITE RULES !!
!!!!!!!!!!!!!!!!!!!!!!!
!gender > gender : mf m ;
number > number : du pl ;
vbinfin > vbinfin : actio inf ;
conneg > person : conneg p3 ;
conneg > number : conneg sg ;
!!!!!!!!!!!!!!!!!!!!!
!! OUTPUT PATTERNS !!
!!!!!!!!!!!!!!!!!!!!!
n: _.gender.number.defnes;
np: _.npclass.gender;
adj_plain: _.sint.comp.gender.number.defnes;
adj: (always
1(adj_plain)[gender=(if (1.defnes = def or 1.number = pl) un
elif (1.gender = f or 1.gender = m) mf
else 1.gender),
number=(if (1.defnes = def) sp else 1.number)]);
adv: _;
num: <det>.det_type.gender.number.case ;
vblex: _.infl ;
post: _ ;
pr: _;
cnjcoo: _;
cnjsub: _;
part: _;
cm: _; ! comma
ij: _; ! interjection
prn_pos: _.<pos>.gender.number;
prn_detpos: <det>.<pos>.gender.number;
prn_oth: _.prn_type.person.gender.number.case ;
prn: (if (1.case/sl = gen) 1(prn_pos)
elif (1.pos_tag/tl = det) 1(prn_detpos)
else 1(prn_oth)) ;
NP: _.semtag.gender.number.case.defnes.a_split; ! NP needs semtag from below.
DP: _.gender.number.case.defnes.a_split;
QP: _;
PP: _ ;
PROPN: _; ! sjekk utan: .npclass.gender;
VP: _.infl.person ;
ADV: _;
AP: _.sint.comp.gender.number.defnes ;
S: _ ;
C: _; ! cnjcoo
PR: _; ! pr
det: _.det_type.gender.number ;
DET: _.gender.case.number.person;
!det: _.det_type.person.gender.number; ! sme-deu
det_pos: _.det_type.gender.number; ! sme-deu = det
! From sme-deu:
DET -> %prn.pers.*.gen."@→N" { %1(det_pos) } | ! Obs: list from sme-nob
%prn.pers.*.gen."@→A" { %1(det_pos) } |
%prn.pers.*.gen.*."@→N" { %1(det_pos) } |
%prn.pers.*.gen.*."@→A" { %1(det_pos) } |
%prn.ref.gen.*."@→N" { %1 } |
%prn.ref.gen.*."@→A" { %1 } |
%prn.ref.gen."@→N" { %1 } |
%prn.ref.gen."@→A" { %1 } |
%prn.dem.*."@→N" { %1 } |
%prn.dem.*."@→A" { %1 } |
%prn.ind.*."@→N" { %1 } |
%prn.ind.*."@→A" { %1 } |
%prn.itg.*."@→N" { %1 } |
%prn.itg.*."@→A" { %1 } |
%prn.ind."@→N" { %1 } |
%prn.ind."@→A" { %1 } |
%det { %1 } ;
! Mun oainnán girjji -> Jeg ser *ei* bok
! Mun oainnán stuorra girjjiid rukses viesu duohken.
! -> Jeg ser store bøker bak *det* røde huset.
has_adj = yes no ;
!!!!!!!!!!!!
!! MACROS !!
!!!!!!!!!!!!
maybe_det: (if (1.defnes = def and 1.number = sg and 1.has_adj = yes)
[ den@det.dem.[1.gender].sg _ ]
elif (1.defnes = ind and 1.number = sg)
[ en@det.qnt.[1.gender].sg _ ]
elif (1.defnes = ind and 1.number/tl = sg and 1.case/sl = acc)
[ en@det.qnt.[1.gender].sg _ ]
else []
) ;
! <def-attr n="has_adj"><attr-item n="yes"/><attr-item n="no"/></def-attr>
! FROM SME-DEU:
!maybe_art: (if (1.number = sg)
! (if (1.def = def)
! (if (1.case = com) [der@det.def.[1.gender].sg.dat _]
! elif (1.case = ill) [der@det.def.[1.gender].sg.acc _]
! elif (1.case = loc) [der@det.def.[1.gender].sg.dat _]
! elif (1.case = ess) [der@det.def.[1.gender].sg.nom _]
! else [der@det.def.[1.gender].sg.[1.case] _ ])
! else
! (if (1.negativity = neg)
! (if (1.case = com) [kein@det.ind.[1.gender].sg.dat _]
! elif (1.case = ill) [kein@det.ind.[1.gender].sg.acc _]
! elif (1.case = loc) [kein@det.ind.[1.gender].sg.dat _]
! elif (1.case = ess) [kein@det.ind.[1.gender].sg.nom _]
! else [kein@det.ind.[1.gender].sg.[1.case] _ ])
! else
! (if (1.case = com) [ein@det.ind.[1.gender].sg.dat _]
! elif (1.case = ill) [ein@det.ind.[1.gender].sg.acc _]
! elif (1.case = loc) [ein@det.ind.[1.gender].sg.dat _]
! elif (1.case = ess) [ein@det.ind.[1.gender].sg.nom _]
! else [ein@det.ind.[1.gender].sg.[1.case] _ ])
! )
! )
! else
! (if (1.def = def)
! (if (1.case = com) [der@det.def.mfn.pl.dat _]
! elif (1.case = ill) [der@det.def.mfn.pl.acc _]
! elif (1.case = loc) [der@det.def.mfn.pl.dat _]
! elif (1.case = ess) [der@det.def.mfn.pl.nom _]
! else [der@det.def.mfn.pl.[1.case] _])
! else
! (if (1.negativity = neg)
! (if (1.case = com) [kein@det.ind.[1.gender].sg.dat _]
! elif (1.case = ill) [kein@det.ind.[1.gender].sg.acc _]
! elif (1.case = loc) [kein@det.ind.[1.gender].sg.dat _]
! elif (1.case = ess) [kein@det.ind.[1.gender].sg.nom _]
! else [kein@det.ind.[1.gender].sg.[1.case] _ ])
! else []
! )
! )
! );
maybe_adp: (if (1.case = loc) [i@pr.dat _]
elif (1.case = ill) [i@pr.acc _]
elif (1.case = com) [med@pr.dat _]
elif (1.case = ess) [som@pr.nom _] !! als?
else []) ;
maybe_possessive: (if (1.poss = px1sg) [min@det.pos.m.sg.[1.case] _]
elif (1.poss = px2sg) [din@det.pos.m.sg.[1.case] _]
elif (1.poss = px3sg) [hans@det.pos.m.sg.[1.case] _] ! hennes
elif (1.poss = px1du) [vår@det.pos.m.sg.[1.case] _]
elif (1.poss = px2du) [deres@det.pos.m.sg.[1.case] _]
elif (1.poss = px3du) [deres@det.pos.m.sg.[1.case] _]
else []) ;
pro_undrop: (if (1.number = sg)
(if (1.person = p1) [jeg@prn.pers.p1.mf.sg.nom _]
elif (1.person = p2) [du@prn.pers.p2.mf.sg.nom _]
elif (1.person = p3) [] !! no undrop 3.sg?
else [$$expletive _])
elif (1.number = pl)
(if (1.person = p1) [vi@prn.pers.p1.mf.pl.nom _]
elif (1.person = p2) [dere@prn.pers.p2.mf.pl.nom _]
elif (1.person = p3) [] !! no undrop 3pl? [sie@prn.pers.p3.mf.pl.nom _]
else [$$expletive _])
elif (1.number = du)
(if (1.person = p1) [vi@prn.pers.p1.mf.pl.nom _ beide@det.ind.mfn.pl.nom _]
elif (1.person = p2) [dere@prn.pers.p2.mf.pl.nom _ beide@det.ind.mfn.pl.nom _]
elif (1.person = p3) [de@prn.pers.p3.mf.pl.nom _ beide@det.ind.mfn.pl.nom _]
else [$$expletive _])
else [$$expletive _]) ;
pro3_undrop: (if (1.number = sg and 1.person = p3) [det@prn.pers.p3.nt.sg.nom _]
else []) ;
maybe_nicht: (if (1.negativity = neg) [ingen@adv _]
else []) ;
measr_time_to_adj: (if (1.lem/tl = Jahr) jährig@adj.sint.[1.gender].sg.nom.sw
else [1(n) ig@adj]) ;
!! split pos generation fucntions
! Denne på vent
! adj: (if (1.depfunc = "@←SPRED") 1(adj_pred)[adj_type=pred]
! elif (1.depfunc = "@←OPRED") 1(adj_pred)[adj_type=pred]
! else 1(adj) ! adj_agr
! ) ;
! Denne på vent
!vblex_simple: (if (1.finity = inf) 1(vblex_inf)
! elif (1.finity = actio) 1(vblex_inf)[inf=inf] ! probably not ideal
! elif (1.pcp = pp) 1(vblex_pp)
! elif (1.pcp = prfprc) 1(vblex_pp) ! probably not ideal
! elif (1.pcp = pprs) 1(vblex_pp)
! else 1(vblex_fin) ) ;
! Denne på vent
!vblex: (if (1.pass = pass)
! [ 1(vblex_simple)[pos_tag=vaux,lem=werden] _ 1(vblex_pp)[pcp=pp] ]
! elif (1.inch = inch)
! [ 1(vblex_simple)[lem=anfangen] _ zu@pr _ 1(vblex_simple)[finity=inf,inf=inf] ]
! else 1(vblex_simple)) ;
! denne på vent
! num: (if (1.numtype = arab) 1(num_digit)
! elif (1.numtype = ord) 1(num_ord)
! else 1(num_card) ) ;
!!!!!!!!!!!!!!!!!!!!!
!! REDUCTION RULES !!
!!!!!!!!!!!!!!!!!!!!!
det -> %det.* {1};
AP -> "adj" 1: %adj {%1}
| "adv - adj" 3: adv %adj { 1 _ %2}
| "adj - C - adj" 3: adj C %adj { %1 _ 2 _ %3}
;
ADV -> adv {1};
PROPN -> %np.* {%1} ; ! remove number and case
QP -> "QP qnt" 8: %num {%1[det_type=qnt,gender=un,case=""]} ;
NP -> 1: %QP n.*.sg.gen {%1[defnes=ind] _ 2[number=pl, defnes=ind]}
| 5: %QP AP n.*.sg.acc {%1[defnes=ind] _ 2[number=pl] _ 3[number=pl, defnes=ind]}
| 1: %QP adj adj n.*.sg.gen {%1[defnes=ind] _ 2[number=pl] _ 3[number=pl] _ 4[number=pl, defnes=ind]}
| "poss NP" 1: %prn.pers.*.gen n { %1 _ 2 } ! xxx undefined pl ???
! |
! ;
! NP -> "maybe_det n" 1: %n {1(maybe_det)[defnes=$defnes,has_adj=no] %1} ! kanskje sett inn «en/ei»
! | "maybe_det acc" 3: %n.*.acc {1(maybe_det)[defnes=ind,has_adj=no] %1}
! NP -> "maybe_det n" 1: %n { %1} ! kanskje sett inn «en/ei»
| "maybe_det n" 1: %n { %1} ! kanskje sett inn «en/ei» ! slå saman
| "maybe_det acc" 3: %n.*.acc { %1}
| "adj n" 2: adj %n [$defnes=ind] { 2(maybe_det)[defnes=$defnes,has_adj=yes] 1[number=2.number,gender=2.gender,defnes=$defnes] _ %2} !to VP?
! | "poss1 n" 3: prn.pers.p1.*.gen [if 2[gender
!
! %n { 2[defnes=def] _ 1
!
!
| "poss1 n" 3: prn.pers.p1.*.gen %n { 2[defnes=def] _ min@det.pos.nt.sg}
| "poss2 n" 3: prn.pers.p2.sg.gen %n { 2[defnes=def] _ din@det.pos}
| "poss3 n" 3: prn.pers.p3.sg.gen %n { 2[defnes=def] _ hans@det.pos.m.sg}
| "poss3pl n" 3: prn.pers.p3.pl.gen %n { 2[defnes=def] _ hans@det.pos.m.sg}
| "det n" 2: det %n [$defnes=ind] { 1 _ 2 }
| "prop" 4: %PROPN { %1 }
| "prn gender" 5: %prn [$gender=(if (1.prn_type = pers and 1.person = p1 and 1.number = sg) mf
elif (1.prn_type = pers and 1.person = p2 and 1.number = sg) mf
elif (1.prn_type = pers and 1.number = pl ) un
elif (1.prn_type = pers and 1.number = du ) un
else m)] { %1 }
;
! NP1.gen NP2 > NP2 av NP1 ! girjji kopiija > en kopi av boka
C -> cnjcoo {1}
| cnjsub {1}
;
ess_i = "tillegg" "skumring" "regn" "tåke" ;
ess_på = "besøk" ;
ess_til = "aske" "grunn" "nytte" ;
ill_i = "arrest" "bruk" "del" "do" "fengsel" "forord" "gang" "tale" ;
ill_på = "ferie" "golv" "måte" "plass" "utveksling" ;
loc_av = "rein" "slekt" ;
loc_etter = "oppfatning" "mening" "syn" ;
loc_fra = "ønske" ;
loc_i = "Guovdageainnu suohkan" "NSR" "Nilut Cup" "Nord-Norge" "Norge" "USA" "administrasjon" "akkusativ" "alder" "alkoholrus" "allmenning" "analyse" "april" "arbeid" "arrest" "august" "avgrensning" "avsnitt" "avtale" "balanse" "barnehage" "barnehagetilbud" "barnevern" "bedrift" "befolkning" "begrep" "begynnelse" "besittelse" "biltrafikk" "bilulykke" "blod" "bok" "brann" "brev" "bruk" "bryting" "budsjett" "by" "bygd" "debatt" "departement" "desember" "dialog" "distrikt" "divisjon" "dokument" "dråpe" "eksempel" "enkeltsak" "erklæring" "essiv" "etableringsfase" "ettertid" "fag" "fagkrets" "faksimile" "fattigdom" "februar" "fellesskap" "fengsel" "film" "finale" "fiske" "fjord" "fjøs" "flaske" "flerspråklighet" "flertall" "flokk" "fond" "forbindelse" "form" "forord" "forskning" "forskrift" "forslag" "forvaltning" "forvaltningslov" "forvaltningsområde" "fosterhjem" "framtid" "frykt" "fylke" "fylkeskommune" "førskolealder" "første omgang" "gamme" "gang" "genitiv" "gjennomføring" "grunnform" "grunnskole" "grunnskolealder" "gruppe" "hage" "handlingsplan" "helsetjeneste" "hemmelighet" "historie" "hovedsak" "hjerte" "hus" "husstand" "hverdag" "idiolekt" "idrett" "illativ" "innstilling" "jakt" "januar" "jordbruk" "jordbruksarbeid" "juli" "juni" "kamp" "kapittel" "kirke" "klasse" "klasserom" "komité" "komítativ" "kommune" "kommunikasjon" "konvensjon" "kondisjonalis" "konjunktiv" "korpus" "kraft" "krav" "krets" "kristendom" "krukke" "kulde" "kultur" "kulturantropologi" "kulturminnelov" "kunst" "land" "landbruk" "lavvo" "ledelse" "ledelse" "lesing" "liv" "live" "lokalmiljø" "lokalsamfunn" "lokativ" "lov" "lovverk" "lys" "læreplan" "læreplanverk" "lærerutdanning" "mai" "maktposisjon" "mandat" "manntall" "mars" "matematikk" "medisin" "melding" "mellomrom" "meningsmåling" "mindretall" "mobiltelefon" "motvind" "mørke" "natur" "naturfag" "naust" "navn" "nominasjon" "nominativ" "nord" "nordområde" "november" "næring" "nærmiljø" "offentlighet" "oktober" "område" "omsorgsbolig" "oppfølging" "opplæring" "organisasjon" "paragraf" "partitiv" "pedagogikk" "periode" "perspektiv" "plan" "planarbeid" "plenum" "posisjon" "potesialis" "praksis" "presens" "preteritum" "prinsipp" "produksjon" "program" "proposisjon" "prosent" "prosess" "prosjekt" "prosjektperiode" "prosjektstønad" "protokoll" "rapport" "regjering" "region" "reindrift" "reindriftslov" "relasjon" "retningslinje" "rom" "rovdyrsak" "rus" "rør" "røving" "råd" "sak" "samarbeid" "samarbeidsavtale" "samband" "samelov" "sametingsråd" "samfunn" "samfunnsplanlegging" "samhandling" "samisk språk" "sammenheng" "samtale" "sending" "seng" "sentrum" "september" "serie" "seriefotball" "siida" "sjanger" "skap" "skimesterskap" "skirenn" "skriveopplæring" "skolealder" "skoleverk" "skuff" "speil" "spesialpedagogikk" "spill" "sak" "stat" "statsbudsjett" "statsråd" "stilling" "stillingskode" "storsamfunn" "stortingsmelding" "strid" "studie" "studium" "styre" "stue" "sum" "system" "søknad" "sør" "tabell" "tekst" "telefon" "teori" "tet" "tillegg" "tidsrom" "torvgamme" "trafikk" "trygghet" "tvil" "ulykke" "undervisning" "urfolkssak" "utdanning" "utdanning" "utdanningssak" "utgangspunkt" "utkast" "utmark" "utland" "utredning" "utvalg" "utvikling" "valgprogram" "valgår" "vask" "vedtak" "vegkant" "verden" "vest" "vidde" "vielse" "virkeområde" "vind" "virkelighet" "virksomhet" "votering" "år" "årsmelding" ;
loc_om = "kveld" "dag" "morgen" "minne" "natt" "tema" ;
loc_på = "Andøya" "Bygdøy" "Cuba" "Fagseminar for samisk statistikk" "Filippinene" "Gjøvik" "Grønland" "Hamar" "Hidra" "Hispaniola" "Hitra" "Hovedøya" "Island" "Kautokeino bygdetun" "Kola" "Komsa" "Kreta" "Kvaløya" "Kvaløysletta" "Lille Komsa" "Lillehammer" "Madagaskar" "Márkomeannu festivála" "Porsangmoen" "Ráisduottarháldi" "Sameskolen" "Samisk høgskole" "Sennalandet" "Sicilia" "Statnett" "Svalbard" "Sørøya" "Twitter" "UiT" "Varangerhalvøya" "Vestlandet" "Haldi" "arbeidsplass" "bachelornivå" "bilde" "bygdetun" "dag" "dato" "deltid" "fakultet" "fest" "festival" "fotballkamp" "fredag" "gårdsplass" "heltid" "hjemmebane" "hjemmeside" "hotell" "høyskole" "kino" "kinokveld" "kjøkken" "kort tid" "kveld" "kyst" "liste" "lørdag" "mandag" "marked" "møte" "nivå" "onsdag" "papir" "parkeringsplass" "plass" "sameskole" "scene" "side" "skole" "slette" "sted" "sykehjem" "sykehus" "søndag" "tall" "tirsdag" "topp" "torsdag" "tun" "universitet" "vegg" "Østlandet" "øy" ;
loc_per = "person" ;
loc_som = "verdi" ;
loc_ved = "makt" ;
noun_pseudo_prop = "april" "asyl" "august" "bachelornivå" "bestefar" "bestemor" "deltid" "desember" "doktorgrad" "downs syndrom" "duodji" "far" "februar" "fokus" "fredag" "gang" "giellasiida" "godkjenning" "grad" "gras" "gud" "gymnastikk" "heltid" "hjelp" "januar" "julaften" "juli" "juni" "junior" "kildinsamisk" "kofte" "kunst" "langfredag" "legesjekk" "lulesamisk" "lunsj" "lykke" "lørdag" "mai" "mandag" "mars" "mat" "merverdiavgift" "midnatt" "moms" "mor" "naturfag" "nivå" "nordsamisk" "november" "null" "oktober" "onsdag" "pop" "påskeaften" "raushet" "reinlav" "rektor" "rikdom" "rus" "samisk" "samiskhet" "senior" "sentrum" "september" "skjærtorsdag" "støtte" "søndag" "sørsamisk" "taekwondo" "takk" "tid" "tirsdag" "torsdag" "trygghet" "twitter" "vare" "velkommen" "verden" "viten" "yrkesfag" ;
PP -> "postp" 2: NP %post {2 _ 1[defnes=(if (1.lem in_caseless noun_pseudo_prop) ind else def)]}
| "prep" 1: pr NP {1 _ 2[defnes=(if (1.lem in_caseless noun_pseudo_prop) ind else def)]}
| "loc i" 5: [loc_i]@NP.*.loc { i@pr _ %1[defnes=(if (1.lem in_caseless noun_pseudo_prop) ind else def)]}
| "loc etter" 5: [loc_etter]@NP.*.loc {etter@pr _ %1[defnes=(if (1.lem in_caseless noun_pseudo_prop) ind else def)]}
| "loc om" 5: [loc_om]@NP.*.loc { om@pr _ %1[defnes=(if (1.lem in_caseless noun_pseudo_prop) ind else def)]}
| "loc per" 5: [loc_per]@NP.*.loc {per@pr _ %1[defnes=ind]}
| "loc som" 5: [loc_som]@NP.*.loc {som@pr _ %1[defnes=ind]}
| "loc på" 5: NP.*.loc { på@pr _ %1[defnes=(if (1.lem in_caseless noun_pseudo_prop) ind else def)]}
| "ill i" 5: NP.*.[semtxt].*.ill { i@pr _ %1[defnes=(if (1.lem in_caseless noun_pseudo_prop) ind else def)]}
| "ill på" 6: num %NP.*.ill {på@pr _ 1[case=""] _ %2[defnes=ind,number=pl]}
| "ill til" 6: prn.*.ill {til@pr _ %1[case = acc]}
| "ill til" 5: NP.*.ill {til@pr _ %1[defnes=(if (1.lem in_caseless noun_pseudo_prop) ind else def)]}
| "ess som" 5: NP.*.ess {som@pr _ %1[defnes=(if (1.lem in_caseless noun_pseudo_prop) ind else def)]}
| "com med" 5: NP.*.com {med@pr _ %1[defnes=(if (1.lem in_caseless noun_pseudo_prop) ind else def)]}
;
!NP -> %NP cnjcoo NP {1 _ 2 _ 3 } ;
!! Verb phrase
! Verbs demanding oblique complements
acc_om_verb = "be" "drømme" ; ! i VP-regelen?
ill_av_verb = "bealkkáhallat" "borahallat" "bovttáhallat" "cábmohallat" "cápmahallat" "dolkat" "dorohallat" "fillehallat" "gáskkáhallat" "gávnnahallat" "oainnahallat" "oainnahallat" "rissehallat" "vuojáhallat" ;
ill_for_verb = "leat" "láhčit" "mearkkašit" "čiegadit" ;
ill_i_verb = "ásahit" "bisánit" "bálkestit" "coggat" "investeret" "nahkehit" "oassálastit" "čiekŋudit" "čoahkkanit" "čuollat" "čuolastit" ;
ill_med_verb = "duhtat" "oahpásmuvvat" ;
ill_på_verb = "báhcit" "dorvvastit" "geahččat" "guovlat" "jáhkkit" "luohttit" "reageret" "searvat" "suhttat" "čoalkalit" "čáhkadit" ;
loc_for_verb = "nohkkot" "váruhit" ;
loc_fra_verb = "beassat" "boahtit" "earuhit" "fárret" "gáidat" ;
loc_om_verb = "beroštit" ;
loc_som_verb = "beroštit" ;
! Case governed bŧ previous N
gen_av_head = "evaluering" "forfatter" "forskning" "kopi" "leder" "vurdering" ;
gen_for_head = "basis" "forening" "fundament" "grunnlag" "senter" "sjef" "søknadsfrist" ;
gen_i_head = "2018" "opplæring" "undervisning" "vårsemester" ;
gen_om_head = "fortelling" "sang" ;
gen_på_head = "måte" ;
gen_som_head = "masterutdanning" ;
ill_for_head = "behov" "forskningsgruppe" "interesse" "plan" "senter" ;
ill_i_head = "progresjon" ;
ill_på_head = "dagskvote" "innflytelse" "påvirkning" "sesongkvote" "syn" "tro" ;
loc_av_head = "NUMERAL" "del" "flertall" "halvpart" "mindretall" "resultat" "sammendrag" ;
loc_etter_head = "mening" "oppfatning" ;
loc_for_head = "DATE" "frykt" "glad" "redd" "tema" ;
loc_fra_head = "ønske" "lykkeønskning" "hilsning" "kondolanse" ;
loc_i_head = "infeksjon" ;
loc_om_head = "artikkel" "avtale" "bok" "kontrakt" "snakk" "tale" ;
cond_NIL_verb = "berret" "dáhttut" "dáidit" "fertet" "galgat" "háliidit" "máhttit" "soaitit" "sáhttit" "veadjit" "áigut" ;
VP -> "enkeltverb" 1: %vblex {%1[person=""] }
| "enkeltverb" 2: %vblex.*.actio.ess {1[infl=inf] }
| "ikke" 10: %ii@vblex.iv.neg vblex.*.conneg {2[person=1.person,conneg=""] _ ikke@adv[tense="",person=""]} ! neg person
| "ikke" 10: %ii@vblex.iv.neg vblex.*.conneg VP {%2[infl=pres] _ ikke@adv[tense="",person=""] _ 3 }
| "ikke" 11: %ii@vblex.iv.neg ","@cm {nei@ij 2 }
| "V inf" 3: %[cond_NIL_verb]@vblex vblex.*.inf {%1 _ 2}
| "V inf NP" 3: %[cond_NIL_verb]@vblex vblex.*.inf PP {%1 _ 2 _ 3}
| "V inf NP" 3: %[cond_NIL_verb]@vblex vblex.*.inf NP {%1 _ 2 _ 3}
| "V å inf" 2: %vblex vblex.*.inf {%1 _ å@part _ 2}
| "V å inf NP" 2: %vblex vblex.*.inf PP {%1 _ å@part _ 2 _ 3}
| "V å inf NP" 2: %vblex vblex.*.inf NP {%1 _ å@part _ 2 _ 3}
| "V PP" 6: %vblex PP {%1 _ %2}
| "V NP PP" 2: %vblex vblex.*.prfprc {%1 _ 2}
| "V NP PP" 3: %vblex NP PP {%1 _ 2 _ 3}
| "V NP.ind" 4: %vblex NP.*.gramcase {%1 _ 2[defnes=ind] }
| "V NP PP" 3: %vblex NP PP {%1 _ 2[defnes=ind] _ 3}
| "V adj" 1: %leat@vblex adj {%1 _ 2[gender=nt]}
| "V adj" 2: %leat@vblex adv adj {%1 _ 2 _ 3[gender=nt]}
! | "V NP.ind" 5: %leat@vblex NP.*.sg { 1 _ en@det.qnt.[$gender=2.gender].sg _ 2[defnes=ind] } ! gender fro NP!
! Verbs with oblique complements
| "acc_om_verb" 2: %[acc_om_verb]@vblex NP.*.acc { %1 _ om@pr _ 2[defnes=def] }
| "ill_av_verb" 2: %[ill_av_verb]@vblex NP.*.ill { %1 _ av@pr _ 2[defnes=def] }
| "ill_i_verb" 2: %[ill_i_verb]@vblex NP.*.ill { %1 _ i@pr _ 2[defnes=def] }
| "ill_for_verb" 2: %[ill_for_verb]@vblex NP.*.ill { %1 _ for@pr _ 2[defnes=def] }
| "ill_med_verb" 2: %[ill_med_verb]@vblex NP.*.ill { %1 _ med@pr _ 2[defnes=def] }
| "ill_på_verb" 2: %[ill_på_verb]@vblex NP.*.ill { %1 _ på@pr _ 2[defnes=def] }
| "loc_for_verb" 2: %[loc_for_verb]@vblex NP.*.loc { %1 _ for@pr _ 2[defnes=def] }
| "loc_fra_verb" 2: %[loc_fra_verb]@vblex NP.*.loc { %1 _ fra@pr _ 2[defnes=def] }
| "loc_om_verb" 2: %[loc_om_verb]@vblex NP.*.loc { %1 _ om@pr _ 2[defnes=def] }
| "loc_som_verb" 2: %[loc_som_verb]@vblex NP.*.loc { %1 _ som@pr _ 2[defnes=def] }
| "ill_for_verb" 4: %[ill_for_verb]@vblex AP NP.*.ill { %1 _ 2 _ for@pr _ 3[defnes=def] } !TODO: Jeg betyr for den mye byen.
| "gen_av_head" 3: %vblex NP.*.gen [gen_av_head]@NP { %1 _ 3 _ av@pr _ 2[defnes=def] }
| "gen_for_head" 3: %vblex NP.*.gen [gen_for_head]@NP { %1 _ 3 _ for@pr _ 2[defnes=def] }
| "gen_i_head" 3: %vblex NP.*.gen [gen_i_head]@NP { %1 _ 3 _ i@pr _ 2[defnes=def] }
| "gen_om_head" 3: %vblex NP.*.gen [gen_om_head]@NP { %1 _ 3 _ om@pr _ 2[defnes=def] }
| "gen_på_head" 3: %vblex NP.*.gen [gen_på_head]@NP { %1 _ 3 _ på@pr _ 2[defnes=def] }
| "gen_som_head" 3: %vblex NP.*.gen [gen_som_head]@NP { %1 _ 3 _ som@pr _ 2[defnes=def] }
! NP1 NP2.ill > NP1 for NP2 infekšuvdna gieđas > infeksjon i hånda
| "ill_for_head" 3: %vblex [ill_for_head]@NP NP.*.ill { %1 _ 2 _ for@pr _ 3[defnes=def] }
| "ill_i_head" 3: %vblex [ill_i_head]@NP NP.*.ill { %1 _ 2 _ i@pr _ 3[defnes=def] }
| "ill_på_head" 3: %vblex [ill_på_head]@NP NP.*.ill { %1 _ 2 _ på@pr _ 3[defnes=def] }
| "loc_av_head" 3: %vblex [loc_av_head]@NP NP.*.loc { %1 _ 2 _ av@pr _ 3[defnes=def] }
| "loc_etter_head" 3: %vblex [loc_etter_head]@NP NP.*.loc { %1 _ 2 _ etter@pr _ 3[defnes=def] }
| "loc_for_head" 3: %vblex [loc_for_head]@NP NP.*.loc { %1 _ 2 _ for@pr _ 3[defnes=def] }
| "loc_fra_head" 3: %vblex [loc_fra_head]@NP NP.*.loc { %1 _ 2 _ fra@pr _ 3[defnes=def] }
| "loc_i_head" 3: %vblex [loc_i_head]@NP NP.*.loc { %1 _ 2 _ i@pr _ 3[defnes=def] }
| "loc_om_head" 3: %vblex [loc_om_head]@NP NP.*.loc { %1 _ 2 _ om@pr _ 3[defnes=def] }
| "VP_ADVP" 1: %VP ADV {%1 _ 2}
! | "VP_PP" 1: VP PP {1 _ 2}
;
! | "V VP" 4: %[cond_NIL_verb]@vblex VP {%1 _ 2}
!"maybe_det n" 1: %n {1(maybe_det)[defnes=$defnes,has_adj=no] %1} ! kanskje sett inn «en/ei»
! | "maybe_det acc" 3: %n.*.acc {1(maybe_det)[defnes=ind,has_adj=no] %1}
! | "maybe_det adj n" 2: adj %n [$defnes=ind] { 2(maybe_det)[defnes=$defnes,has_adj=yes] 1[number=2.number,gender=2.gender,defnes=$defnes] _ %2} !to VP?
! | "" 4: adj %n.*.nom {den@det.dem.m.sg[lemcase=1.lemcase] _ 1[defnes=def, lemcase=2.lemcase] _ %2[defnes=def,has_adj=no]} Move to VP
! | 3: %n.*.nom {%1[defnes=ind,has_adj=no]}
! | 3: %n.*.[advlcase] {%1[defnes=def,has_adj=no]}
! ! VP -> vblex.tv NP { 1 _ 2[defnes=ind] } ; ! Trond
S -> "S np vp" 9: NP %VP { 1[defnes=def] _ %2 }
! | "S np vp vp" 9: NP %VP VP { 1[defnes=def] _ %2 _ 3 }
| "S np cop a" 4: NP leat@vblex.* adj { 1[defnes=def] _ 2 _ 3[gender=1.gender/tl] }
| "S np cop NP a" 5: NP leat@vblex.* NP adj { 1[defnes=def] _ 2 _ 3 _ 4[gender=1.gender/tl] }
| "S pp cop a" 5: PP leat@vblex.* adj { 1[defnes=def] _ 2 _ den@prn.pers.p3.nt.sg.nom _ 3[gender=nt] }
| "S adv cop a" 5: ADV leat@vblex.* adj { 1[defnes=def] _ 2 _ den@prn.pers.p3.nt.sg.nom _ 3[gender=nt] }
| "S NP cop NP " 10: NP.*.nom %leat@vblex.* NP.*.nom { 1 _ %2 _ 3[defnes=ind] }
| "S adv cop NP.ind" 7: ADV %leat@vblex NP.*.sg.nom { 1 _ 2 _ den@prn.pers.p3.nt.sg.nom _ 3[defnes=ind] } ! gender fro NP!
| "S adv cop a" 5: ADV leat@vblex.* adj { 1[defnes=def] _ 2 _ den@prn.pers.p3.nt.sg.nom _ 3[gender=nt] }
| "S adv cop ap" 9: ADV leat@vblex.* adv adj { 1[defnes=def] _ 2 _ den@prn.pers.p3.nt.sg.nom _ 3 _ 4[gender=nt] }
! | "S cop NP " 1: %leat@vblex.* NP.*.nom { den@prn.pers.p3.nt.sg.nom[lemcase=$lemcase] _ 1 _ 2[defnes=ind,gender=nt] }
| "S cop NP adv" 1: leat@vblex.* NP adv { 3[lemcase = 1.lemcase] _ 1[lemcase = 2.lemcase] _ den@prn.pers.p3.nt.sg.nom _ 2[defnes=ind,gender=nt] }
| "S np cop a" 4: NP leat@vblex.* adj { 1[defnes=def] _ 2 _ 3[gender=1.gender/tl] }
| "S np cop ap" 7: NP leat@vblex.* adv adj { 1[defnes=def] _ 2 _ 3 _ 4[gender=1.gender/tl] }
| "S pp cop a" 5: PP leat@vblex.* adj { 1[defnes=def] _ 2 _ den@prn.pers.p3.nt.sg.nom _ 3[gender=nt] }
| "S pp cop ap" 8: PP leat@vblex.* adv adj { 1[defnes=def] _ 2 _ den@prn.pers.p3.nt.sg.nom _ 3 _ 4[gender=nt] }
! | "mus lea X" 1: %prn.*.←hab→ leat@vblex.* NP { %1[case=nom] _ ha@vblex[tense=2.tense/sl] _ 3}
| "mus lea X" 1: %prn.*.←hab→ leat@vblex.*.pres.* NP { %1[case=nom] _ ha@vblex.pres _ 1(maybe_det)[defnes=$defnes,has_adj=no,gender=3.gender] _ 3}
| "mus lea X" 1: %prn.*.←hab→ leat@vblex.*.pret.* NP { %1[case=nom] _ ha@vblex.pret _ 1(maybe_det)[defnes=$defnes,has_adj=no,gender=3.gender] _ 3}
;
! | "S np cop ap" 7: NP leat@vblex.* AP { 1[defnes=def] _ 2 _ 3[gender=1.gender/tl] }
! | "S pp cop ap" 8: PP leat@vblex.* AP { 1[defnes=def] _ 2 _ den@prn.pers.p3.nt.sg.nom _ 3[gender=nt] }
! | "S adv cop ap" 9: ADV leat@vblex.* AP { 1[defnes=def] _ 2 _ den@prn.pers.p3.nt.sg.nom _ 3[gender=nt] }
!den<prn><pers><p3><nt><sg><nom>
!Forthcoming fix for coordination, today three phrases NP C NP:
!NP -> NPu
! | NPu C NPu
! ;
! The NP rule as NPu "under-NP"?
! Opne spørsmål:
! Vil vi ha NP = [NP cncjoo NP] som frase? Skal vi i tilfelle ha
! NP = [NPu C NPu] (der NPu er underordna NP eller noko slikt?)
! For referanse
!np_ant: _.<ant>.gender.number.case ;!
!np_other: _.np_type.number.case ;
!np: (if (1.np_type = ant) 1(np_ant)
! else 1(np_other)) ;
!adj_attr: _.attr ;
!adj_pred: _.comp.number.case ;
!adj: (if (1.attr = attr) 1(adj_attr)
! else 1(adj_pred)) ;
! =====================================================
! For reference: Lindas and Daniels full diff
! Contributions from an alternative rtx branch that popped up, to be integrated.
! This concerns mainly actio, participles and also pronoun insertion
!rtx ! pcp = pp pprs prfprc ;
!rtx ! finity = (FIN fin) inf actio pp prs pprs prfprc fin ;
!rtx ! derp = der_inchl der_passl der_passs ;
!rtx ! pass = pass ;
!rtx ! inch = inch ;
!rtx ! sep = sep ; !! separable stuff
!rtx ! fs = fs fm ; !! separable stuff
!rtx ! prntype = pers ind qnt itg dem pos rel;
!rtx !
!rtx !
!rtx ! !!!!!!!!!!!!!!!
!rtx ! !! OUTPUT PATTERNS
!rtx ! !!!!!!!!!!!!!!!
!rtx !
!rtx ! vblex_fin: _.sep.fs.tense;
!rtx ! vblex_inf: _.sep.inf;
!rtx ! vblex_pp: _.sep.pcp;
!rtx ! vbser: _.tense;
!rtx ! vbmod: _.tense;
!rtx ! prn: _.prntype.person.gender.number.case;
!rtx !
!rtx !
!rtx ! ==============
!rtx !
!rtx ! vblex: _.tense ;
!rtx !
!rtx ! vblex_simple: (if (1.finity = inf) 1(vblex_inf)
!rtx ! elif (1.finity = actio) 1(vblex_inf)[inf=inf] ! probably not ideal
!rtx ! elif (1.pcp = pp) 1(vblex_pp)
!rtx ! elif (1.pcp = prfprc) 1(vblex_pp) ! probably not ideal
!rtx ! elif (1.pcp = pprs) 1(vblex_pp)
!rtx ! else 1(vblex_fin) ) ;
!rtx ! !vblex: _.tense ;
!rtx ! vblex: (if (1.derp = der_passl)
!rtx ! [ 1(vblex_simple)[pos_tag=vblex,lem=bli] _ 1(vblex_pp)[pcp=pp] ]
!rtx ! elif (1.derp = der_inchl)
!rtx ! [ 1(vblex_simple)[lem=begynne] _ å@part _ 1(vblex_simple)[finity=inf,inf=inf] ]
!rtx ! else 1(vblex_simple)) ;
!rtx !
!rtx ! pick_pro: (if (1.person=p1 & 1.number=sg) jeg@prn.pers.p1.mf.sg.nom
!rtx ! elif (1.person=p2 & 1.number=sg) du@prn.pers.p2.mf.sg.nom
!rtx ! elif (1.person=p3 & 1.number=sg) hun@prn.pers.p3.f.sg.nom
!rtx ! elif (1.person=p1 & (1.number=pl or 1.number=du)) vi@prn.pers.p1.mf.pl.nom
!rtx ! elif (1.person=p2 & (1.number=pl or 1.number=du)) dere@prn.pers.p2.mf.pl.nom
!rtx ! else de@prn.pers.p3.un.pl.nom
!rtx ! ) ;
!rtx !
!rtx ! ===================
!rtx !
!rtx ! VP -> vblex.tv NP { 1 _ 2[definite=ind] } ;
!rtx ! VP -> %vblex.tv NP { 1 _ 2[definite=ind] } ;
!rtx ! VP -> %vblex { 1 } ;
!rtx ! S -> NP VP { 1 _ 2 } ;
!rtx ! S -> VP { 1(pick_pro) _ 1 } ;
! Pick genders etc. from tl (and if not, from anaphoric referent), but don't fall back to sl:
! Til inspirasjon:
!NP -> NP cnjcoo NP [$gender=(if (1.gender = f and 3.gender = f) f else m),
! $number=(if (2.lem =cl "or" and 1.number = sg and 3.number = sg) sg else pl)]
! {1 _ 2 _ 3} ;