1
0
forked from GitHub/gf-rgl

various additions to extralat

This commit is contained in:
Herbert Lange
2019-11-12 14:54:51 +01:00
parent ed4ff97b7b
commit e46f120de3
2 changed files with 106 additions and 7 deletions

View File

@@ -1,9 +1,10 @@
concrete ExtraLat of ExtraLatAbs =
CatLat, ConjunctionLat **
open ResLat, ParadigmsLat, Coordination, Prelude in {
lincat CS = Str ;
open ResLat, ParadigmsLat, RelativeLat, NounLat, Prelude in {
lincat CS = SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str ;
TestRS = { s : Gender => Number => SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str } ;
lin
useS s = combineSentence s ! SPreO ! PreO ! CPreV ! SOV ;
useS s = combineSentence s ;
-- PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
-- PastPartAP vp = { s = vp.part ! VPassPerf } ;
@@ -51,5 +52,82 @@ concrete ExtraLat of ExtraLatAbs =
inAbl_Prep = mkPrep "in" Abl ;
onAbl_Prep = mkPrep "in" Abl ; -- L...
UttSSVO s = { s = combineSentence s ! SPreS ! PreS ! CPreV ! SVO };
-- UttS_SVO : S -> Utt
UttS_SVO s = { s = defaultSentence s ! SVO };
-- UttS_VInS : S -> Utt
UttS_VInS s = { s = combineSentence s ! SAPreS ! APreV ! DPostN ! VInS ! CPostV ! SVO } ;
TestRCl t p cl = {
s = \\g,n => combineSentence (combineClause (cl ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ;
} ;
-- UseRCl_OSV : Temp -> Pol -> RCl -> RS ;
UseRCl_OSV t p cl = {
s = \\g,n => combineSentence (combineClause (cl ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreO ! APreV ! DPreN ! VReg ! CPostV ! OSV ;
} ;
-- UseRCl_OVS : Temp -> Pol -> RCl -> RS ;
UseRCl_OVS t p cl = {
s = \\g,n => combineSentence (combineClause (cl ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreO ! APreV ! DPreN ! VReg ! CPostV ! OVS ; -- SAPreO APreV DPreN VReg CPostV OVS
} ;
-- UseRCl_SOV : Temp -> Pol -> RCl -> RS ;
UseRCl_SOV t p cl = {
s = \\g,n => combineSentence (combineClause (cl ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreS ! APreV ! DPreN ! VReg ! CPostV ! SOV ;
} ;
-- UseRCl_SVO : Temp -> Pol -> RCl -> RS ;
UseRCl_SVO t p cl = {
s = \\g,n => combineSentence (combineClause (cl ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreS ! APreV ! DPreN ! VReg ! CPostV ! SVO ;
} ;
-- PrepNP_DPostN : Prep -> NP -> Adv ; -- in the house
PrepNP_DPostN prep np =
mkAdv (prep.s ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPostN ! prep.c ) ;
-- ApposCN_DPostN : CN -> NP -> CN
ApposCN_DPostN cn np =
cn **
{
s = \\n,c => cn.s ! n ! c ++ (combineNounPhrase np) ! PronNonDrop ! APostN ! DPostN ! c ;
} ; -- massable = cn.massable } ;
-- CompNP_DPostN : NP -> Comp ; -- (be) the man
CompNP np = {s = \\_ =>
(combineNounPhrase np) ! PronNonDrop ! DPostN ! Nom
} ;
-- DetNP_Fem : Det -> NP ; -- these five
DetNP_Fem det = {
s = \\_ => det.s ! Fem ;
g = Fem ;
n = det.n ;
p = P3 ;
adv = "" ;
preap, postap = { s = \\_ => "" } ;
det = { s,sp = \\_ => "" ; n = det.n } ;
} ;
-- AdjAsNP_Fem : AP -> NP ; -- green (is good)
AdjAsNP_Fem ap = {
s = \\_,c => ap.s ! (Ag Fem Sg c) ;
adv = "" ;
det = { s, sp = \\_ => "" } ;
g = Fem ;
n = Sg ;
p = P3 ;
postap = { s = \\_ => "" } ;
preap = { s = \\_ => "" } ;
} ;
-- PredVP_VP_Ellipsis : NP -> VP -> Cl
PredVP_VP_Ellipsis np =
mkClause np emptyVP ;
-- SlashVP_VP_Ellipsis : NP -> VPSlash -> ClSlash ; -- (whom) he sees
SlashVP_VP_Ellipsis np =
mkClause np emptyVP ;
-- FunRP_RP_Ellipsis : Prep -> NP -> RP ;
FunRP_RP_Ellipsis p np = FunRP p np (lin RP { s = \\_ => "" }) ;
RelNP_NP_Ellipsis rs = RelNP emptyNP rs ;
comma_Conj = mkConj "" "," "" Pl Comma ;
}

View File

@@ -1,7 +1,8 @@
abstract ExtraLatAbs =
Conjunction
** {
cat CS ;
cat CS ;
TestRS ;
fun
useS : S -> CS ;
-- do not drop pronouns
@@ -30,6 +31,26 @@ abstract ExtraLatAbs =
inAbl_Prep : Prep ;
onAbl_Prep : Prep ;
-- Add all the word orders
UttSSVO : S -> Utt ;
-- Add other word orders
UttS_SVO : S -> Utt ;
UttS_VInS : S -> Utt ;
TestRCl : Temp -> Pol -> RCl -> TestRS ;
UseRCl_OSV : Temp -> Pol -> RCl -> RS ;
UseRCl_OVS : Temp -> Pol -> RCl -> RS ;
UseRCl_SOV : Temp -> Pol -> RCl -> RS ;
UseRCl_SVO : Temp -> Pol -> RCl -> RS ;
PrepNP_DPostN : Prep -> NP -> Adv ;
ApposCN_DPostN : CN -> NP -> CN ;
-- More genders
DetNP_Fem : Det -> NP ;
AdjAsNP_Fem : AP -> NP ;
-- Ellipsis
PredVP_VP_Ellipsis : NP -> Cl ;
SlashVP_VP_Ellipsis : NP -> ClSlash ;
FunRP_RP_Ellipsis : Prep -> NP -> RP ;
RelNP_NP_Ellipsis : RS -> NP ;
comma_Conj : Conj ;
}