mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
Merge remote-tracking branch 'upstream/master' into morpho
This commit is contained in:
@@ -17,7 +17,8 @@ lin
|
|||||||
has_age_VP card = mkVP have_V2 (mkNP <lin Card card : Card> L.year_N) ;
|
has_age_VP card = mkVP have_V2 (mkNP <lin Card card : Card> L.year_N) ;
|
||||||
|
|
||||||
have_name_Cl x y = mkCl x (mkV2 (reflV (mkV "chamar"))) y ;
|
have_name_Cl x y = mkCl x (mkV2 (reflV (mkV "chamar"))) y ;
|
||||||
married_Cl x y = mkCl (lin NP x) L.married_A2 (lin NP y) | mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (mkA "casado") ;
|
married_Cl x y = mkCl (lin NP x) L.married_A2 (lin NP y)
|
||||||
|
| mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (mkA "casado") ;
|
||||||
|
|
||||||
what_name_QCl x = mkQCl how_IAdv (mkCl (lin NP x) (reflV (mkV "chamar"))) ;
|
what_name_QCl x = mkQCl how_IAdv (mkCl (lin NP x) (reflV (mkV "chamar"))) ;
|
||||||
how_old_QCl x = mkQCl (mkIP how8many_IDet L.year_N) x have_V2 ;
|
how_old_QCl x = mkQCl (mkIP how8many_IDet L.year_N) x have_V2 ;
|
||||||
@@ -29,12 +30,18 @@ lin
|
|||||||
is_right_VP = mkVP (mkVA B.estar_V) (mkAP (mkA "certo")) ;
|
is_right_VP = mkVP (mkVA B.estar_V) (mkAP (mkA "certo")) ;
|
||||||
is_wrong_VP = mkVP (mkVA B.estar_V) (mkAP (mkA "errado")) ;
|
is_wrong_VP = mkVP (mkVA B.estar_V) (mkAP (mkA "errado")) ;
|
||||||
|
|
||||||
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) (lin A a) ;
|
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn))))
|
||||||
|
(lin A a) ;
|
||||||
|
n_units_of_NP card cn np = mkNP card (mkCN (lin N2 cn) np) ;
|
||||||
|
n_unit_CN card cn cn = mkCN (invarA ("de" ++ card.s ! cn.g ++ cn.s ! card.n)) cn ;
|
||||||
|
|
||||||
bottle_of_CN np = mkCN (lin N2 (mkN2 (mkN "garrafa" feminine) part_Prep)) np ;
|
bottle_of_CN np = mkCN (lin N2 (mkN2 (mkN "garrafa" feminine) part_Prep)) np ;
|
||||||
cup_of_CN np = mkCN (lin N2 (mkN2 (mkN "copo") part_Prep)) np ;
|
cup_of_CN np = mkCN (lin N2 (mkN2 (mkN "copo") part_Prep)) np ;
|
||||||
glass_of_CN np = mkCN (lin N2 (mkN2 (mkN "taça") part_Prep)) np ;
|
glass_of_CN np = mkCN (lin N2 (mkN2 (mkN "taça") part_Prep)) np ;
|
||||||
|
|
||||||
|
-- falta X para NP ser Y
|
||||||
|
few_X_short_of_Y np cn cn = variants {} ;
|
||||||
|
|
||||||
{-
|
{-
|
||||||
-- spatial deixis and motion verbs
|
-- spatial deixis and motion verbs
|
||||||
|
|
||||||
@@ -48,11 +55,11 @@ lin
|
|||||||
go_there_VP = mkVP (mkVP L.go_V) there_Adv ;
|
go_there_VP = mkVP (mkVP L.go_V) there_Adv ;
|
||||||
come_there_VP = mkVP (mkVP L.come_V) there_Adv ;
|
come_there_VP = mkVP (mkVP L.come_V) there_Adv ;
|
||||||
come_from_there_VP = mkVP (mkVP L.come_V) (mkAdv "de allí") ; -- "de allá"
|
come_from_there_VP = mkVP (mkVP L.come_V) (mkAdv "de allí") ; -- "de allá"
|
||||||
-}
|
-}
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Timeunit = N ;
|
Timeunit = N ;
|
||||||
Hour = {s : Str ; pe : Period ; n : Number} ;
|
Hour = {s : Str ; pe : Period ; n : ParadigmsPor.Number} ;
|
||||||
Weekday = N ;
|
Weekday = N ;
|
||||||
Monthday = NP ;
|
Monthday = NP ;
|
||||||
Month = N ;
|
Month = N ;
|
||||||
@@ -97,15 +104,15 @@ lin
|
|||||||
twentyThreeHour = mkHour "23" Noite Pl ;
|
twentyThreeHour = mkHour "23" Noite Pl ;
|
||||||
twentyFourHour = {s = "meia-noite" ; pe = None ; n = Sg} ;
|
twentyFourHour = {s = "meia-noite" ; pe = None ; n = Sg} ;
|
||||||
|
|
||||||
timeHour h = mkAdv (R.a ! Fem ! h.n ++ h.s ++ period ! h.pe) ;
|
timeHour h = ParadigmsPor.mkAdv (R.a ! Fem ! h.n ++ h.s ++ period ! h.pe) ;
|
||||||
|
|
||||||
timeHourMinute h m = let
|
timeHourMinute h m = let
|
||||||
min = m.s ! Masc
|
min = m.s ! Masc
|
||||||
in
|
in
|
||||||
mkAdv (R.a ! Fem ! h.n ++ h.s ++ "e" ++ min ++ period ! h.pe) ;
|
ParadigmsPor.mkAdv (R.a ! Fem ! h.n ++ h.s ++ "e" ++ min ++ period ! h.pe) ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
mkHour : Str -> Period -> Number -> {s : Str ; pe : Period ; n : Number} ;
|
mkHour : Str -> Period -> ParadigmsPor.Number -> {s : Str ; pe : Period ; n : ParadigmsPor.Number} ;
|
||||||
mkHour num pe n = S.mkUtt (S.mkCard num) ** {pe = pe ; n = n} ;
|
mkHour num pe n = S.mkUtt (S.mkCard num) ** {pe = pe ; n = n} ;
|
||||||
|
|
||||||
period : Period => Str ;
|
period : Period => Str ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:../romance:../abstract:../common:../prelude
|
--# -path=.:../romance:../abstract:../common:../prelude
|
||||||
|
|
||||||
instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRomance, PhonoPor, BeschPor, Prelude in {
|
instance DiffPor of DiffRomance - [chooseTA,partAgr,vpAgrSubj,vpAgrClits] = open CommonRomance, PhonoPor, BeschPor, Prelude in {
|
||||||
|
|
||||||
flags optimize=noexpand ;
|
flags optimize=noexpand ;
|
||||||
coding=utf8 ;
|
coding=utf8 ;
|
||||||
@@ -199,6 +199,23 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo
|
|||||||
vpAgrClit : Agr -> VPAgr = \a ->
|
vpAgrClit : Agr -> VPAgr = \a ->
|
||||||
vpAgrNone ;
|
vpAgrNone ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
chooseTA : RTense -> Anteriority
|
||||||
|
-> (VF => Str) -> (VF => Str)
|
||||||
|
-> Number -> Person -> Mood -> Str -> Str * Str ;
|
||||||
|
chooseTA t a verb vaux n p m part = case <t,a> of {
|
||||||
|
<RPast,Simul> => <verb ! VFin VPasse n p, []> ; --# notpresent
|
||||||
|
<RPast,Anter> => <vaux ! VFin (VImperf m) n p, part> ; --# notpresent
|
||||||
|
<RFut,Simul> => <verb ! VFin VFut n p, []> ; --# notpresent
|
||||||
|
<RFut,Anter> => <vaux ! VFin VFut n p, part> ; --# notpresent
|
||||||
|
<RCond,Simul> => <verb ! VFin VCondit n p, []> ; --# notpresent
|
||||||
|
<RCond,Anter> => <vaux ! VFin VCondit n p, part> ; --# notpresent
|
||||||
|
<RPasse,Simul> => <verb ! VFin VPasse n p, []> ; --# notpresent
|
||||||
|
<RPasse,Anter> => <vaux ! VFin VPasse n p, part> ; --# notpresent
|
||||||
|
<RPres,Anter> => <verb ! VFin (VImperf m) n p, []> ; --# notpresent
|
||||||
|
<RPres,Simul> => <verb ! VFin (VPres m) n p, []>
|
||||||
|
} ;
|
||||||
|
|
||||||
-- oper's opers
|
-- oper's opers
|
||||||
oper
|
oper
|
||||||
argPron : Gender -> Number -> Person -> Case -> Str =
|
argPron : Gender -> Number -> Person -> Case -> Str =
|
||||||
@@ -216,8 +233,8 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo
|
|||||||
\g,n,p -> case <<g,n,p> : Gender * Number * Person> of {
|
\g,n,p -> case <<g,n,p> : Gender * Number * Person> of {
|
||||||
<_,Sg,P1> => cases "me" "mim" ;
|
<_,Sg,P1> => cases "me" "mim" ;
|
||||||
<_,Sg,P2> => cases "te" "ti" ;
|
<_,Sg,P2> => cases "te" "ti" ;
|
||||||
<_,Pl,P1> => cases "nos" "nós" ; --- nosotros
|
<_,Pl,P1> => cases "nos" "nós" ;
|
||||||
<_,Pl,P2> => cases "vos" "vós" ; --- vosotros
|
<_,Pl,P2> => cases "vos" "vós" ;
|
||||||
<Fem,Sg,P3> => cases3 "a" "sua" "ela" ;
|
<Fem,Sg,P3> => cases3 "a" "sua" "ela" ;
|
||||||
<_, Sg,P3> => cases3 "o" "seu" "ele" ;
|
<_, Sg,P3> => cases3 "o" "seu" "ele" ;
|
||||||
<Fem,Pl,P3> => cases3 "as" "suas" "elas" ;
|
<Fem,Pl,P3> => cases3 "as" "suas" "elas" ;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ oper
|
|||||||
heading : N -> Str = \n -> (nounHeading n).s ;
|
heading : N -> Str = \n -> (nounHeading n).s ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
InflectionN, InflectionN3, InflectionN3 = \noun -> {
|
InflectionN, InflectionN2, InflectionN3 = \noun -> {
|
||||||
t = "n" ;
|
t = "n" ;
|
||||||
s1 = heading1 (heading noun_Category ++
|
s1 = heading1 (heading noun_Category ++
|
||||||
case noun.g of {
|
case noun.g of {
|
||||||
@@ -111,8 +111,8 @@ lin
|
|||||||
InflectionVV v = {
|
InflectionVV v = {
|
||||||
t = "v" ;
|
t = "v" ;
|
||||||
s1 = heading1 (heading verb_Category) ++
|
s1 = heading1 (heading verb_Category) ++
|
||||||
paragraph (verbExample (S.mkCl S.she_NP v (S.mkVP (L.sleep_V)))) ;
|
paragraph (verbExample (S.mkCl S.she_NP (lin VV v) (S.mkVP L.sleep_V))) ;
|
||||||
s2 = inflVerb v
|
s2 = inflVerb (lin VV v)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
InflectionVS v = {
|
InflectionVS v = {
|
||||||
@@ -223,4 +223,4 @@ oper
|
|||||||
{- --# notpresent
|
{- --# notpresent
|
||||||
-}
|
-}
|
||||||
|
|
||||||
}
|
} ;
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ concrete IdiomPor of Idiom = CatPor **
|
|||||||
s = "deixe" ++ (np.s ! Nom).ton ++ infVP vp np.a ;
|
s = "deixe" ++ (np.s ! Nom).ton ++ infVP vp np.a ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SelfAdvVP vp = vp ;
|
SelfAdvVP vp = variants {} ;
|
||||||
|
|
||||||
SelfAdVVP = insertComplement (
|
SelfAdVVP = insertComplement (
|
||||||
\\agr => case agr of {
|
\\agr => case agr of {
|
||||||
@@ -68,6 +68,6 @@ concrete IdiomPor of Idiom = CatPor **
|
|||||||
}
|
}
|
||||||
) ;
|
) ;
|
||||||
|
|
||||||
SelfNP np = np ;
|
SelfNP np = variants {} ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -182,27 +182,24 @@ oper
|
|||||||
|
|
||||||
--2 Adjectives
|
--2 Adjectives
|
||||||
compADeg : A -> A ;
|
compADeg : A -> A ;
|
||||||
compADeg a = lin A {
|
compADeg a = a ** {
|
||||||
s = table {
|
s = table {
|
||||||
Posit => a.s ! Posit ;
|
Posit => a.s ! Posit ;
|
||||||
_ => \\f => "mais" ++ a.s ! Posit ! f
|
_ => \\f => "mais" ++ a.s ! Posit ! f
|
||||||
} ;
|
} ;
|
||||||
isPre = a.isPre ;
|
|
||||||
copTyp = a.copTyp
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
liftAdj : Adj -> A ;
|
||||||
|
liftAdj adj = compADeg (lin A {s = \\_ => adj.s ; isPre = False ; copTyp = serCopula}) ;
|
||||||
|
|
||||||
regA : Str -> A ;
|
regA : Str -> A ;
|
||||||
regA a = compADeg (lin A {s = \\_ => (mkAdjReg a).s ; isPre = False ; copTyp = serCopula}) ;
|
regA a = liftAdj (mkAdjReg a) ;
|
||||||
|
|
||||||
mk2A : (único,unicamente : Str) -> A ;
|
mk2A : (único,unicamente : Str) -> A ;
|
||||||
mk2A adj adv = compADeg {s = \\_ => (mkAdj2 adj adv).s ; isPre = False ;
|
mk2A adj adv = liftAdj (mkAdj2 adj adv) ;
|
||||||
copTyp = serCopula ;
|
|
||||||
lock_A = <>} ;
|
|
||||||
|
|
||||||
mk5A : (preto,preta,pretos,pretas,pretamente : Str) -> A ;
|
mk5A : (preto,preta,pretos,pretas,pretamente : Str) -> A ;
|
||||||
mk5A a b c d e = compADeg {s = \\_ => (mkAdj a b c d e).s ;
|
mk5A a b c d e = liftAdj (mkAdj a b c d e) ;
|
||||||
isPre = False ; copTyp = serCopula ;
|
|
||||||
lock_A = <>} ;
|
|
||||||
|
|
||||||
adjCopula : A -> CopulaType -> A ;
|
adjCopula : A -> CopulaType -> A ;
|
||||||
adjCopula a cop = a ** {copTyp = cop} ;
|
adjCopula a cop = a ** {copTyp = cop} ;
|
||||||
@@ -219,6 +216,9 @@ oper
|
|||||||
copTyp = a.copTyp
|
copTyp = a.copTyp
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
invarA : Str -> A ;
|
||||||
|
invarA a = liftAdj (adjBlu a) ;
|
||||||
|
|
||||||
mkNonInflectA : A -> Str -> A ;
|
mkNonInflectA : A -> Str -> A ;
|
||||||
mkNonInflectA = \blanco,hueso -> blanco ** {s = \\x,y => blanco.s ! x ! y ++ hueso } ;
|
mkNonInflectA = \blanco,hueso -> blanco ** {s = \\x,y => blanco.s ! x ! y ++ hueso } ;
|
||||||
|
|
||||||
|
|||||||
@@ -169,5 +169,20 @@ oper
|
|||||||
|
|
||||||
contractInf : Bool -> Bool -> Bool = \_,_ -> False ; -- only True in Ita, by orB
|
contractInf : Bool -> Bool -> Bool = \_,_ -> False ; -- only True in Ita, by orB
|
||||||
|
|
||||||
}
|
chooseTA : RTense -> Anteriority
|
||||||
|
-> (VF => Str) -> (VF => Str)
|
||||||
|
-> Number -> Person -> Mood -> Str -> Str * Str ;
|
||||||
|
chooseTA t a verb vaux n p m part = case <t,a> of {
|
||||||
|
<RPast,Simul> => <verb ! VFin (VImperf m) n p, []> ; --# notpresent
|
||||||
|
<RPast,Anter> => <vaux ! VFin (VImperf m) n p, part> ; --# notpresent
|
||||||
|
<RFut,Simul> => <verb ! VFin VFut n p, []> ; --# notpresent
|
||||||
|
<RFut,Anter> => <vaux ! VFin VFut n p, part> ; --# notpresent
|
||||||
|
<RCond,Simul> => <verb ! VFin VCondit n p, []> ; --# notpresent
|
||||||
|
<RCond,Anter> => <vaux ! VFin VCondit n p, part> ; --# notpresent
|
||||||
|
<RPasse,Simul> => <verb ! VFin VPasse n p, []> ; --# notpresent
|
||||||
|
<RPasse,Anter> => <vaux ! VFin VPasse n p, part> ; --# notpresent
|
||||||
|
<RPres,Anter> => <vaux ! VFin (VPres m) n p, part> ; --# notpresent
|
||||||
|
<RPres,Simul> => <verb ! VFin (VPres m) n p, []>
|
||||||
|
} ;
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|||||||
@@ -228,18 +228,7 @@ oper
|
|||||||
---- } ;
|
---- } ;
|
||||||
|
|
||||||
|
|
||||||
vps : Str * Str = case <te,a> of {
|
vps : Str * Str = chooseTA te a verb vaux num per m part ;
|
||||||
<RPast,Simul> => <verb ! VFin (VImperf m) num per, []> ; --# notpresent
|
|
||||||
<RPast,Anter> => <vaux ! VFin (VImperf m) num per, part> ; --# notpresent
|
|
||||||
<RFut,Simul> => <verb ! VFin (VFut) num per, []> ; --# notpresent
|
|
||||||
<RFut,Anter> => <vaux ! VFin (VFut) num per, part> ; --# notpresent
|
|
||||||
<RCond,Simul> => <verb ! VFin (VCondit) num per, []> ; --# notpresent
|
|
||||||
<RCond,Anter> => <vaux ! VFin (VCondit) num per, part> ; --# notpresent
|
|
||||||
<RPasse,Simul> => <verb ! VFin (VPasse) num per, []> ; --# notpresent
|
|
||||||
<RPasse,Anter> => <vaux ! VFin (VPasse) num per, part> ; --# notpresent
|
|
||||||
<RPres,Anter> => <vaux ! VFin (VPres m) num per, part> ; --# notpresent
|
|
||||||
<RPres,Simul> => <verb ! VFin (VPres m) num per, []>
|
|
||||||
} ;
|
|
||||||
|
|
||||||
fin = vps.p1 ;
|
fin = vps.p1 ;
|
||||||
inf = vps.p2 ;
|
inf = vps.p2 ;
|
||||||
|
|||||||
@@ -113,19 +113,8 @@ incomplete concrete SentenceRomance of Sentence =
|
|||||||
---- VPAgrClit g n => verb ! VPart g n
|
---- VPAgrClit g n => verb ! VPart g n
|
||||||
---- } ;
|
---- } ;
|
||||||
|
|
||||||
vpss : Str * Str = case <te,a> of {
|
vpss : Str * Str = chooseTA te a verb vaux num per m part ;
|
||||||
|
|
||||||
<RPast,Simul> => <verb ! VFin (VImperf m) num per, []> ; --# notpresent
|
|
||||||
<RPast,Anter> => <vaux ! VFin (VImperf m) num per, part> ; --# notpresent
|
|
||||||
<RFut,Simul> => <verb ! VFin (VFut) num per, []> ; --# notpresent
|
|
||||||
<RFut,Anter> => <vaux ! VFin (VFut) num per, part> ; --# notpresent
|
|
||||||
<RCond,Simul> => <verb ! VFin (VCondit) num per, []> ; --# notpresent
|
|
||||||
<RCond,Anter> => <vaux ! VFin (VCondit) num per, part> ; --# notpresent
|
|
||||||
<RPasse,Simul> => <verb ! VFin (VPasse) num per, []> ; --# notpresent
|
|
||||||
<RPasse,Anter> => <vaux ! VFin (VPasse) num per, part> ; --# notpresent
|
|
||||||
<RPres,Anter> => <vaux ! VFin (VPres m) num per, part> ; --# notpresent
|
|
||||||
<RPres,Simul> => <verb ! VFin (VPres m) num per, []>
|
|
||||||
} ;
|
|
||||||
fin = vpss.p1 ;
|
fin = vpss.p1 ;
|
||||||
inf = vpss.p2 ;
|
inf = vpss.p2 ;
|
||||||
hypt = verbHyphen vp.s ; -- in French, -t- in some cases, otherwise - ; empty in other langs
|
hypt = verbHyphen vp.s ; -- in French, -t- in some cases, otherwise - ; empty in other langs
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:../romance:../abstract:../common:../api
|
--# -path=.:../romance:../abstract:../common:../api:../prelude
|
||||||
|
|
||||||
concrete LangSpa of Lang =
|
concrete LangSpa of Lang =
|
||||||
GrammarSpa,
|
GrammarSpa,
|
||||||
|
|||||||
Reference in New Issue
Block a user