1
0
forked from GitHub/gf-rgl

fix clauses

This commit is contained in:
Herbert Lange
2019-11-12 14:50:08 +01:00
parent 6864f61e92
commit f60a4a2052

View File

@@ -1322,8 +1322,8 @@ oper
Clause = Clause =
{s : AdvPos => Str ; {s : AdvPos => Str ;
o : AdvPos => Str ; o : AdvPos => Str ;
v : Tense => Anteriority => VQForm => AdvPos => ComplPos => Str ; v : Tense => Anteriority => VQForm => AdvPos => Str ;
det : Determiner ; det : { s , sp : Case => Str } ;
compl : Str ; compl : Str ;
neg : Polarity => AdvPos => Str ; neg : Polarity => AdvPos => Str ;
adv : Str } ; adv : Str } ;
@@ -1337,41 +1337,39 @@ oper
compl = vp.compl ! Ag np.g np.n Nom ; compl = vp.compl ! Ag np.g np.n Nom ;
-- helper functions to either place the adverb in the designated position -- helper functions to either place the adverb in the designated position
-- or an empty string instead -- or an empty string instead
pres : AdvPos -> Str = \ap -> case ap of { PreS => adv ; _ => [] } ; pres : AdvPos -> Str = \ap -> case ap of { APreS => adv ; _ => [] } ;
prev : AdvPos -> Str = \ap -> case ap of { PreV => adv ; _ => [] } ; prev : AdvPos -> Str = \ap -> case ap of { APreV => adv ; _ => [] } ;
preo : AdvPos -> Str = \ap -> case ap of { PreO => adv ; _ => [] } ; preo : AdvPos -> Str = \ap -> case ap of { APreO => adv ; _ => [] } ;
preneg : AdvPos -> Str = \ap -> case ap of { PreNeg => adv ; _ => [] } ; preneg : AdvPos -> Str = \ap -> case ap of { APreNeg => adv ; _ => [] } ;
ins : AdvPos -> Str = \ap -> case ap of { InS => adv ; _ => [] } ; ins : AdvPos -> Str = \ap -> case ap of { AInS => adv ; _ => [] } ;
inv : AdvPos -> Str = \ap -> case ap of { InV => adv ; _ => [] } ; inv : AdvPos -> Str = \ap -> case ap of { AInV => adv ; _ => [] } ;
-- cprev : ComplPos -> Str = \cp -> case cp of { CPreV => compl ; _ => [] } ;
-- cpostv : ComplPos -> Str = \cp -> case cp of { CPostV => compl ; _ => [] }
in in
{ {
-- subject part of the clause: -- subject part of the clause:
-- advpos is the adverb position in the clause -- advpos is the adverb position in the clause
s = \\advpos => s = \\advpos =>
pres advpos ++ -- adverbs can be placed in the beginning of the clause pres advpos ++ -- adverbs can be placed in the beginning of the clause
np.det.s ! np.g ! Nom ++ -- the determiner, if any -- np.det.s ! np.g ! Nom ++ -- the determiner, if any
np.preap.s ! (Ag np.g np.n Nom) ++ -- adjectives which come before the subject noun, agreeing with it np.preap.s ! (Ag np.g np.n Nom) ++ -- adjectives which come before the subject noun, agreeing with it
ins advpos ++ -- adverbs can be placed within the subject noun phrase ins advpos ++ -- adverbs can be placed within the subject noun phrase
np.s ! PronDrop ! Nom ++ -- the noun of the subject noun phrase in nominative np.s ! PronDrop ! Nom ++ -- the noun of the subject noun phrase in nominative
np.postap .s ! (Ag np.g np.n Nom) ++ -- adjectives which come after the subject noun, agreeing with it np.postap .s ! (Ag np.g np.n Nom) ; -- adjectives which come after the subject noun, agreeing with it
np.det.sp ! np.g ! Nom ; -- second part of split determiners -- np.det.sp ! np.g ! Nom ; -- second part of split determiners
-- verb part of the clause: -- verb part of the clause:
-- tense and anter(ority) for the verb tense -- tense and anter(ority) for the verb tense
-- vqf is the VQForm parameter which defines if the ordinary verbform or the quistion form with suffix "-ne" will be used -- vqf is the VQForm parameter which defines if the ordinary verbform or the quistion form with suffix "-ne" will be used
-- advposis the adverb position in the clause -- advposis the adverb position in the clause
-- comppos is the position of the verb complement -- comppos is the position of the verb complement
v = \\tense,anter,vqf,advpos,complpos => v = \\tense,anter,vqf,advpos =>
prev advpos ++ -- adverbs can be placed in the before the verb phrase prev advpos ++ -- adverbs can be placed in the before the verb phrase
-- cprev complpos ++ -- verb phrase complement, e.g. predicative expression, agreeing with the subject, can go before the verb -- cprev complpos ++ -- verb phrase complement, e.g. predicative expression, agreeing with the subject, can go before the verb
inv advpos ++ -- adverbs can be placed within the verb phrase inv advpos ++ -- adverbs can be placed within the verb phrase
-- verb form with conversion between different forms of tense and aspect -- verb form with conversion between different forms of tense and aspect
vp.s ! VAct ( anteriorityToVAnter anter ) ( tenseToVTense tense ) np.n np.p ! vqf ; -- ++ vp.s ! VAct ( anteriorityToVAnter anter ) ( tenseToVTense tense ) np.n np.p ! vqf ; -- ++
-- cpostv complpos ; -- complement can also go after the verb -- cpostv complpos ; -- complement can also go after the verb
det = np.det ; --{ s = np.det.s ! np.g ; sp = np.det.sp ; n = np.n } ;
-- verb complement -- verb complement
vcompl = compl ; compl = compl ;
-- object part of the clause -- object part of the clause
o = \\advpos => preo advpos ++ vp.obj ; o = \\advpos => preo advpos ++ vp.obj ;
-- optional negation particle, adverbs can be placed before the negation -- optional negation particle, adverbs can be placed before the negation
@@ -1380,11 +1378,11 @@ oper
} ; } ;
combineClause : Clause -> C.Tense -> Anteriority -> C.Pol -> VQForm -> Sentence = \cl,tense,anter,pol,vqf -> combineClause : Clause -> C.Tense -> Anteriority -> C.Pol -> VQForm -> Sentence = \cl,tense,anter,pol,vqf ->
{ s = cl.s ; cl **
o = cl.o ; {
v = cl.v ! tense.t ! anter ! vqf ; v = \\advpos => cl.v ! tense.t ! anter ! vqf ! advpos ;
neg = cl.neg ! pol.p ; neg = cl.neg ! pol.p ;
sadv = "" ; sadv = cl.adv ;
t = tense ; t = tense ;
p = pol ; p = pol ;
} ; } ;