mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
various additions to extralat
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
concrete ExtraLat of ExtraLatAbs =
|
concrete ExtraLat of ExtraLatAbs =
|
||||||
CatLat, ConjunctionLat **
|
CatLat, ConjunctionLat **
|
||||||
open ResLat, ParadigmsLat, Coordination, Prelude in {
|
open ResLat, ParadigmsLat, RelativeLat, NounLat, Prelude in {
|
||||||
lincat CS = Str ;
|
lincat CS = SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str ;
|
||||||
|
TestRS = { s : Gender => Number => SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str } ;
|
||||||
lin
|
lin
|
||||||
useS s = combineSentence s ! SPreO ! PreO ! CPreV ! SOV ;
|
useS s = combineSentence s ;
|
||||||
-- PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
|
-- PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
|
||||||
-- PastPartAP vp = { s = vp.part ! VPassPerf } ;
|
-- PastPartAP vp = { s = vp.part ! VPassPerf } ;
|
||||||
|
|
||||||
@@ -51,5 +52,82 @@ concrete ExtraLat of ExtraLatAbs =
|
|||||||
inAbl_Prep = mkPrep "in" Abl ;
|
inAbl_Prep = mkPrep "in" Abl ;
|
||||||
onAbl_Prep = mkPrep "in" Abl ; -- L...
|
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 ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ abstract ExtraLatAbs =
|
|||||||
Conjunction
|
Conjunction
|
||||||
** {
|
** {
|
||||||
cat CS ;
|
cat CS ;
|
||||||
|
TestRS ;
|
||||||
fun
|
fun
|
||||||
useS : S -> CS ;
|
useS : S -> CS ;
|
||||||
-- do not drop pronouns
|
-- do not drop pronouns
|
||||||
@@ -30,6 +31,26 @@ abstract ExtraLatAbs =
|
|||||||
inAbl_Prep : Prep ;
|
inAbl_Prep : Prep ;
|
||||||
onAbl_Prep : Prep ;
|
onAbl_Prep : Prep ;
|
||||||
|
|
||||||
-- Add all the word orders
|
-- Add other word orders
|
||||||
UttSSVO : S -> Utt ;
|
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 ;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user