1
0
forked from GitHub/gf-rgl

Finnish negation particle stored in VP for vowel harmony

This commit is contained in:
aarne
2008-06-22 18:33:15 +00:00
parent 82186e38b7
commit eb72aeb20a
7 changed files with 40 additions and 20 deletions

View File

@@ -95,6 +95,6 @@ concrete CatFin of Cat = CommonX ** open ResFin, Prelude in {
N3 = {s : NForm => Str} ** {c2,c3 : Compl} ; N3 = {s : NForm => Str} ** {c2,c3 : Compl} ;
PN = {s : Case => Str} ; PN = {s : Case => Str} ;
oper Verb1 = {s : VForm => Str ; sc : NPForm} ; oper Verb1 = {s : VForm => Str ; sc : NPForm ; qp : Str} ;
} }

View File

@@ -41,7 +41,8 @@ concrete IdiomFin of Idiom = CatFin **
s = \\_ => vp.s ! VIPass ; s = \\_ => vp.s ! VIPass ;
s2 = vp.s2 ; s2 = vp.s2 ;
ext = vp.ext ; ext = vp.ext ;
sc = vp.sc sc = vp.sc ;
qp = vp.qp
} ; } ;
ProgrVP vp = ProgrVP vp =
@@ -52,7 +53,8 @@ concrete IdiomFin of Idiom = CatFin **
s = on.s ; s = on.s ;
s2 = \\b,p,a => inf ++ vp.s2 ! b ! p ! a ; s2 = \\b,p,a => inf ++ vp.s2 ! b ! p ! a ;
ext = vp.ext ; ext = vp.ext ;
sc = vp.sc sc = vp.sc ;
qp = vp.qp
} ; } ;
-- This gives "otetaan oluet" instead of "ottakaamme oluet". -- This gives "otetaan oluet" instead of "ottakaamme oluet".
@@ -66,7 +68,7 @@ concrete IdiomFin of Idiom = CatFin **
} ; } ;
oper oper
olla = verbOlla ** {sc = NPCase Nom} ; olla = verbOlla ** {sc = NPCase Nom ; qp = "ko"} ;
noSubj : Polarity -> Str = \_ -> [] ; noSubj : Polarity -> Str = \_ -> [] ;
} }

View File

@@ -683,7 +683,7 @@ resource MorphoFin = ResFin ** open Prelude in {
11 => lienee 11 => lienee
} ; } ;
vforms2V : VForms -> Verb = \vh -> vforms2V : VForms -> Verb ** {qp : Str} = \vh ->
let let
tulla = vh ! 0 ; tulla = vh ! 0 ;
tulen = vh ! 1 ; tulen = vh ! 1 ;
@@ -748,6 +748,7 @@ resource MorphoFin = ResFin ** open Prelude in {
Inf Inf3Abess => tulema + "tt" + a Inf Inf3Abess => tulema + "tt" + a
} ; } ;
sc = NPCase Nom ; sc = NPCase Nom ;
qp = Predef.dp 2 tulko ;
lock_V = <> lock_V = <>
} ; } ;

View File

