1
0
forked from GitHub/gf-rgl

stat; type of imperatives in lib/resource

This commit is contained in:
aarne
2005-09-04 10:45:37 +00:00
parent f4100fa2d5
commit d312878b26
7 changed files with 35 additions and 28 deletions

View File

@@ -146,7 +146,7 @@ fun
IntSlash : IP -> Slash -> QCl ; -- "whom does John see" IntSlash : IP -> Slash -> QCl ; -- "whom does John see"
QuestAdv : IAdv -> Cl -> QCl ; -- "why do you walk" QuestAdv : IAdv -> Cl -> QCl ; -- "why do you walk"
PosImpVP, NegImpVP : VPI -> Imp ; -- "(don't) be a man" PosImpVP, NegImpVP : VCl -> Imp ; -- "(don't) be a man"
----rename these ?? ----rename these ??
IndicPhrase : S -> Phr ; -- "I walk." IndicPhrase : S -> Phr ; -- "I walk."

View File

@@ -1278,13 +1278,13 @@ oper
Imperative = SS1 Number ; Imperative = SS1 Number ;
imperVerbPhrase : Bool -> VerbPhrase -> Imperative = \b,walk -> imperVerbPhrase : Bool -> VerbClause -> Imperative = \b,walk ->
{s = \\n => {s = \\n =>
let let
a = toAgr n P2 human ; a = toAgr n P2 human ;
dont = if_then_Str b [] "don't" dont = if_then_Str b [] "don't"
in in
dont ++ walk.s ! VIInfinit ! a dont ++ walk.s ! b ! Simul ! VIInfinit ! a
} ; } ;
imperUtterance : Number -> Imperative -> Utterance = \n,I -> imperUtterance : Number -> Imperative -> Utterance = \n,I ->

View File

@@ -47,8 +47,8 @@ lincat
V = Verb1 ; V = Verb1 ;
-- = {s : VForm => Str} -- = {s : VForm => Str}
---- VP = {s,s2 : Bool => SForm => Agr => Str ; isAux : Bool} ; VPI = {s : VIForm => Number => Str ; sc : Case} ;
VPI = {s : Bool => VIForm => Str ; sc : Case} ; VCl = {s : Bool => Anteriority => VIForm => Number => Str ; sc : Case} ;
----- VP = Verb ** {s2 : VForm => Str ; c : ComplCase} ; ----- VP = Verb ** {s2 : VForm => Str ; c : ComplCase} ;
---- VG = {s,s2 : Bool => VForm => Str ; c : ComplCase} ; ---- VG = {s,s2 : Bool => VForm => Str ; c : ComplCase} ;
V2 = TransVerb ; V2 = TransVerb ;
@@ -67,6 +67,7 @@ lincat
TP = {s : Str ; b : Bool ; t : Tense ; a : Anteriority} ; --- the Str field is dummy TP = {s : Str ; b : Bool ; t : Tense ; a : Anteriority} ; --- the Str field is dummy
Tense = {s : Str ; t : Tense} ; Tense = {s : Str ; t : Tense} ;
Pol = {s : Str ; p : Bool} ;
Ant = {s : Str ; a : Anteriority} ; Ant = {s : Str ; a : Anteriority} ;
PP = {s : Str} ; PP = {s : Str} ;

View File

@@ -39,7 +39,7 @@ lin
DetNP = detNounPhrase ; DetNP = detNounPhrase ;
NDetNP = numDetNounPhrase ; NDetNP = numDetNounPhrase ;
---- NDetNum = justNumDetNounPhrase ; NDetNum d n = numDetNounPhrase d n emptyCommNounPhrase ;
MassNP = partNounPhrase singular ; MassNP = partNounPhrase singular ;
AppN2 = appFunComm ; AppN2 = appFunComm ;
@@ -81,7 +81,7 @@ lin
---- ComplA2S = predAdjSent2 ; ---- ComplA2S = predAdjSent2 ;
---- AdjPart = adjPastPart ; AdjPart verb = {s = \\a => verb.s ! PastPartPass a} ;
---- UseV2V x = verb2aux x ** {isAux = False} ; ---- UseV2V x = verb2aux x ** {isAux = False} ;
@@ -92,7 +92,7 @@ lin
UseCl tp cl = {s = tp.s ++ cl.s ! tp.b ! VFinite SDecl tp.t tp.a} ; 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} ; 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} ; UseRCl tp cl = {s = \\n => tp.s ++ cl.s ! tp.b ! VFinite SDecl tp.t tp.a ! n} ;
PosTP t a = {s = t.s ++ a.s ; b = True ; t = t.t ; a = a.a} ; PosTP t a = {s = t.s ++ a.s ; b = True ; t = t.t ; a = a.a} ;
NegTP t a = {s = t.s ++ a.s ; b = False ; t = t.t ; a = a.a} ; NegTP t a = {s = t.s ++ a.s ; b = False ; t = t.t ; a = a.a} ;
@@ -101,6 +101,9 @@ lin
TPast = {s = [] ; t = Past} ; TPast = {s = [] ; t = Past} ;
TFuture = {s = [] ; t = Future} ; TFuture = {s = [] ; t = Future} ;
TConditional = {s = [] ; t = Conditional} ; TConditional = {s = [] ; t = Conditional} ;
PPos = {s = [] ; p = True} ;
PNeg = {s = [] ; p = False} ;
ASimul = {s = [] ; a = Simul} ; ASimul = {s = [] ; a = Simul} ;
AAnter = {s = [] ; a = Anter} ; AAnter = {s = [] ; a = Anter} ;

