mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl
This commit is contained in:
@@ -305,4 +305,7 @@ fun
|
||||
fun
|
||||
TPastSimple : Tense ;
|
||||
|
||||
fun
|
||||
SubjunctRelCN : CN -> RS -> CN ; -- e.g. Romance languages when subjunctive/conjunctive is needed
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
--# -path=alltenses:../common:../abstract:../romance
|
||||
concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- -
|
||||
-- [
|
||||
-- ]
|
||||
-- [
|
||||
|
||||
|
||||
-- ]
|
||||
-- don't forget to put the names of your own
|
||||
-- definitions here
|
||||
with
|
||||
@@ -15,4 +17,6 @@ concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- -
|
||||
ParadigmsCat in {
|
||||
-- put your own definitions here
|
||||
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
@@ -137,6 +137,8 @@ lin
|
||||
ExistNPQS t p np = UseQCl t p (QuestCl (ExistNP np)) ;
|
||||
ExistIPQS t p np = UseQCl t p (ExistIP np) ;
|
||||
|
||||
SubjunctRelCN cn rs = RelCN cn rs ; -- no difference from indicative
|
||||
|
||||
lincat
|
||||
X = {s : Str} ;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ concrete ExtendFre of Extend =
|
||||
GenRP,
|
||||
ExistCN, ExistMassCN, ExistPluralCN, RNP, ReflRNP,
|
||||
PassVPSlash, PassAgentVPSlash, PastPartAP, PastPartAgentAP, ApposNP, CompoundN,
|
||||
BaseVPS, ConsVPS, PredVPS, MkVPS, ConjVPS
|
||||
BaseVPS, ConsVPS, PredVPS, MkVPS, ConjVPS, RelVPS, ExistsNP
|
||||
] -- put the names of your own definitions here
|
||||
with
|
||||
(Grammar = GrammarFre) **
|
||||
@@ -153,5 +153,16 @@ lin UseDAP = \dap ->
|
||||
! DDir ! tm.t ! tm.a ! p.p ! m
|
||||
} ;
|
||||
ConjVPS = conjunctDistrTable3 Mood Agr Bool ;
|
||||
|
||||
RelVPS rp vpi = {
|
||||
s = \\m, agr => rp.s ! False ! complAgr agr ! Nom ++ vpi
|
||||
.s ! m ! (Ag rp.a.g rp.a.n P3) ! False ;
|
||||
c = Nom
|
||||
} ;
|
||||
|
||||
ExistsNP np =
|
||||
mkClause "il" True False np.a
|
||||
(insertComplement (\\_ => (np.s ! Nom).ton)
|
||||
(predV (mkV "exister"))) ;
|
||||
|
||||
}
|
||||
|
||||
@@ -44,6 +44,11 @@ oper
|
||||
spn = \\c => prepCase c ++ s ;
|
||||
n = Sg ; s2 = \\g => [] ; isNeg = False
|
||||
} ;
|
||||
mkDet : Str -> Number -> Det = \s, n -> lin Det {
|
||||
s,sp = \\_,c => prepCase c ++ s ;
|
||||
spn = \\c => prepCase c ++ s ;
|
||||
n = n ; s2 = \\g => [] ; isNeg = False
|
||||
} ;
|
||||
mkDet : Str -> Str -> Number -> Det = \m,f,n -> lin Det {
|
||||
s,sp = \\g,c => prepCase c ++ case g of {Masc => m ; Fem => f} ;
|
||||
spn = \\c => prepCase c ++ m ;
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor -
|
||||
[
|
||||
GenRP,
|
||||
PassVPSlash, PassAgentVPSlash
|
||||
PassVPSlash, PassAgentVPSlash,
|
||||
ExistsNP
|
||||
|
||||
]
|
||||
-- don't forget to put the names of your own
|
||||
-- definitions here
|
||||
@@ -14,7 +16,8 @@ concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor -
|
||||
MorphoIta,
|
||||
Coordination,
|
||||
Prelude,
|
||||
ParadigmsIta in {
|
||||
ParadigmsIta,
|
||||
IrregIta in {
|
||||
-- put your own definitions here
|
||||
|
||||
lin
|
||||
@@ -45,4 +48,13 @@ oper
|
||||
comp = \\a => vps.comp ! a ++ (let agr = complAgr a in vps.s.s ! VPart agr.g agr.n) ++ agent ;
|
||||
} ;
|
||||
|
||||
|
||||
lin
|
||||
ExistsNP np =
|
||||
mkClause [] True False np.a
|
||||
(insertComplement (\\_ => (np.s ! Nom).ton)
|
||||
(predV esistere_V)) ;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
42698
src/morphodict/MorphoDictSpa.gf
Normal file
42698
src/morphodict/MorphoDictSpa.gf
Normal file
File diff suppressed because it is too large
Load Diff
42658
src/morphodict/MorphoDictSpaAbs.gf
Normal file
42658
src/morphodict/MorphoDictSpaAbs.gf
Normal file
File diff suppressed because it is too large
Load Diff
@@ -29,7 +29,7 @@ resource Formal = open Prelude in {
|
||||
usePrec : Prec -> TermPrec -> Str = \p,x ->
|
||||
case lessPrec x.p p of {
|
||||
True => parenth x.s ;
|
||||
False => parenthOpt x.s
|
||||
False => x.s --- parenthOpt x.s
|
||||
} ;
|
||||
|
||||
parenth : Str -> Str = \s -> "(" ++ s ++ ")" ;
|
||||
|
||||
@@ -68,6 +68,18 @@ incomplete concrete ExtendRomanceFunctor of Extend =
|
||||
} ;
|
||||
ConjVPS = conjunctDistrTable3 Mood Agr Bool ;
|
||||
|
||||
RelVPS rp vpi = {
|
||||
s = \\m, agr => rp.s ! False ! complAgr agr ! Nom ++ vpi
|
||||
.s ! m ! (Ag rp.a.g rp.a.n P3) ! False ;
|
||||
c = Nom
|
||||
} ;
|
||||
|
||||
SubjunctRelCN cn rs = let g = cn.g in {
|
||||
s = \\n => cn.s ! n ++ rs.s ! Conjunct ! agrP3 g n ; --- mood
|
||||
g = g
|
||||
} ;
|
||||
|
||||
|
||||
MkVPI vp = variants {} ; -- Temp -> Pol -> VP -> VPI ; -- to sleep / hasn't slept
|
||||
ConjVPI = variants {} ; -- Conj -> [VPI] -> VPI ; -- has walked and won't sleep
|
||||
ComplVPIVV = variants {} ; -- VV -> VPI -> VP ; -- want to sleep and to walk
|
||||
|
||||
@@ -20,7 +20,9 @@ concrete ExtendSpa of Extend = CatSpa ** ExtendRomanceFunctor -
|
||||
youPolPlFem_Pron,
|
||||
youPolPl_Pron,
|
||||
PassVPSlash, PassAgentVPSlash,
|
||||
UseComp_estar, UseComp_ser
|
||||
UseComp_estar, UseComp_ser,
|
||||
ExistNP
|
||||
|
||||
] -- don't forget to put the names of your own
|
||||
-- definitions here
|
||||
with
|
||||
@@ -125,4 +127,10 @@ oper
|
||||
|
||||
lin AnaphPron np = agr2pron ! np.a ;
|
||||
|
||||
ExistsNP np =
|
||||
mkClause [] True False np.a
|
||||
(insertComplement (\\_ => (np.s ! Nom).ton)
|
||||
(predV (mkV "existir"))) ;
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
@@ -113,24 +113,55 @@ in {
|
||||
ComplVPIVV vv vpi = insertObj (\\a => vv.c2.s ++ vpi.s ! VPIInf ! a) (predV vv) ;
|
||||
|
||||
lincat
|
||||
VPS = {s : Order => Agr => Str} ;
|
||||
[VPS] = {s1,s2 : Order => Agr => Str} ;
|
||||
VPS = {s : Order => Agr => {verb, compl : Str}} ;
|
||||
[VPS] = {s : Order => Agr => {s1, s2, s3 : Str}} ; -- älskar, (jag) dig, (och) är lycklig
|
||||
|
||||
lin
|
||||
BaseVPS = twoTable2 Order Agr ;
|
||||
ConsVPS = consrTable2 Order Agr comma ;
|
||||
BaseVPS v w = {
|
||||
s = \\ord, agr =>
|
||||
let
|
||||
vs = v.s ! ord ! agr ;
|
||||
ws = w.s ! ord ! agr ;
|
||||
in {
|
||||
s1 = vs.verb ;
|
||||
s2 = vs.compl ;
|
||||
s3 = ws.verb ++ ws.compl
|
||||
}
|
||||
} ;
|
||||
|
||||
ConsVPS v vv = {
|
||||
s = \\ord, agr =>
|
||||
let
|
||||
vs = v.s ! ord ! agr ;
|
||||
vvs = vv.s ! ord ! agr ;
|
||||
in {
|
||||
s1 = vs.verb ;
|
||||
s2 = vs.compl ++ comma ++ vvs.s1 ++ vvs.s2 ;
|
||||
s3 = vvs.s3
|
||||
}
|
||||
} ;
|
||||
|
||||
PredVPS np vpi =
|
||||
ConjVPS conj vv = {
|
||||
s = \\ord, agr =>
|
||||
let
|
||||
vvs = vv.s ! ord ! agr
|
||||
in {
|
||||
verb = vvs.s1 ;
|
||||
compl = conj.s1 ++ vvs.s2 ++ conj.s2 ++ vvs.s3
|
||||
}
|
||||
} ;
|
||||
|
||||
PredVPS np vps =
|
||||
let
|
||||
subj = np.s ! nominative ;
|
||||
agr = np.a ;
|
||||
in {
|
||||
s = \\o =>
|
||||
let verb = vpi.s ! o ! agr
|
||||
let verb = vps.s ! o ! agr
|
||||
in case o of {
|
||||
Main => subj ++ verb ;
|
||||
Inv => verb ++ subj ; ---- älskar henne och sover jag
|
||||
Sub => subj ++ verb
|
||||
Main => subj ++ verb.verb ++ verb.compl ;
|
||||
Inv => verb.verb ++ subj ++ verb.compl ; -- älskar jag henne och sover
|
||||
Sub => subj ++ verb.verb ++ verb.compl --- not quite correct in ConjVPS
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -140,7 +171,9 @@ in {
|
||||
RNoAg => ag ;
|
||||
RAg g n p => {g = g ; n = n ; p = p}
|
||||
} ;
|
||||
in rp.s ! ag.g ! ag.n ! rcase ++ vps.s ! Sub ! agr ;
|
||||
verb = vps.s ! Sub ! agr
|
||||
in
|
||||
rp.s ! ag.g ! ag.n ! rcase ++ verb.verb ++ verb.compl ;
|
||||
c = NPNom
|
||||
} ;
|
||||
|
||||
@@ -150,16 +183,16 @@ in {
|
||||
verb = vp.s ! Act ! VPFinite t.t t.a ;
|
||||
neg = verb.a1 ! p.p ! a ;
|
||||
compl = vp.n2 ! a ++ vp.a2 ++ vp.ext ;
|
||||
pron = vp.n1 ! a
|
||||
in t.s ++ p.s ++ case o of {
|
||||
Main => verb.fin ++ neg.p1 ++ verb.inf ++ pron ++ neg.p2 ++ compl ;
|
||||
Inv => verb.fin ++ neg.p1 ++ verb.inf ++ pron ++ neg.p2 ++ compl ; ----
|
||||
Sub => neg.p1 ++ neg.p2 ++ verb.fin ++ verb.inf ++ pron ++ compl
|
||||
pron = vp.n1 ! a ;
|
||||
verbf = t.s ++ p.s ++ verb.fin
|
||||
in
|
||||
case o of {
|
||||
Main => {verb = verbf ; compl = neg.p1 ++ verb.inf ++ pron ++ neg.p2 ++ compl} ;
|
||||
Inv => {verb = verbf ; compl = neg.p1 ++ verb.inf ++ pron ++ neg.p2 ++ compl} ;
|
||||
Sub => {verb = neg.p1 ++ neg.p2 ++ verbf ; compl = verb.inf ++ pron ++ compl}
|
||||
}
|
||||
} ;
|
||||
|
||||
ConjVPS = conjunctDistrTable2 Order Agr ;
|
||||
|
||||
lincat
|
||||
VPS2 = {s : Order => Agr => Str ; c2 : {s : Str; hasPrep : Prelude.Bool}} ;
|
||||
[VPS2] = {s1,s2 : Order => Agr => Str ; c2 : {s : Str; hasPrep : Prelude.Bool}} ;
|
||||
@@ -185,10 +218,10 @@ in {
|
||||
} ;
|
||||
|
||||
ComplVPS2 vps2 np = {
|
||||
s = \\o,a => vps2.s !o ! a ++ vps2.c2.s ++ np.s ! NPAcc
|
||||
s = \\o,a => {verb = vps2.s !o ! a ; compl = vps2.c2.s ++ np.s ! NPAcc}
|
||||
} ;
|
||||
ReflVPS2 vps2 rnp = {
|
||||
s = \\o,a => vps2.s ! o ! a ++ vps2.c2.s ++ rnp.s ! a
|
||||
s = \\o,a => {verb = vps2.s ! o ! a ; compl = vps2.c2.s ++ rnp.s ! a}
|
||||
} ;
|
||||
|
||||
ConjVPS2 c xs = conjunctDistrTable2 Order Agr c xs ** {c2 = xs.c2} ;
|
||||
|
||||
Reference in New Issue
Block a user