From a9f0cc1d30e9298fb64c8a87b4f4a0254764d68d Mon Sep 17 00:00:00 2001 From: aarne Date: Sun, 26 Jun 2005 09:49:33 +0000 Subject: [PATCH] most Cl rules ok --- lib/resource/finnish/CategoriesFin.gf | 10 +- lib/resource/finnish/ClauseFin.gf | 62 ++++---- lib/resource/finnish/RulesFin.gf | 32 +++-- lib/resource/finnish/SyntaxFin.gf | 200 ++++++++------------------ 4 files changed, 115 insertions(+), 189 deletions(-) diff --git a/lib/resource/finnish/CategoriesFin.gf b/lib/resource/finnish/CategoriesFin.gf index 4b588eaea..ee6771bc8 100644 --- a/lib/resource/finnish/CategoriesFin.gf +++ b/lib/resource/finnish/CategoriesFin.gf @@ -48,7 +48,7 @@ lincat V = Verb ; -- = {s : VForm => Str} ---- VP = {s,s2 : Bool => SForm => Agr => Str ; isAux : Bool} ; ----- VPI = {s : VIForm => Agr => Str ; s1 : Str} ; -- s1 is "not" or [] + VPI = {s : VIForm => Str} ; ----- VP = Verb ** {s2 : VForm => Str ; c : ComplCase} ; ---- VG = {s,s2 : Bool => VForm => Str ; c : ComplCase} ; V2 = TransVerb ; @@ -57,12 +57,12 @@ lincat VS = Verb ; VV = Verb ** {c : ComplCase} ; VQ = Verb ; - VA = Verb ** {c : ComplCase} ; + VA = Verb ** {c : Case} ; V2S = TransVerb ; V2Q = TransVerb ; V2V = TransVerb ; ---- - V2A = TransVerb ; ---- + V2A = TransVerb ** {c2 : Case} ; V0 = Verb ; TP = {s : Str ; b : Bool ; t : Tense ; a : Anteriority} ; --- the Str field is dummy @@ -77,7 +77,7 @@ lincat S = {s : Str} ; Cl = Clause ; - -- = {s : SType => Bool => SForm => Str} ; + -- = {s : Bool => SForm => Str} ; Slash = Sentence ** {s2 : Str ; c : Case} ; @@ -88,7 +88,7 @@ lincat IP = {s : NPForm => Str ; n : Number} ; IDet = {s : Gender => Case => Str ; n : Number} ; IAdv = {s : Str} ; ----- QCl = {s : Bool => SForm => QuestForm => Str} ; + QCl = {s : Bool => SForm => Str} ; QS = {s : Str} ; Imp = {s : Number => Str} ; Phr = {s : Str} ; diff --git a/lib/resource/finnish/ClauseFin.gf b/lib/resource/finnish/ClauseFin.gf index 6652cc97e..ca156d2c8 100644 --- a/lib/resource/finnish/ClauseFin.gf +++ b/lib/resource/finnish/ClauseFin.gf @@ -12,76 +12,74 @@ concrete ClauseFin of Clause = CategoriesFin ** ---- sats2clause (mkSatsCopula subj (v.s ! VPart (pgen2gen subj.g) subj.n)) ; SPredV2 np v y = sats2clause (mkSatsObject np v y) ; -{- SPredV3 subj verb obj1 obj2 = - sats2clause (insertObject (mkSatsObject subj verb obj1) verb.c3 verb.s3 obj2) ; - SPredReflV2 subj verb = sats2clause ( - mkSatsObject subj - {s = verb.s ; s2 = [] ; c = accusative ; aux = AEsse} - ---- {s = verb.s ; s2 = verb.s2 ; c = verb.c ; aux = AEsse} - ---- this produces huge cf - find out why! AR 16/3/2005 - (reflPronNounPhrase (pgen2gen subj.g) subj.n subj.p)) ; + insertObject (mkSatsObject subj verb obj1) verb.c2 verb.s5 verb.s6 obj2) ; +---- SPredReflV2 subj verb = +---- sats2clause ( +---- mkSatsObject subj +---- {s = verb.s ; s2 = [] ; c = accusative ; aux = AEsse} +---- (reflPronNounPhrase (pgen2gen subj.g) subj.n subj.p)) ; SPredVS subj verb sent = sats2clause ( - insertExtrapos (mkSats subj verb) - (\\b => embedConj ++ sent.s ! subordMode verb b)) ; ---- mn + insertComplement (mkSats subj verb) sent.s) ; SPredVQ subj verb quest = sats2clause ( - insertExtrapos (mkSats subj verb) (\\_ => quest.s ! IndirQ)) ; + insertComplement (mkSats subj verb) quest.s) ; SPredV2S subj verb obj sent = sats2clause ( - insertExtrapos + insertComplement (mkSatsObject subj verb obj) - (\\b => embedConj ++ sent.s ! subordMode verb b) - ) ; ---- mn ; + sent.s + ) ; SPredV2Q subj verb obj quest = sats2clause ( - insertExtrapos + insertComplement (mkSatsObject subj verb obj) - (\\_ => quest.s ! IndirQ)) ; + quest.s + ) ; SPredVA subj verb adj = sats2clause ( - insertExtrapos (mkSats subj verb) (\\_ => adj.s ! AF (pgen2gen subj.g) subj.n)) ; + insertComplement (mkSats subj verb) (adj.s ! APred ! AN (NCase subj.n verb.c))) ; SPredV2A subj verb obj adj = sats2clause ( - insertExtrapos + insertComplement (mkSatsObject subj verb obj) - (\\_ => adj.s ! AF (pgen2gen obj.g) obj.n)) ; + (adj.s ! APred ! AN (NCase subj.n verb.c2)) + ) ; SPredVV subj verb vp = sats2clause ( - insertExtrapos + insertComplement (mkSats subj verb) - (\\_ => prepCase verb.c ++ vp.s ! VIInfinit ! pgen2gen subj.g ! subj.n ! subj.p) + (vp.s ! VIInfinit) ) ; - SPredObjV2V subj verb obj vp = sats2clause ( - insertExtrapos + insertComplement (mkSatsObject subj verb obj) - (\\_ => prepCase verb.c ++ vp.s ! VIInfinit ! pgen2gen obj.g ! obj.n ! obj.p) + (vp.s ! VIInfinit) ) ; SPredSubjV2V subj verb obj vp = sats2clause ( - insertExtrapos + insertComplement (mkSatsObject subj verb obj) - (\\_ => prepCase verb.c ++ vp.s ! VIInfinit ! pgen2gen subj.g ! subj.n ! subj.p) + (vp.s ! VIInfinit) ) ; - +{- SPredProgVP np vp = sats2clause (progressiveSats np vp) ; - +-} SPredAP subj adj = - sats2clause (mkSatsCopula subj (adj.s ! AF (pgen2gen subj.g) subj.n)) ; + sats2clause (mkSatsCopula subj (complAdjPhrase subj.n adj)) ; SPredCN subj cn = - sats2clause (mkSatsCopula subj (indefNoun subj.n cn)) ; + sats2clause (mkSatsCopula subj (complCommNoun subj.n cn)) ; SPredNP subj np = - sats2clause (mkSatsCopula subj (np.s ! stressed nominative)) ; + sats2clause (mkSatsCopula subj (np.s ! NPCase Nom)) ; SPredAdv subj adv = sats2clause (mkSatsCopula subj adv.s) ; -------- - +{- QPredV np v = sats2quest (mkSats (intNounPhrase np) v) ; QPredPassV subj v = diff --git a/lib/resource/finnish/RulesFin.gf b/lib/resource/finnish/RulesFin.gf index 632fcb426..ad6dc650e 100644 --- a/lib/resource/finnish/RulesFin.gf +++ b/lib/resource/finnish/RulesFin.gf @@ -62,17 +62,21 @@ lin UseA = adj2adjPhrase ; ComplA2 = complAdj ; ----- ComplAV v x = complVerbAdj v x ; ----- ComplObjA2V v x y = complVerbAdj2 True v x y ; + ComplAV av vpi = {s = \\_,a => av.s ! a ++ vpi.s ! VIInfinit} ; + ComplObjA2V av obj vpi = {s = \\_,a => av.s ! a ++ obj.s ! av.c ++ vpi.s ! VIInfinit} ; PositADeg = positAdjPhrase ; ComparADeg = comparAdjPhrase ; ----- SuperlADeg = superlAdjPhrase ; + SuperlADeg = superlAdjPhrase ; -- verbs and verb prases ----- PredAS = predAdjSent ; ----- PredV0 rain = predVerbClause (pronNounPhrase pronIt) rain (complVerb rain) ; + PredAS adj sent = sats2clause ( + insertComplement + (mkSats impersNounPhrase verbOlla) + (complAdjPhrase Sg (adj2adjPhrase adj) ++ sent.s) + ) ; + PredV0 rain = sats2clause (mkSats impersNounPhrase rain) ; -- Partial saturation. @@ -89,8 +93,8 @@ lin UseA2S x = x ; UseA2V x = x ; - UseCl tp cl = {s = tp.s ++ cl.s ! SDecl ! tp.b ! VFinite tp.t tp.a} ; ----- UseQCl tp cl = {s = \\q => tp.s ++ cl.s ! tp.b ! VFinite tp.t tp.a ! q} ; + UseCl tp cl = {s = tp.s ++ cl.s ! tp.b ! VFinite SDecl tp.t tp.a} ; + UseQCl tp cl = {s = tp.s ++ cl.s ! tp.b ! VFinite SQuest tp.t tp.a} ; ---- UseRCl tp cl = {s = \\a => tp.s ++ cl.s ! tp.b ! VFinite tp.t tp.a ! a} ; PosTP t a = {s = t.s ++ a.s ; b = True ; t = t.t ; a = a.a} ; @@ -98,7 +102,7 @@ lin TPresent = {s = [] ; t = Present} ; TPast = {s = [] ; t = Past} ; - TFuture = {s = [] ; t = Future} ; + TFuture = {s = [] ; t = Present} ; TConditional = {s = [] ; t = Conditional} ; ASimul = {s = [] ; a = Simul} ; @@ -106,13 +110,13 @@ lin -- Adverbs. ----- AdjAdv a = ss (a.s ! AAttr ! AAdv) ; --- also APred? + AdjAdv a = ss (a.s ! AAdv) ; --- also APred? AdvPP p = p ; PrepNP = prepPhrase ; AdvCN = advCommNounPhrase ; AdvAP = advAdjPhrase ; AdvAdv = cc2 ; ----- AdvNP pn pp = {s = \\c => pn.s ! c ++ pp.s ; a = pn.a} ; + AdvNP pn pp = {s = \\c => pn.s ! c ++ pp.s ; n = pn.n ; p = pn.p} ; --3 Sentences and relative clauses -- @@ -135,12 +139,12 @@ lin ---- IDetCN d n = nounPhraseInt (detNounPhrase d n) ; FunIP = funIntPron ; ----- QuestCl = questClause ; + QuestCl cl = cl ; ---- IntSlash = intSlash ; ----- QuestAdv = questAdverbial ; + QuestAdv = questAdverbial ; ----- PosImpVP = imperVerbPhrase True ; ----- NegImpVP = imperVerbPhrase False ; + PosImpVP = imperVerbPhrase True ; + NegImpVP = imperVerbPhrase False ; IndicPhrase = indicUtt ; QuestPhrase = interrogUtt ; diff --git a/lib/resource/finnish/SyntaxFin.gf b/lib/resource/finnish/SyntaxFin.gf index 7a6254f1c..4b54f41c8 100644 --- a/lib/resource/finnish/SyntaxFin.gf +++ b/lib/resource/finnish/SyntaxFin.gf @@ -105,6 +105,8 @@ oper nameNounPhrase : ProperName -> NounPhrase = \jussi -> {s = \\f => jussi.s ! npForm2Case Sg f ; n = Sg ; p = NP3} ; + impersNounPhrase : NounPhrase = nameNounPhrase {s = \\_ => []} ; + singularNounPhrase : CommNounPhrase -> NounPhrase = \cn -> {s = \\f => cn.s ! False ! Sg ! (npForm2Case Sg f) ; n = Sg ; p = NP3} ; @@ -342,6 +344,10 @@ oper p = NP3 } ; + superlAdjPhrase : AdjDegr -> AdjPhrase = \iso -> + {s = \\_,a => iso.s ! Sup ! a ; + } ; + --3 Two-place adjectives -- -- A two-place adjective is an adjective with a case used after (or before) @@ -468,19 +474,22 @@ oper param - Tense = Present | Past | Future | Conditional ; + Tense = Present | Past | Conditional ; Anteriority = Simul | Anter ; SForm = - VFinite Tense Anteriority + VFinite SType Tense Anteriority | VInfinit Anteriority | VImperat ; SType = SDecl | SQuest ; + VIForm = VIInfinit | VIImperat Bool Number ; + oper - Clause : Type = {s : SType => Bool => SForm => Str} ; + Clause : Type = {s : Bool => SForm => Str} ; + VerbPhraseInf : Type = {s : VIForm => Str} ; Sats : Type = { subj : Str ; @@ -493,7 +502,7 @@ oper } ; sats2clause : Sats -> Clause = \sats -> - {s = \\st,b,sf => + {s = \\b,sf => let subj = sats.subj ; pred = sats.pred ! b ! sf ; @@ -502,9 +511,9 @@ oper obj = pred.obj ; comp = sats.comp in - case st of { - SDecl => subj ++ fin ++ inf ++ obj ++ comp ; - SQuest => questPart fin ++ subj ++ inf ++ obj ++ comp + case sf of { + VFinite SQuest _ _ => questPart fin ++ subj ++ inf ++ obj ++ comp ; + _ => subj ++ fin ++ inf ++ obj ++ comp } } ; @@ -520,6 +529,9 @@ oper mkSatsObject : NounPhrase -> TransVerb -> NounPhrase -> Sats = \subj,verb,obj -> insertObject (mkSats subj verb) verb.c verb.s3 verb.s4 obj ; + mkSatsCopula : NounPhrase -> Str -> Sats = \subj,comp -> + insertComplement (mkSats subj verbOlla) comp ; + insertObject : Sats -> ComplCase -> Str -> Str -> NounPhrase -> Sats = \sats, c, prep, postp, obj -> {subj = sats.subj ; @@ -532,11 +544,18 @@ oper comp = sats.comp } ; + insertComplement : Sats -> Str -> Sats = + \sats, comp -> + {subj = sats.subj ; + pred = sats.pred ; + comp = sats.comp ++ comp + } ; + complCase : Bool -> ComplCase -> SForm -> NPForm = \b,c,v -> case c of { CCase k => NPCase k ; CAcc => case b of { True => case v of { - VFinite _ _ => NPAccGen ; + VFinite _ _ _ => NPAccGen ; _ => NPAccNom } ; _ => NPCase Part @@ -567,11 +586,11 @@ oper } } ; in case sf of { - VFinite Past a => ei a (Impf n p) (part) ; - VFinite Conditional a => ei a (Cond n p) (Cond Sg P3) ; - VFinite _ a => ei a (Pres n p) (Imper Sg) ; -- both Present and Future - VInfinit a => ei a (Inf) (Inf) ; --- olla tulematta - VImperat => älä + VFinite _ Past a => ei a (Impf n p) (part) ; + VFinite _ Conditional a => ei a (Cond n p) (Cond Sg P3) ; + VFinite _ _ a => ei a (Pres n p) (Imper Sg) ; -- Present + VInfinit a => ei a (Inf) (Inf) ; --- olla tulematta + VImperat => älä } ; @@ -583,29 +602,9 @@ oper -- phrases ("minä uin" ; "minut valitaan" ; "minua odotetaan" ; "minulla on jano"). oper - VerbPhrase = Verb ** {s2 : VForm => Str ; c : ComplCase} ; - VerbGroup = {s,s2 : Bool => VForm => Str ; c : ComplCase} ; - - predVerbGroup : Bool -> VerbGroup -> VerbPhrase = \b,vg -> { - s = vg.s ! b ; - s2 = vg.s2 ! b ; - c = vg.c - } ; - - vp2vg : (Bool -> VerbPhrase) -> VerbGroup = \f -> { - s = \\b => (f b).s ; - s2 = \\b => (f b).s2 ; - c = (f True).c - } ; -- The normal subject case is the nominative. - nomVerbPhrase : (p,n : {s,s2 : VForm => Str}) -> VerbGroup = \pos,neg -> - {s = table {True => pos.s ; False => neg.s} ; - s2 = table {True => pos.s2 ; False => neg.s2} ; - c = CCase Nom - } ; - -- From the inflection table, we select the finite form as function -- of person and number: @@ -622,24 +621,12 @@ oper -- N.B. negation is *not* a function applicable to a verb phrase, since -- double negations with "ei" are not grammatical. - predVerb : Verb -> VerbGroup = \walk -> - let { - noCompl : {s2 : VForm => Str} = {s2 = \\_ => []} ; - infCompl : {s2 : VForm => Str} = {s2 = table { - Imper Pl => walk.s ! ImpNegPl ; - _ => walk.s ! vFormNeg - } - } - } - in - nomVerbPhrase (walk ** noCompl) (verbEi ** infCompl) ; -- (N.B. local definitions workaround for poor type inference in GF 1.2). -- Sometimes we want to extract the verb part of a verb phrase. Not strictly -- necessary since this is a consequence of record subtyping. - verbOfPhrase : VerbPhrase -> Verb = \v -> {s = v.s} ; -- Verb phrases can also be formed from adjectives ("on vanha"), -- common nouns ("on mies"), and noun phrases ("on Jussi"). @@ -652,32 +639,18 @@ oper -- constructions of the "plurale tantum" kind. The adjective rule can be defined -- in terms of the common noun rule. - predAdjective : AdjPhrase -> VerbGroup = \iso -> - let - isot : CommNounPhrase = { - s = \\_,n,c => iso.s ! APred ! AN (NCase n c) ; - g = NonHuman - } - in predCommNoun isot ; - predCommNoun : CommNounPhrase -> VerbGroup = \mies -> - let { - miehia : VForm => Str = \\v => case vform2number v of { - Sg => mies.s ! False ! Sg ! Nom ; - Pl => mies.s ! False ! Pl ! Part - } ; - olemiehia : VForm => Str = - \\v => verbOlla.s ! vFormNeg ++ miehia ! v - } - in nomVerbPhrase (verbOlla ** {s2 = miehia}) (verbEi ** {s2 = olemiehia}) ; + complCommNoun : Number -> CommNounPhrase -> Str = \n,mies -> + case n of { + Sg => mies.s ! False ! Sg ! Nom ; + Pl => mies.s ! False ! Pl ! Part + } ; - predNounPhrase : NounPhrase -> VerbGroup = \jussi -> - let {jussia : Bool => Number => Case => Str = \\_,_,_ => jussi.s ! NPCase Nom} - in predCommNoun {s = jussia ; g = Human} ; --- gender does not matter - - predAdverb : Adverb -> VerbGroup = \pois -> - let {poissa : Bool => Number => Case => Str = \\_,_,_ => pois.s} - in predCommNoun {s = poissa ; g = NonHuman} ; --- gender does not matter + complAdjPhrase : Number -> AdjPhrase -> Str = \n,hieno -> + case n of { + Sg => hieno.s ! APred ! AN (NCase Sg Nom) ; + Pl => hieno.s ! APred ! AN (NCase Pl Part) + } ; --3 Transitive verbs -- @@ -698,17 +671,6 @@ oper -- -- N.B. One or both of the pre- and postposition are empty. - complTransVerb : TransVerb -> NounPhrase -> VerbGroup = \ostaa,talo -> - let { - ostan = predVerb ostaa ; - talon : Bool => VForm => Str = \\b,v => - ostaa.s3 ++ talo.s ! complementCase b ostaa.c v ++ ostaa.s4 - } - in - {s = ostan.s ; - s2 = \\b,v => ostan.s2 ! b ! v ++ talon ! b ! v ; - c = CCase Nom - } ; -- N.B. If the case is accusative, it becomes partitive in negated verb phrases. -- The choice between the nominative and genitive accusatives depends on the verb @@ -736,7 +698,7 @@ oper mkTransVerbDir : Verb -> TransVerb = \ostaa -> ostaa ** {s3 = [] ; s4 = [] ; c = CAcc} ; - +{- -- Most two-place verbs can be used passively; the object case need not be -- the accusative, and it becomes the subject case in the passive sentence. @@ -751,7 +713,7 @@ oper passVerb : Verb -> VerbGroup = \uida -> passTransVerb (mkTransVerbDir uida) ; - +-} -- Transitive verbs can be used elliptically as verbs. The semantics -- is left to applications. The definition is trivial, due to record -- subtyping. @@ -764,9 +726,6 @@ oper -- bare verb phrase in passive, and putting the complement before -- the verb ("auttaa minua" - "minua autetaan"). - passPredVerbPhrase : VerbPhrase -> Sentence = \auttaaminua -> - let {p = Pass True} in - {s = auttaaminua.s2 ! p ++ auttaaminua.s ! p} ; -- *Ditransitive verbs* are verbs with three argument places. -- We treat so far only the rule in which the ditransitive @@ -774,21 +733,6 @@ oper DitransVerb = TransVerb ** {s5, s6 : Str ; c2 : ComplCase} ; - complDitransVerb : DitransVerb -> NounPhrase -> NounPhrase -> VerbGroup = - \ostaa,talo,me -> - let { - ostan = predVerb ostaa ; - talon : Bool => VForm => Str = \\b,v => - ostaa.s3 ++ talo.s ! complementCase b ostaa.c v ++ ostaa.s4 ; - meille : Bool => VForm => Str = \\b,v => - ostaa.s5 ++ me.s ! complementCase b ostaa.c2 v ++ ostaa.s6 - } - in { - s = ostan.s ; - s2 = \\b,v => ostan.s2 ! b ! v ++ talon ! b ! v ++ meille ! b ! v ; - c = CCase Nom - } ; - --2 Adverbials -- @@ -799,13 +743,13 @@ oper -- This rule adds the adverbial as a prefix or a suffix to the complement, -- in free variation. - +{- adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \laulaa, hyvin -> {s = laulaa.s ; s2 = \\v => bothWays (laulaa.s2 ! v) hyvin.s ; c = laulaa.c } ; - +-} advAdjPhrase : Adverb -> AdjPhrase -> AdjPhrase = \liian, iso -> {s = \\p,a => liian.s ++ iso.s ! p ! a } ; @@ -849,13 +793,6 @@ oper -- agreement between subject and verb. Recall that the VP may already -- contain negation. - predVerbPhrase : NounPhrase -> VerbPhrase -> Sentence = \jussi,uida -> - let { - p = np2Person jussi.p ; - c = complementCase True uida.c Inf --- True,Inf don't matter here - } - in - ss (jussi.s ! c ++ uida.s ! Pres jussi.n p ++ uida.s2 ! Pres jussi.n p) ; --3 Sentence-complement verbs -- @@ -865,16 +802,6 @@ oper -- To generate "sanoo että Jussi ui" / "ei sano että Jussi ui" - complSentVerb : SentenceVerb -> Sentence -> VerbGroup = - \sanoa,jussiui -> - let { - sanon = predVerb sanoa - } - in { - s = sanon.s ; - s2 = \\b,v => sanon.s2 ! b ! v ++ conjEtta ++ jussiui.s ; - c = CCase Nom - } ; --3 Verb-complement verbs -- @@ -883,7 +810,7 @@ oper -- also verbs with a special subject case ("täytyy", "on pakko"). VerbVerb : Type = Verb ** {c : ComplCase} ; - +{- complVerbVerb : VerbVerb -> VerbGroup -> VerbGroup = \haluta, uida -> let hc = haluta.c ; @@ -902,7 +829,7 @@ oper uida.s2 ! True ! Inf ; c = hc } ; - +-} nomVerbVerb : Verb -> VerbVerb = \v -> v ** {c = CCase Nom} ; --2 Sentences missing noun phrases @@ -922,7 +849,7 @@ nomVerbVerb : Verb -> VerbVerb = \v -> v ** {c = CCase Nom} ; -- fixed by the Boolean parameter and the subject. SentenceSlashNounPhrase = Sentence ** {s2 : Str ; c : Case} ; - +{- slashTransVerb : Bool -> NounPhrase -> TransVerb -> SentenceSlashNounPhrase = \b,jussi,ostaa -> predVerbPhrase jussi (predVerbGroup b (predVerb ostaa)) ** { @@ -930,7 +857,7 @@ nomVerbVerb : Verb -> VerbVerb = \v -> v ** {c = CCase Nom} ; c = npForm2Case jussi.n (complementCase b ostaa.c (Pres jussi.n (np2Person jussi.p))) } ; - +-} --2 Relative pronouns and relative clauses -- -- As described in $types.Fin.gf$, relative pronouns are inflected like @@ -947,11 +874,11 @@ nomVerbVerb : Verb -> VerbVerb = \v -> v ** {c = CCase Nom} ; -- slash expressions ("jonka sinä näet", "jonka kautta sinä käyt"). RelClause : Type = {s : Number => Str} ; - +{- relVerbPhrase : RelPron -> VerbPhrase -> RelClause = \joka,ui -> {s = \\n => joka.s ! n ! npForm2Case n (complementCase True ui.c Inf) ++ ui.s ! Pres n P3 ++ ui.s2 ! Pres n P3} ; - +-} relSlash : RelPron -> SentenceSlashNounPhrase -> RelClause = \joka,saat -> {s = \\n => joka.s ! n ! saat.c ++ saat.s2 ++ saat.s} ; @@ -1043,16 +970,13 @@ nomVerbVerb : Verb -> VerbVerb = \v -> v ** {c = CCase Nom} ; oper Question = SS ; + QuestClause = Clause ; ---- too many forms --3 Yes-no questions -- -- Yes-no questions are formed by inversed predication, with the clitic "ko" / "kö" -- particle attached to the verb part of the verb phrase. - questVerbPhrase : NounPhrase -> VerbPhrase -> Question = \jussi,ui -> - let {np = Pres jussi.n (np2Person jussi.p)} in - ss (ui.s ! np ++ koPart ++ jussi.s ! complementCase True ui.c Inf ++ ui.s2 ! np); - onkoNounPhrase : NounPhrase -> Question = \kaljaa -> ss ("onko" ++ kaljaa.s ! NPCase Nom) ; @@ -1061,8 +985,8 @@ oper -- Wh-questions are of two kinds: ones that are like $NP - VP$ sentences -- ("kuka ui?") others that are line $S/NP - NP$ sentences ("kenet sinä tapaat?"). - intVerbPhrase : IntPron -> VerbPhrase -> Question = \kuka,ui -> - predVerbPhrase (kuka ** {p = NP3}) ui ; +-- intVerbPhrase : IntPron -> VerbPhrase -> Question = \kuka,ui -> +-- predVerbPhrase (kuka ** {p = NP3}) ui ; intSlash : IntPron -> SentenceSlashNounPhrase -> Question = \kuka,tapaat -> ss (kuka.s ! NPCase tapaat.c ++ tapaat.s2 ++ tapaat.s) ; @@ -1086,9 +1010,9 @@ oper -- sense is a semantic question. The syntax is very simple: just prefix the -- adverbial to the predication. - questAdverbial : IntAdverb -> NounPhrase -> VerbPhrase -> Question = - \miksi, jussi, ui -> - cc2 miksi (predVerbPhrase jussi ui) ; + questAdverbial : IntAdverb -> Clause -> QuestClause = + \miksi, cl -> + {s = \\b,f => miksi.s ++ cl.s ! b ! f} ; --2 Imperatives -- @@ -1096,8 +1020,8 @@ oper Imperative = SS1 Number ; - imperVerbPhrase : VerbPhrase -> Imperative = \ui -> - {s = \\n => ui.s ! Imper n ++ ui.s2 ! Imper n} ; + imperVerbPhrase : Bool -> VerbPhraseInf -> Imperative = \b,ui -> + {s = \\n => ui.s ! VIImperat b n} ; imperUtterance : Number -> Imperative -> Utterance = \n,I -> ss (I.s ! n ++ exclPunct) ; @@ -1245,11 +1169,11 @@ oper subjunctVariants : Subjunction -> Str -> Str -> Str = \if,A,B -> variants {if.s ++ A ++ commaPunct ++ B ; B ++ commaPunct ++ if.s ++ A} ; - +{- subjunctVerbPhrase : VerbPhrase -> Subjunction -> Sentence -> VerbPhrase = \V, if, A -> adVerbPhrase V (ss (if.s ++ A.s)) ; - +-} --2 One-word utterances -- -- An utterance can consist of one phrase of almost any category,