@@ -473,8 +473,11 @@ oper
huusin,huusi,huusisi,huutanut,huudettu,huutanee : Str) -> V = mk12V ; huusin,huusi,huusisi,huutanut,huudettu,huutanee : Str) -> V = mk12V ;
} ; } ;
mk1V : Str -> V = \s -> vforms2V (vForms1 s) ** {sc = NPCase Nom ; lock_V = <>} ; mk1V : Str -> V = \s ->
mk2V : (_,_ : Str) -> V = \x,y -> vforms2V (vForms2 x y) ** {sc = NPCase Nom ; lock_V = <>} ; let vfs = vforms2V (vForms1 s) in
vfs ** {sc = NPCase Nom ; lock_V = <>} ;
mk2V : (_,_ : Str) -> V = \x,y ->
let vfs = vforms2V (vForms2 x y) in vfs ** {sc = NPCase Nom ; lock_V = <>} ;
mk3V : (huutaa,huudan,huusi : Str) -> V = \x,_,y -> mk2V x y ; ---- mk3V : (huutaa,huudan,huusi : Str) -> V = \x,_,y -> mk2V x y ; ----
mk12V : ( mk12V : (
huutaa,huudan,huutaa,huutavat,huutakaa,huudetaan, huutaa,huudan,huutaa,huutavat,huutakaa,huudetaan,
@@ -543,9 +546,9 @@ oper
caseV c v = {s = v.s ; sc = NPCase c ; lock_V = <>} ; caseV c v = {s = v.s ; sc = NPCase c ; qp = v.qp ; lock_V = <>} ;
vOlla = verbOlla ** {sc = NPCase Nom ; lock_V = <>} ; vOlla = verbOlla ** {sc = NPCase Nom ; qp = "ko" ; lock_V = <>} ; ---- lieneekö
mk2V2 : V -> Prep -> V2 = \v,c -> v ** {c2 = c ; lock_V2 = <>} ; mk2V2 : V -> Prep -> V2 = \v,c -> v ** {c2 = c ; lock_V2 = <>} ;
caseV2 : V -> Case -> V2 = \v,c -> mk2V2 v (casePrep c) ; caseV2 : V -> Case -> V2 = \v,c -> mk2V2 v (casePrep c) ;

View File

@@ -31,7 +31,7 @@ concrete QuestionFin of Question = CatFin ** open ResFin, Prelude in {
QuestIComp icomp np = { QuestIComp icomp np = {
s = \\t,a,p => s = \\t,a,p =>
let let
vp = predV (verbOlla ** {sc = NPCase Nom}) ; vp = predV (verbOlla ** {sc = NPCase Nom ; qp = "ko"}) ;
cl = mkClause (subjForm np vp.sc) np.a vp ; cl = mkClause (subjForm np vp.sc) np.a vp ;
in in
icomp.s ! np.a ++ cl.s ! t ! a ! p ! SDecl icomp.s ! np.a ++ cl.s ! t ! a ! p ! SDecl

View File

@@ -159,10 +159,11 @@ oper
s : VIForm => Anteriority => Polarity => Agr => {fin, inf : Str} ; s : VIForm => Anteriority => Polarity => Agr => {fin, inf : Str} ;
s2 : Bool => Polarity => Agr => Str ; -- talo/talon/taloa s2 : Bool => Polarity => Agr => Str ; -- talo/talon/taloa
ext : Str ; ext : Str ;
sc : NPForm sc : NPForm ;
qp : Str
} ; } ;
predV : (Verb ** {sc : NPForm}) -> VP = \verb -> { predV : (Verb ** {sc : NPForm ; qp : Str}) -> VP = \verb -> {
s = \\vi,ant,b,agr => s = \\vi,ant,b,agr =>
let let
@@ -220,21 +221,24 @@ oper
s2 = \\_,_,_ => [] ; s2 = \\_,_,_ => [] ;
ext = [] ; ext = [] ;
sc = verb.sc sc = verb.sc ;
qp = verb.qp
} ; } ;
insertObj : (Bool => Polarity => Agr => Str) -> VP -> VP = \obj,vp -> { insertObj : (Bool => Polarity => Agr => Str) -> VP -> VP = \obj,vp -> {
s = vp.s ; s = vp.s ;
s2 = \\fin,b,a => obj ! fin ! b ! a ++ vp.s2 ! fin ! b ! a ; s2 = \\fin,b,a => obj ! fin ! b ! a ++ vp.s2 ! fin ! b ! a ;
ext = vp.ext ; ext = vp.ext ;
sc = vp.sc sc = vp.sc ;
qp = vp.qp
} ; } ;
insertExtrapos : Str -> VP -> VP = \obj,vp -> { insertExtrapos : Str -> VP -> VP = \obj,vp -> {
s = vp.s ; s = vp.s ;
s2 = vp.s2 ; s2 = vp.s2 ;
ext = vp.ext ++ obj ; ext = vp.ext ++ obj ;
sc = vp.sc sc = vp.sc ;
qp = vp.qp
} ; } ;
-- For $Sentence$. -- For $Sentence$.
@@ -257,7 +261,7 @@ oper
in in
case o of { case o of {
SDecl => subj ++ verb.fin ++ verb.inf ++ compl ; SDecl => subj ++ verb.fin ++ verb.inf ++ compl ;
SQuest => questPart verb.fin ++ subj ++ verb.inf ++ compl SQuest => questPart vp a b verb.fin ++ subj ++ verb.inf ++ compl
} }
} ; } ;
@@ -266,7 +270,14 @@ oper
subjForm : NP -> NPForm -> Polarity -> Str = \np,sc,b -> subjForm : NP -> NPForm -> Polarity -> Str = \np,sc,b ->
appCompl False b {s = [] ; c = sc ; isPre = True} np ; appCompl False b {s = [] ; c = sc ; isPre = True} np ;
questPart : Str -> Str = \on -> on ++ BIND ++ "ko" ; ---- questPart : VP -> Anteriority -> Polarity -> Str -> Str = \vp,a,p,on -> on ++ BIND ++
case p of {
Neg => "kö" ; -- eikö tule
_ => case a of {
Anter => "ko" ; -- onko mennyt
_ => vp.qp -- tuleeko, meneekö
}
} ;
infVP : NPForm -> Polarity -> Agr -> VP -> InfForm -> Str = infVP : NPForm -> Polarity -> Agr -> VP -> InfForm -> Str =
\sc,pol,agr,vp,vi -> \sc,pol,agr,vp,vi ->

View File

@@ -23,7 +23,8 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in {
sc = case vp.sc of { sc = case vp.sc of {
NPCase Nom => v.sc ; -- minun täytyy pestä auto NPCase Nom => v.sc ; -- minun täytyy pestä auto
c => c -- minulla täytyy olla auto c => c -- minulla täytyy olla auto
} } ;
qp = v.qp
} }
) ; ) ;
@@ -51,7 +52,7 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in {
ComplSlash vp np = insertObj (\\fin,b,_ => appCompl fin b vp.c2 np) vp ; ComplSlash vp np = insertObj (\\fin,b,_ => appCompl fin b vp.c2 np) vp ;
UseComp comp = UseComp comp =
insertObj (\\_,_ => comp.s) (predV (verbOlla ** {sc = NPCase Nom})) ; insertObj (\\_,_ => comp.s) (predV (verbOlla ** {sc = NPCase Nom ; qp = "ko"})) ;
SlashVV v vp = SlashVV v vp =
insertObj insertObj
@@ -60,7 +61,8 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in {
sc = case vp.sc of { sc = case vp.sc of {
NPCase Nom => v.sc ; -- minun täytyy pestä auto NPCase Nom => v.sc ; -- minun täytyy pestä auto
c => c -- minulla täytyy olla auto c => c -- minulla täytyy olla auto
} } ;
qp = v.qp
} }
) ** {c2 = vp.c2} ; ---- correct ?? ) ** {c2 = vp.c2} ; ---- correct ??
@@ -79,6 +81,7 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in {
s = \\_ => vp.s ! VIPass ; s = \\_ => vp.s ! VIPass ;
s2 = \\_,_,_ => [] ; s2 = \\_,_,_ => [] ;
ext = [] ; ext = [] ;
qp = v.qp ;
sc = v.c2.c -- minut valitaan ; minua rakastetaan ; minulle kuiskataan sc = v.c2.c -- minut valitaan ; minua rakastetaan ; minulle kuiskataan
} ; ---- talon valitaan: should be marked like inf. } ; ---- talon valitaan: should be marked like inf.