View File

@@ -42,6 +42,8 @@ oper
CommNounPhrase = {s : Bool => Number => Case => Str ; g : Gender} ; CommNounPhrase = {s : Bool => Number => Case => Str ; g : Gender} ;
emptyCommNounPhrase : CommNounPhrase = {s = \\_,_,_ => [] ; g = NonHuman} ;
noun2CommNounPhrase : CommNoun -> CommNounPhrase = \man -> noun2CommNounPhrase : CommNoun -> CommNounPhrase = \man ->
useCN man ** {g = man.g} ; useCN man ** {g = man.g} ;
@@ -323,7 +325,6 @@ oper
adj2adjPhrase : Adjective -> AdjPhrase = \uusi -> adj2adjPhrase : Adjective -> AdjPhrase = \uusi ->
{s = \\_ => uusi.s} ; {s = \\_ => uusi.s} ;
--3 Comparison adjectives --3 Comparison adjectives
-- --
-- Each of the comparison forms has a characteristic use: -- Each of the comparison forms has a characteristic use:
@@ -503,8 +504,8 @@ oper
SType = SDecl | SQuest ; SType = SDecl | SQuest ;
VIForm = VIForm =
VIInfinit Anteriority VIInfinit
| VIImperat Number | VIImperat
| VIInf3Iness | VIInf3Iness
| VIInf3Elat | VIInf3Elat
| VIInf3Illat | VIInf3Illat
@@ -517,7 +518,8 @@ oper
oper oper
Clause : Type = {s : Bool => SForm => Str} ; Clause : Type = {s : Bool => SForm => Str} ;
VerbPhraseInf : Type = {s : Bool => VIForm => Str ; sc : Case} ; VerbPhraseInf : Type = {s : VIForm => Number => Str ; sc : Case} ;
VerbClauseInf : Type = {s : Bool => Anteriority => VIForm => Number => Str ; sc : Case} ;
Sats : Type = { Sats : Type = {
subj : Str ; subj : Str ;
@@ -527,7 +529,7 @@ oper
} ; } ;
obj : Bool => SVIForm => Str ; obj : Bool => SVIForm => Str ;
comp : Str ; comp : Str ;
vpi : VerbPhraseInf vpi : Bool => VerbPhraseInf
} ; } ;
sats2clause : Sats -> Clause = \sats -> sats2clause : Sats -> Clause = \sats ->
@@ -546,7 +548,8 @@ oper
} }
} ; } ;
sats2verbPhrase : {s : Str ; a : Anteriority} -> Sats -> VerbPhraseInf = \a,sats -> {-
sats2verbClause : {s : Str ; a : Anteriority} -> Sats -> VerbPhraseInf = \a,sats ->
{s = \\b,vi => {s = \\b,vi =>
let let
inf = sats.vpi.s ! b ! vi ; inf = sats.vpi.s ! b ! vi ;
@@ -556,7 +559,7 @@ oper
a.s ++ inf ++ obj ++ comp ; a.s ++ inf ++ obj ++ comp ;
sc = sats.vpi.sc sc = sats.vpi.sc
} ; } ;
-}
questPart : Str -> Str = \s -> glueParticle s "ko" ; --- "kö" questPart : Str -> Str = \s -> glueParticle s "ko" ; --- "kö"
mkSats : NounPhrase -> Verb1 -> Sats = \subj,verb -> mkSats : NounPhrase -> Verb1 -> Sats = \subj,verb ->
@@ -572,12 +575,12 @@ oper
pred = \\b,sf => vi b (SCl sf) ; pred = \\b,sf => vi b (SCl sf) ;
obj = \\_,_ => [] ; obj = \\_,_ => [] ;
comp = [] ; comp = [] ;
vpi = { vpi = \\b => {
s = \\b,f => let vp = vi b (SVI f) in vp.fin ++ vp.inf ; s = \\f,n => let vp = vi b (SVI f) in vp.fin ++ vp.inf ;
sc = sc sc = sc
} }
} ; } ;
{- ----
progressiveSats : NounPhrase -> VerbPhraseInf -> Sats = \subj,vp -> progressiveSats : NounPhrase -> VerbPhraseInf -> Sats = \subj,vp ->
let let
np = case vp.sc of { np = case vp.sc of {
@@ -590,12 +593,12 @@ oper
pred = \\b,sf => vi b (SCl sf) ; pred = \\b,sf => vi b (SCl sf) ;
obj = \\_,_ => [] ; obj = \\_,_ => [] ;
comp = vp.s ! True ! VIInf3Iness ; comp = vp.s ! True ! VIInf3Iness ;
vpi = { vpi = \\b => {
s = \\b,f => let vv = vi b (SVI f) in vv.fin ++ vv.inf ; s = \\f => let vv = vi b (SVI f) in vv.fin ++ vv.inf ;
sc = Nom sc = Nom
} }
} ; } ;
-}
mkSatsObject : NounPhrase -> TransVerb -> NounPhrase -> Sats = \subj,verb,obj -> mkSatsObject : NounPhrase -> TransVerb -> NounPhrase -> Sats = \subj,verb,obj ->
insertObject (mkSats subj verb) verb.c verb.s3 verb.p obj ; insertObject (mkSats subj verb) verb.c verb.s3 verb.p obj ;
@@ -691,7 +694,7 @@ oper
SCl (VFinite _ Conditional a) => ei a (Cond n p) (Cond Sg P3) ; SCl (VFinite _ Conditional a) => ei a (Cond n p) (Cond Sg P3) ;
SCl (VFinite _ Present a) => ei a (Pres n p) (Imper Sg) ; SCl (VFinite _ Present a) => ei a (Pres n p) (Imper Sg) ;
SCl (VFinite _ Future a) => fut a (Pres n p) (Imper Sg) ; SCl (VFinite _ Future a) => fut a (Pres n p) (Imper Sg) ;
SVI (VIImperat n ) => älä n ; SVI (VIImperat ) => älä n ;
SVI i => inf i Simul ---- Anter SVI i => inf i Simul ---- Anter
} ; } ;
@@ -1133,8 +1136,8 @@ oper
Imperative = SS1 Number ; Imperative = SS1 Number ;
imperVerbPhrase : Bool -> VerbPhraseInf -> Imperative = \b,ui -> imperVerbPhrase : Bool -> VerbClauseInf -> Imperative = \b,ui ->
{s = \\n => ui.s ! b ! VIImperat n} ; {s = ui.s ! b ! Simul ! VIImperat} ;
imperUtterance : Number -> Imperative -> Utterance = \n,I -> imperUtterance : Number -> Imperative -> Utterance = \n,I ->
ss (I.s ! n ++ exclPunct) ; ss (I.s ! n ++ exclPunct) ;

