diff options
| author | aarne <aarne@cs.chalmers.se> | 2008-10-03 20:42:09 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2008-10-03 20:42:09 +0000 |
| commit | 24207d40e9cb56173de22d9a424975f0da0bc416 (patch) | |
| tree | 2c221dc4e6f9f7a4d665fe118e0cda12d3ea7290 /next-lib/src/finnish | |
| parent | 27de3c0e7b13a4674cf5829ccbb00b118e916ae8 (diff) | |
extended AP with Ord and compar in 1.5
Diffstat (limited to 'next-lib/src/finnish')
| -rw-r--r-- | next-lib/src/finnish/AdjectiveFin.gf | 21 | ||||
| -rw-r--r-- | next-lib/src/finnish/CatFin.gf | 10 | ||||
| -rw-r--r-- | next-lib/src/finnish/ConjunctionFin.gf | 8 | ||||
| -rw-r--r-- | next-lib/src/finnish/LexiconFin.gf | 2 | ||||
| -rw-r--r-- | next-lib/src/finnish/NounFin.gf | 42 | ||||
| -rw-r--r-- | next-lib/src/finnish/VerbFin.gf | 6 |
6 files changed, 33 insertions, 56 deletions
diff --git a/next-lib/src/finnish/AdjectiveFin.gf b/next-lib/src/finnish/AdjectiveFin.gf index 78e7d4a7c..737887d17 100644 --- a/next-lib/src/finnish/AdjectiveFin.gf +++ b/next-lib/src/finnish/AdjectiveFin.gf @@ -5,26 +5,33 @@ concrete AdjectiveFin of Adjective = CatFin ** open ResFin, Prelude in { lin PositA a = { - s = \\_ => a.s ! Posit + s = \\_,nf => a.s ! Posit ! AN nf } ; ComparA a np = { s = \\isMod,af => case isMod of { - True => np.s ! NPCase Part ++ a.s ! Compar ! af ; -- minua isompi - _ => a.s ! Compar ! af ++ "kuin" ++ np.s ! NPCase Nom -- isompi kuin minä + True => np.s ! NPCase Part ++ a.s ! Compar ! AN af ; -- minua isompi + _ => a.s ! Compar ! AN af ++ "kuin" ++ np.s ! NPCase Nom -- isompi kuin minä } } ; + UseComparA a = { + s = \\_,nf => a.s ! Compar ! AN nf ; + } ; -- $SuperlA$ belongs to determiner syntax in $Noun$. + AdjOrd ord = { + s = \\_ => ord.s + } ; + ComplA2 adj np = { s = \\isMod,af => - preOrPost isMod (appCompl True Pos adj.c2 np) (adj.s ! Posit ! af) + preOrPost isMod (appCompl True Pos adj.c2 np) (adj.s ! Posit ! AN af) } ; ReflA2 adj = { s = \\isMod,af => preOrPost isMod - (appCompl True Pos adj.c2 (reflPron (agrP3 Sg))) (adj.s ! Posit ! af) + (appCompl True Pos adj.c2 (reflPron (agrP3 Sg))) (adj.s ! Posit ! AN af) } ; SentAP ap sc = { @@ -35,6 +42,8 @@ concrete AdjectiveFin of Adjective = CatFin ** open ResFin, Prelude in { s = \\b,af => ada.s ++ ap.s ! b ! af } ; - UseA2 a = a ; + UseA2 a = { + s = \\_,nf => a.s ! Posit ! AN nf + } ; } diff --git a/next-lib/src/finnish/CatFin.gf b/next-lib/src/finnish/CatFin.gf index aea41cac1..f0ca5784a 100644 --- a/next-lib/src/finnish/CatFin.gf +++ b/next-lib/src/finnish/CatFin.gf @@ -41,7 +41,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, Prelude in { -- The $Bool$ tells whether usage is modifying (as opposed to -- predicative), e.g. "x on suurempi kuin y" vs. "y:tä suurempi luku". - AP = {s : Bool => AForm => Str} ; + AP = {s : Bool => NForm => Str} ; -- Noun @@ -59,11 +59,11 @@ concrete CatFin of Cat = CommonX ** open ResFin, Prelude in { isDef : Bool -- True (verb agrees in Pl, Nom is not Part) } ; ---- QuantSg, QuantPl = {s1 : Case => Str ; s2 : Str ; isPoss, isDef : Bool} ; - Ord = {s : Number => Case => Str} ; + Ord = {s : NForm => Str} ; Predet = {s : Number => NPForm => Str} ; - Quant = {s1 : Number => Case => Str ; s2 : Str ; isPoss : Bool ; isDef : Bool} ; - Card = {s : Number => Case => Str ; n : Number} ; - Num = {s : Number => Case => Str ; isNum : Bool ; n : Number} ; + Quant = {s1 : Number => Case => Str ; s2 : Str ; isPoss : Bool ; isDef : Bool} ; + Card = {s : Number => Case => Str ; n : Number} ; + Num = {s : Number => Case => Str ; isNum : Bool ; n : Number} ; -- Numeral diff --git a/next-lib/src/finnish/ConjunctionFin.gf b/next-lib/src/finnish/ConjunctionFin.gf index 94cea7f8c..8e7f7a3c8 100644 --- a/next-lib/src/finnish/ConjunctionFin.gf +++ b/next-lib/src/finnish/ConjunctionFin.gf @@ -14,7 +14,7 @@ concrete ConjunctionFin of Conjunction = isPron = False } ; - ConjAP conj ss = conjunctDistrTable2 Bool AForm conj ss ; + ConjAP conj ss = conjunctDistrTable2 Bool NForm conj ss ; -- These fun's are generated from the list cat's. @@ -24,13 +24,13 @@ concrete ConjunctionFin of Conjunction = ConsAdv = consrSS comma ; BaseNP x y = twoTable NPForm x y ** {a = conjAgr x.a y.a} ; ConsNP xs x = consrTable NPForm comma xs x ** {a = conjAgr xs.a x.a} ; - BaseAP x y = twoTable2 Bool AForm x y ; - ConsAP xs x = consrTable2 Bool AForm comma xs x ; + BaseAP x y = twoTable2 Bool NForm x y ; + ConsAP xs x = consrTable2 Bool NForm comma xs x ; lincat [S] = {s1,s2 : Str} ; [Adv] = {s1,s2 : Str} ; [NP] = {s1,s2 : NPForm => Str ; a : Agr} ; - [AP] = {s1,s2 : Bool => AForm => Str} ; + [AP] = {s1,s2 : Bool => NForm => Str} ; } diff --git a/next-lib/src/finnish/LexiconFin.gf b/next-lib/src/finnish/LexiconFin.gf index e15538b4f..9b9c91a2f 100644 --- a/next-lib/src/finnish/LexiconFin.gf +++ b/next-lib/src/finnish/LexiconFin.gf @@ -381,7 +381,7 @@ lin oper mkOrd : N -> Ord ; - mkOrd x = {s = \\n,c => x.s ! NCase n c; lock_Ord = <> } ; + mkOrd x = {s = x.s ; lock_Ord = <> } ; cpartitive = casePrep partitive ; } ; diff --git a/next-lib/src/finnish/NounFin.gf b/next-lib/src/finnish/NounFin.gf index 772815e3e..3d0d79bcf 100644 --- a/next-lib/src/finnish/NounFin.gf +++ b/next-lib/src/finnish/NounFin.gf @@ -77,7 +77,7 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in { } ; DetQuantOrd quant num ord = { - s1 = \\c => quant.s1 ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! Pl ! c ; + s1 = \\c => quant.s1 ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! NCase Pl c ; s2 = quant.s2 ; n = num.n ; isNum = num.isNum ; @@ -94,38 +94,6 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in { isDef = True } ; - -{- - DetArtSg det cn = - let - n : Number = Sg ; - ncase : Case -> NForm = \c -> NCase n c ; - in { - s = \\c => let k = npform2case n c in - det.s1 ! Sg ! k ++ cn.s ! ncase k ; - a = agrP3 Sg ; - isPron = False - } ; - - DetArtPl det cn = - let - n : Number = Pl ; - ncase : Case -> NForm = \c -> - case <n,c,det.isDef> of { - <Pl,Nom,False> => NCase Pl Part ; -- kytkimiä - _ => NCase n c -- kytkin, kytkimen,... - } - in { - s = \\c => let k = npform2case n c in - det.s1 ! Pl ! k ++ cn.s ! ncase k ; - a = agrP3 (case det.isDef of { - False => Sg ; -- autoja menee; kolme autoa menee - _ => Pl - }) ; - isPron = False - } ; --} - PossPron p = { s1 = \\_,_ => p.s ! NPCase Gen ; s2 = BIND ++ possSuffix p.a ; @@ -143,20 +111,20 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in { s = \\n,c => numeral.s ! NCard (NCase n c) ; n = numeral.n } ; - OrdDigits numeral = {s = \\n,c => numeral.s ! NOrd (NCase n c)} ; + OrdDigits numeral = {s = \\nc => numeral.s ! NOrd nc} ; NumNumeral numeral = { s = \\n,c => numeral.s ! NCard (NCase n c) ; n = numeral.n } ; - OrdNumeral numeral = {s = \\n,c => numeral.s ! NOrd (NCase n c)} ; + OrdNumeral numeral = {s = \\nc => numeral.s ! NOrd nc} ; AdNum adn num = { s = \\n,c => adn.s ++ num.s ! n ! c ; n = num.n } ; - OrdSuperl a = {s = \\n,c => a.s ! Superl ! AN (NCase n c)} ; + OrdSuperl a = {s = \\nc => a.s ! Superl ! AN nc} ; DefArt = { s1 = \\_,_ => [] ; @@ -210,7 +178,7 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in { } ; AdjCN ap cn = { - s = \\nf => ap.s ! True ! AN (n2nform nf) ++ cn.s ! nf + s = \\nf => ap.s ! True ! (n2nform nf) ++ cn.s ! nf } ; RelCN cn rs = {s = \\nf => cn.s ! nf ++ rs.s ! agrP3 (numN nf)} ; diff --git a/next-lib/src/finnish/VerbFin.gf b/next-lib/src/finnish/VerbFin.gf index 0e6498a0b..7b9c36b4a 100644 --- a/next-lib/src/finnish/VerbFin.gf +++ b/next-lib/src/finnish/VerbFin.gf @@ -33,7 +33,7 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in { ComplVA v ap = insertObj (\\_,b,agr => - ap.s ! False ! AN (NCase agr.n (npform2case agr.n v.c2.c))) --- v.cs.s ignored + ap.s ! False ! (NCase agr.n (npform2case agr.n v.c2.c))) --- v.cs.s ignored (predV v) ; SlashV2S v s = @@ -46,7 +46,7 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in { SlashV2A v ap = insertObj (\\fin,b,_ => - ap.s ! False ! AN (NCase Sg (npform2case Sg v.c3.c))) ----agr to obj + ap.s ! False ! (NCase Sg (npform2case Sg v.c3.c))) ----agr to obj (predV v) ** {c2 = v.c2} ; ComplSlash vp np = insertObj (\\fin,b,_ => appCompl fin b vp.c2 np) vp ; @@ -95,7 +95,7 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in { Sg => Nom ; -- minä olen iso Pl => Part -- me olemme isoja } --- definiteness of NP ? - in ap.s ! False ! AN (NCase agr.n c) + in ap.s ! False ! (NCase agr.n c) } ; CompNP np = {s = \\_ => np.s ! NPCase Nom} ; CompAdv a = {s = \\_ => a.s} ; |