View File

@@ -927,8 +927,8 @@ oper
Imperative = {s : Gender => Number => Str} ; Imperative = {s : Gender => Number => Str} ;
imperVerbPhrase : Bool -> VerbPhrase -> Imperative = \b,dormir -> imperVerbPhrase : Bool -> VerbClause -> Imperative = \b,dormir ->
{s = \\g,n => dormir.s ! VIImperat b n ! g ! n ! P2 {s = \\g,n => dormir.s ! b ! Simul ! VIImperat b n ! g ! n ! P2
} ; } ;
imperUtterance : Number -> Imperative -> Utterance = \n,I -> imperUtterance : Number -> Imperative -> Utterance = \n,I ->

View File

@@ -1427,9 +1427,9 @@ oper
Imperative = {s : Number => Str} ; Imperative = {s : Number => Str} ;
imperVerbPhrase : Bool -> VerbPhrase -> Imperative = \b,titta -> imperVerbPhrase : Bool -> VerbClause -> Imperative = \b,titta ->
{s = \\n => {s = \\n =>
titta.s ! VIImperat b ! utrum ! n ! P2 titta.s ! b ! Simul ! VIImperat b ! utrum ! n ! P2
} ; } ;
imperUtterance : Number -> Imperative -> Utterance = \n,I -> imperUtterance : Number -> Imperative -> Utterance = \n,I ->