forked from GitHub/gf-core
romanian_mod
This commit is contained in:
@@ -24,7 +24,7 @@ concrete AdverbRon of Adverb =
|
|||||||
s = subj.s ++ s.s ! Indic
|
s = subj.s ++ s.s ! Indic
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdnCAdv cadv = {s = cadv.s ++ conjThan} ;
|
AdnCAdv cadv = {s = cadv.s ++ cadv.sNum ++ conjThan} ;
|
||||||
-- doesn't yield to a correct form for more_CAdv
|
-- doesn't yield to a correct form for more_CAdv
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
--# -path=.:../Romance:../common:../abstract:../common:prelude
|
--# -path=.:../Romance:../common:../abstract:../common:prelude
|
||||||
|
|
||||||
concrete CatRon of Cat =
|
concrete CatRon of Cat =
|
||||||
CommonX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond]
|
CommonX - [CAdv,Temp,TTAnt,Tense,TPres,TPast,TFut,TCond]
|
||||||
** open Prelude, ResRon, MorphoRon,(R = ParamX) in {
|
** open Prelude, ResRon, MorphoRon,(R = ParamX) in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
@@ -41,6 +41,10 @@ concrete CatRon of Cat =
|
|||||||
|
|
||||||
AP = {s : AForm => Str ; isPre : Bool} ;
|
AP = {s : AForm => Str ; isPre : Bool} ;
|
||||||
|
|
||||||
|
-- Adverb
|
||||||
|
|
||||||
|
CAdv = {s, sNum, p : Str };
|
||||||
|
|
||||||
-- Noun
|
-- Noun
|
||||||
|
|
||||||
CN = {s : Number => Species => ACase => Str; g : NGender; a : Animacy } ;
|
CN = {s : Number => Species => ACase => Str; g : NGender; a : Animacy } ;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ concrete GrammarRon of Grammar =
|
|||||||
RelativeRon,
|
RelativeRon,
|
||||||
ConjunctionRon,
|
ConjunctionRon,
|
||||||
PhraseRon,
|
PhraseRon,
|
||||||
TextX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond],
|
TextX - [CAdv,Temp,TTAnt,Tense,TPres,TPast,TFut,TCond],
|
||||||
Prelude, MorphoRon, Coordination,
|
Prelude, MorphoRon, Coordination,
|
||||||
StructuralRon
|
StructuralRon
|
||||||
** {
|
** {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
concrete IdiomRon of Idiom =
|
concrete IdiomRon of Idiom =
|
||||||
-- CatRon ** open (P = ParamX), MorphoRon, ParadigmsRon,Prelude
|
-- CatRon ** open (P = ParamX), MorphoRon, ParadigmsRon,Prelude
|
||||||
CatRon ** open Prelude, ResRon
|
CatRon ** open Prelude, ResRon,BeschRon
|
||||||
in {
|
in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
@@ -10,10 +10,10 @@ in {
|
|||||||
lin
|
lin
|
||||||
ImpersCl vp = mkClause "" (agrP3 Masc Sg) vp ;
|
ImpersCl vp = mkClause "" (agrP3 Masc Sg) vp ;
|
||||||
|
|
||||||
GenericCl vp = mkClause "" (agrP3 Masc Sg) vp ; -- an exact correspondent does not exist !
|
GenericCl vp = mkClause "cineva" (agrP3 Masc Sg) vp ; -- an exact correspondent does not exist !
|
||||||
|
|
||||||
ExistNP np =
|
ExistNP np =
|
||||||
mkClause "" np.a (insertSimpObj (\\ag => (np.s ! No ).comp) copula) ;
|
mkClause "" np.a (insertSimpObj (\\ag => (np.s ! No ).comp) (useVerb (v_besch20 "existã"))) ;
|
||||||
-- v_besch20 "exista"
|
-- v_besch20 "exista"
|
||||||
|
|
||||||
ExistIP ip = {
|
ExistIP ip = {
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ rubber_N = mkNR "cauciuc";
|
|||||||
wine_N = mkNR "vin" ;
|
wine_N = mkNR "vin" ;
|
||||||
win_V2 = dirV2 (v_besch17 "câºtiga") ;
|
win_V2 = dirV2 (v_besch17 "câºtiga") ;
|
||||||
woman_N = chV "femeie" (mkAnim (mkN "femeie")) ;
|
woman_N = chV "femeie" (mkAnim (mkN "femeie")) ;
|
||||||
wonder_VQ = mkVQ (mkRVAcc (regV "minuna")) ;
|
wonder_VQ = mkVQ (mkRVAcc (v_besch29 "întreba")) ;
|
||||||
wood_N = mkN "lemn" ;
|
wood_N = mkN "lemn" ;
|
||||||
write_V2 = dirV2 (v_besch117 "scrie") ;
|
write_V2 = dirV2 (v_besch117 "scrie") ;
|
||||||
yellow_A = mkA "galben" ;
|
yellow_A = mkA "galben" ;
|
||||||
|
|||||||
@@ -2133,7 +2133,7 @@ in
|
|||||||
verbAffixes sti (mkFromAffix root affixSgGr44 affixPlGr44)
|
verbAffixes sti (mkFromAffix root affixSgGr44 affixPlGr44)
|
||||||
(mkFromAffix root affixSgI2 affixPlI2) (mkFromAffix root affixSgPS7 affixPlPS7)
|
(mkFromAffix root affixSgI2 affixPlI2) (mkFromAffix root affixSgPS7 affixPlPS7)
|
||||||
(mkFromAffix root affixSgPP7 affixPlPP7) (root +"ie") (mkAdjReg (root + "iut"))
|
(mkFromAffix root affixSgPP7 affixPlPP7) (root +"ie") (mkAdjReg (root + "iut"))
|
||||||
(root + "iind") (variants{}) ;
|
(root + "iind") "ºtii" ;
|
||||||
--subGroup 5
|
--subGroup 5
|
||||||
mkV123 : Str -> Verbe = \sui ->
|
mkV123 : Str -> Verbe = \sui ->
|
||||||
let root = init sui
|
let root = init sui
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ concrete NounRon of Noun =
|
|||||||
hasClit = hr ;
|
hasClit = hr ;
|
||||||
hasRef = hr ;
|
hasRef = hr ;
|
||||||
isPronoun = False ;
|
isPronoun = False ;
|
||||||
indForm = det.s ! gg ! No ++ det.size ++cn.s ! n ! rs ! ANomAcc
|
indForm = det.s ! gg ! No ++ det.size ++cn.s ! n ! rs ! ANomAcc ++ det.post ! gg ! No
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ concrete NounRon of Noun =
|
|||||||
clit = (np.s ! c).clit };
|
clit = (np.s ! c).clit };
|
||||||
a = np.a ;
|
a = np.a ;
|
||||||
hasClit = np.hasClit ;
|
hasClit = np.hasClit ;
|
||||||
hasRef = False ;
|
hasRef = np.hasRef ;
|
||||||
isPronoun = False ;
|
isPronoun = False ;
|
||||||
indForm = pred.s ! aagr (np.a.g) (np.a.n) ! ANomAcc ++ (np.s ! pred.c).comp
|
indForm = pred.s ! aagr (np.a.g) (np.a.n) ! ANomAcc ++ (np.s ! pred.c).comp
|
||||||
} ;
|
} ;
|
||||||
@@ -77,42 +77,45 @@ concrete NounRon of Noun =
|
|||||||
RelNP np rs = heavyNP {
|
RelNP np rs = heavyNP {
|
||||||
s = \\c => (np.s ! c).comp ++ rs.s ! Indic ! np.a ;
|
s = \\c => (np.s ! c).comp ++ rs.s ! Indic ! np.a ;
|
||||||
a = np.a ;
|
a = np.a ;
|
||||||
hasClit = False ;
|
hasClit = np.hasClit ;
|
||||||
ss = (np.s ! No).comp ++ rs.s ! Indic ! np.a
|
ss = (np.s ! No).comp ++ rs.s ! Indic ! np.a
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdvNP np adv = heavyNP {
|
AdvNP np adv = heavyNP {
|
||||||
s = \\c => (np.s ! c).comp ++ adv.s ;
|
s = \\c => (np.s ! c).comp ++ adv.s ;
|
||||||
a = np.a ;
|
a = np.a ;
|
||||||
hasClit = False;
|
hasClit = np.hasClit;
|
||||||
ss = (np.s ! No).comp ++adv.s ;
|
ss = (np.s ! No).comp ++adv.s ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetQuantOrd quant num ord = let n = num.n
|
DetQuantOrd quant num ord = let n = num.n
|
||||||
in {
|
in {
|
||||||
s = \\g,c => let s1 = if_then_Str quant.isDef (ord.s ! n ! g ! c) (ord.s ! n ! g ! No);
|
s = \\g,c => let s1 = if_then_Str quant.isDef (ord.s ! n ! g ! c) (ord.s ! n ! g ! No);
|
||||||
s2 = if_then_Str quant.isPost "" (quant.s ! num.isNum ! n ! g ! (convCase c) )
|
s2 = if_then_Str quant.isPost "" (quant.s ! num.isNum ! n ! g ! (convCase c) ++ s1)
|
||||||
|
|
||||||
in
|
in
|
||||||
s2 ++ s1 ++ num.s ! g ;
|
s2 ++ num.s ! g ;
|
||||||
sp = \\g,c => let
|
sp = \\g,c => let
|
||||||
s1 = if_then_Str quant.isDef (ord.s ! n ! g ! c) (ord.s ! n ! g ! No) ;
|
s1 = if_then_Str quant.isDef (ord.s ! n ! g ! c) (ord.s ! n ! g ! No) ;
|
||||||
s3 = if_then_Str quant.isPost (s1 ++ num.sp ! g ++ quant.sp ! n ! g ! ANomAcc) (quant.sp ! n ! g ! (convCase c) ++ s1 ++ num.sp ! g)
|
s3 = if_then_Str quant.isPost (s1 ++ num.sp ! g ++ quant.sp ! n ! g ! ANomAcc) (quant.sp ! n ! g ! (convCase c) ++ s1 ++ num.sp ! g)
|
||||||
|
|
||||||
in
|
in
|
||||||
s3 ;
|
s3 ;
|
||||||
post = \\g,c => let s2 = if_then_Str quant.isPost (quant.s ! num.isNum ! n ! g ! (convCase c)) ""
|
post = \\g,c => let s1 = ord.s ! n ! g ! No;
|
||||||
|
s2 = if_then_Str quant.isPost (quant.s ! num.isNum ! n ! g ! (convCase c) ++ s1) ""
|
||||||
in
|
in
|
||||||
s2 ;
|
s2 ;
|
||||||
n = num.n ;
|
n = num.n ;
|
||||||
isDef = False;
|
isDef = quant.hasRef;
|
||||||
size = num.size;
|
size = num.size;
|
||||||
hasRef = quant.hasRef
|
hasRef = quant.hasRef
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetQuant quant num = let n = num.n ;
|
DetQuant quant num = let n = num.n ;
|
||||||
needDem = andB quant.isDef num.isNum
|
needDem = case num.n of
|
||||||
|
{ Sg => False ; -- for the moment, since no other construction would convey the proper meaning of "the one man"
|
||||||
|
_ => andB quant.isDef num.isNum}
|
||||||
in {
|
in {
|
||||||
s = \\g,c => let s1 = if_then_Str quant.isPost "" (quant.s ! num.isNum ! n ! g ! (convCase c)) ;
|
s = \\g,c => let s1 = if_then_Str quant.isPost "" (quant.s ! num.isNum ! n ! g ! (convCase c)) ;
|
||||||
s2 = if_then_Str needDem (artDem g n (convCase c)) ""
|
s2 = if_then_Str needDem (artDem g n (convCase c)) ""
|
||||||
@@ -130,7 +133,7 @@ in {
|
|||||||
hasRef = quant.hasRef
|
hasRef = quant.hasRef
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- consider fixing for possesive pronouns !
|
|
||||||
DetNP det =
|
DetNP det =
|
||||||
let
|
let
|
||||||
g = Masc ;
|
g = Masc ;
|
||||||
@@ -159,8 +162,9 @@ in {
|
|||||||
NumPl = {s = \\_ => [] ; sp = \\_ => [] ; isNum = False ; n = Pl ; size = ""} ;
|
NumPl = {s = \\_ => [] ; sp = \\_ => [] ; isNum = False ; n = Pl ; size = ""} ;
|
||||||
|
|
||||||
NumCard n = {s = n.s ; sp = n.sp ; size = getSize n.size ;
|
NumCard n = {s = n.s ; sp = n.sp ; size = getSize n.size ;
|
||||||
isNum = True; n = getNumber n.size
|
isNum = True;
|
||||||
} ;
|
n = getNumber n.size
|
||||||
|
} ;
|
||||||
|
|
||||||
NumDigits nu = {s,sp = \\g => nu.s ! NCard g ;
|
NumDigits nu = {s,sp = \\g => nu.s ! NCard g ;
|
||||||
size = nu.n; n = getNumber nu.n };
|
size = nu.n; n = getNumber nu.n };
|
||||||
@@ -210,6 +214,7 @@ in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- since mass noun phrases are not referential, it's no point keeping track of clitics
|
-- since mass noun phrases are not referential, it's no point keeping track of clitics
|
||||||
|
-- no matter if the noun is animate or not
|
||||||
|
|
||||||
MassNP cn = let
|
MassNP cn = let
|
||||||
g = case cn.g of
|
g = case cn.g of
|
||||||
@@ -221,10 +226,9 @@ in {
|
|||||||
s = \\c => {comp = cn.s ! n ! Indef ! (convCase c);
|
s = \\c => {comp = cn.s ! n ! Indef ! (convCase c);
|
||||||
clit = \\cs => [] } ;
|
clit = \\cs => [] } ;
|
||||||
a = agrP3 g n ;
|
a = agrP3 g n ;
|
||||||
hasClit = hc ;
|
hasClit = False ;
|
||||||
hasRef = False ;
|
hasRef = False ;
|
||||||
isPronoun = False ;
|
isPronoun = False ;
|
||||||
poss = \\g,n => [] ;
|
|
||||||
indForm = cn.s ! n ! Indef ! ANomAcc
|
indForm = cn.s ! n ! Indef ! ANomAcc
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -254,19 +258,10 @@ in {
|
|||||||
g = cn.g
|
g = cn.g
|
||||||
in {
|
in {
|
||||||
s = case ap.isPre of
|
s = case ap.isPre of
|
||||||
{True => \\n => table {Def => \\c => case c of
|
{True => \\n => table {Def => \\c => ap.s ! (AF (agrGender g n) n Def c) ++ cn.s ! n ! Indef ! c;
|
||||||
{Voc => ap.s ! (AF (agrGender g n) n Def ANomAcc) ++ cn.s ! n ! Indef ! ANomAcc;
|
Indef => \\c => ap.s ! (AF (agrGender g n) n Indef c) ++ cn.s ! n ! Indef ! c};
|
||||||
_ => ap.s ! (AF (agrGender g n) n Def c) ++ cn.s ! n ! Indef ! c
|
False => \\n => table {Def => \\c => cn.s ! n ! Def ! c ++ ap.s ! (AF (agrGender g n) n Indef c);
|
||||||
};
|
Indef => \\c => cn.s ! n ! Indef ! c ++ ap.s ! (AF (agrGender g n) n Indef c) }
|
||||||
Indef => \\c => case c of
|
|
||||||
{Voc => ap.s ! (AF (agrGender g n) n Indef ANomAcc) ++ cn.s ! n ! Indef ! ANomAcc;
|
|
||||||
_ => ap.s ! (AF (agrGender g n) n Indef c) ++ cn.s ! n ! Indef ! c}};
|
|
||||||
False => \\n => table {Def => \\c => case c of
|
|
||||||
{Voc => cn.s ! n ! Indef ! ANomAcc ++ ap.s ! (AF (agrGender g n) n Indef ANomAcc);
|
|
||||||
_ => cn.s ! n ! Def ! c ++ ap.s ! (AF (agrGender g n) n Indef c)};
|
|
||||||
Indef => \\c => case c of
|
|
||||||
{Voc => cn.s ! n ! Indef ! ANomAcc ++ ap.s ! (AF (agrGender g n) n Indef ANomAcc);
|
|
||||||
_ => cn.s ! n ! Indef ! c ++ ap.s ! (AF (agrGender g n) n Indef c) }}
|
|
||||||
};
|
};
|
||||||
g = g ;
|
g = g ;
|
||||||
a = cn.a
|
a = cn.a
|
||||||
|
|||||||
@@ -200,23 +200,23 @@ ccompN : N -> Str -> N ;
|
|||||||
ccompN x y = ccompose x y ** {lock_N = <>} ;
|
ccompN x y = ccompose x y ** {lock_N = <>} ;
|
||||||
|
|
||||||
mkNI : Str -> Str -> NGender -> N;
|
mkNI : Str -> Str -> NGender -> N;
|
||||||
mkNI s ss g = mkIn (mkNomIrreg s ss g) ** {lock_N = <>} ;
|
mkNI s ss g = mkInanimate (mkNomIrreg s ss g) ** {lock_N = <>};
|
||||||
|
|
||||||
regN : Str -> NGender -> N ;
|
regN : Str -> NGender -> N ;
|
||||||
regN s g = mkIn (mkNomReg s g) ** {lock_N = <>};
|
regN s g = mkInanimate (mkNomReg s g) ** {lock_N = <>};
|
||||||
|
|
||||||
|
|
||||||
mkVI : Str -> Str -> Str -> N;
|
mkVI : Str -> Str -> Str -> N;
|
||||||
mkVI s ss sss = mkIn (mkNomVIrreg s ss sss) ** {lock_N = <>} ;
|
mkVI s ss sss = mkInanimate (mkNomVIrreg s ss sss) ** {lock_N = <>};
|
||||||
|
|
||||||
mkIn : N -> N ;
|
mkIn : N -> N ;
|
||||||
mkIn n = mkInanimate n ** {lock_N = <> };
|
mkIn n = mkInanimate n ** {lock_N = <>};
|
||||||
|
|
||||||
mkAnim : N -> N ;
|
mkAnim : N -> N ;
|
||||||
mkAnim n = mkAnimate n ** {lock_N = <> };
|
mkAnim n = mkAnimate n ** {lock_N = <>};
|
||||||
|
|
||||||
chV : Str -> N -> N ;
|
chV : Str -> N -> N ;
|
||||||
chV s n = mkVocc n s ** {lock_N = <> } ;
|
chV s n = mkVocc n s ** {lock_N = <>};
|
||||||
|
|
||||||
|
|
||||||
--smart paradigm for inferring the gender of the nouns
|
--smart paradigm for inferring the gender of the nouns
|
||||||
@@ -255,7 +255,7 @@ mkNN s ss = case s of
|
|||||||
--we treat this case separately :
|
--we treat this case separately :
|
||||||
|
|
||||||
mkNR : Str -> N;
|
mkNR : Str -> N;
|
||||||
mkNR s = mkIn (mkNomNeut s) ** {lock_N = <>} ;
|
mkNR s = mkInanimate (mkNomNeut s) ** {lock_N = <>} ;
|
||||||
|
|
||||||
--------------------------------------------------------------------
|
--------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -189,14 +189,13 @@ oper
|
|||||||
in {
|
in {
|
||||||
s = table {
|
s = table {
|
||||||
VPFinite tm Simul => case tm of
|
VPFinite tm Simul => case tm of
|
||||||
{
|
{VPres Indic => vf "" (\a -> verb ! Indi Presn a.n a.p) ;
|
||||||
VPres Indic => vf "" (\a -> verb ! Indi Presn a.n a.p) ;
|
VPres Conjunct => vf "sã" (\a -> verb ! Subjo SPres a.n a.p) ;
|
||||||
VPres Conjunct => vf "sã" (\a -> verb ! Subjo SPres a.n a.p) ;
|
VImperff => vf "" (\a -> verb ! Indi Imparf a.n a.p) ;
|
||||||
VImperff => vf "" (\a -> verb ! Indi Imparf a.n a.p) ;
|
VPasse Indic => vf "" (\a -> pComp ! a.n ! a.p ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
|
||||||
VPasse Indic => vf "" (\a -> pComp ! a.n ! a.p ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
|
VPasse Conjunct => vf "sã" (\a -> copula.s! Inf ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
|
||||||
VPasse Conjunct => vf "sã" (\a -> copula.s! Inf ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
|
VFut => vf "" (\a -> pFut ! a.n ! a.p ++ verb ! Inf) ;
|
||||||
VFut => vf "" (\a -> pFut ! a.n ! a.p ++ verb ! Inf) ;
|
VCondit => vf "" (\a -> pCond ! a.n ! a.p ++ verb ! Inf)
|
||||||
VCondit => vf "" (\a -> pCond ! a.n ! a.p ++ verb ! Inf)
|
|
||||||
} ;
|
} ;
|
||||||
VPFinite tm Anter => case tm of
|
VPFinite tm Anter => case tm of
|
||||||
{VPres Indic => vf "" (\a -> pComp ! a.n ! a.p ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
|
{VPres Indic => vf "" (\a -> pComp ! a.n ! a.p ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
|
||||||
@@ -237,7 +236,21 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- various helper functions for VerbRon
|
-- various helper functions for VerbRon
|
||||||
|
|
||||||
|
useVerb : Verb -> VerbPhrase =\verb ->
|
||||||
|
{
|
||||||
|
s = verb.s ;
|
||||||
|
isRefl = verb.isRefl;
|
||||||
|
nrClit = verb.nrClit;
|
||||||
|
isFemSg = False ; pReflClit = verb.pReflClit ;
|
||||||
|
neg = table {Pos => ""; Neg => "nu"} ;
|
||||||
|
clAcc = RNoAg ; nrClit = verb.nrClit;
|
||||||
|
clDat = RNoAg ;
|
||||||
|
comp = \\a => [] ;
|
||||||
|
ext = \\p => [] ;
|
||||||
|
lock_V = <>
|
||||||
|
} ;
|
||||||
|
|
||||||
insertExtrapos : (Polarity => Str) -> VerbPhrase -> VerbPhrase = \co,vp -> {
|
insertExtrapos : (Polarity => Str) -> VerbPhrase -> VerbPhrase = \co,vp -> {
|
||||||
s = vp.s ;
|
s = vp.s ;
|
||||||
isFemSg = vp.isFemSg ;
|
isFemSg = vp.isFemSg ;
|
||||||
@@ -273,7 +286,18 @@ oper
|
|||||||
comp = \\a => obj ! a ++ vp.comp ! a ;
|
comp = \\a => obj ! a ++ vp.comp ! a ;
|
||||||
ext = vp.ext
|
ext = vp.ext
|
||||||
};
|
};
|
||||||
|
|
||||||
|
insertAdv : Str -> VerbPhrase -> VerbPhrase = \co,vp -> {
|
||||||
|
s = vp.s ;
|
||||||
|
isRefl = vp.isRefl;
|
||||||
|
isFemSg = vp.isFemSg ; pReflClit = vp.pReflClit ;
|
||||||
|
clAcc = vp.clAcc ; nrClit = vp.nrClit ;
|
||||||
|
clDat = vp.clDat ;
|
||||||
|
neg = vp.neg ;
|
||||||
|
comp = \\a => vp.comp ! a ++ co ;
|
||||||
|
ext = vp.ext
|
||||||
|
} ;
|
||||||
|
|
||||||
-----------------------------------------------------------------
|
-----------------------------------------------------------------
|
||||||
---------------3 CATEGORY DEFINITIONS ---------------------------
|
---------------3 CATEGORY DEFINITIONS ---------------------------
|
||||||
-----------------------------------------------------------------
|
-----------------------------------------------------------------
|
||||||
@@ -288,8 +312,8 @@ oper
|
|||||||
NounPhrase : Type = {s : NCase => {comp : Str ; clit : Clitics => Str} ;
|
NounPhrase : Type = {s : NCase => {comp : Str ; clit : Clitics => Str} ;
|
||||||
a : Agr ;
|
a : Agr ;
|
||||||
indForm : Str ; --needed for prepositions that demand the indefinite form of a NP
|
indForm : Str ; --needed for prepositions that demand the indefinite form of a NP
|
||||||
hasClit : Bool ; --
|
hasClit : Bool ; -- needed to indicate if the NP has clitics or not (and is referenced also)
|
||||||
hasRef : Bool ; -- needed to indicate if the NP is referenced or not - for the use of clitics
|
hasRef : Bool ; -- needed to indicate if the NP is referenced or not - for the use of the preposition for Accusative
|
||||||
isPronoun : Bool -- in the case of pronouns, just the clitics are used, and not the comp form
|
isPronoun : Bool -- in the case of pronouns, just the clitics are used, and not the comp form
|
||||||
} ;
|
} ;
|
||||||
VerbPhrase :Type = {
|
VerbPhrase :Type = {
|
||||||
@@ -484,9 +508,9 @@ oper
|
|||||||
RCond => VCondit ;
|
RCond => VCondit ;
|
||||||
RPres => VPres m
|
RPres => VPres m
|
||||||
} ;
|
} ;
|
||||||
cmp = case <<t,a,m> : RTense * Anteriority * Mood> of {
|
cmp = case <t,a,m> of
|
||||||
<RPast,Simul,Indic> | <RPres, Anter,Indic> => True ; --# notpresent
|
{<RPast,Simul,Indic> | <RPres, Anter,Indic> => True ;
|
||||||
<RCond, _, _> => True; --# notpresent
|
<RCond, _, _> => True;
|
||||||
_ => False
|
_ => False
|
||||||
} ;
|
} ;
|
||||||
vp = useVP vpr ;
|
vp = useVP vpr ;
|
||||||
@@ -515,7 +539,7 @@ oper
|
|||||||
indForm = np.ss ;
|
indForm = np.ss ;
|
||||||
hasClit = np.hasClit ;
|
hasClit = np.hasClit ;
|
||||||
isPronoun = False;
|
isPronoun = False;
|
||||||
hasRef = False
|
hasRef = np.hasClit
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
genForms : Str -> Str -> Gender => Str = \bon,bonne ->
|
genForms : Str -> Str -> Gender => Str = \bon,bonne ->
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
SlashVP np v2 =
|
SlashVP np v2 =
|
||||||
{s = \\bb,ag=>
|
{s = \\bb,ag=>
|
||||||
let
|
let
|
||||||
vp = v2 ;
|
vp = v2 ** {lock_VP = <>};
|
||||||
bcond = andB vp.needClit bb
|
bcond = andB vp.needClit bb
|
||||||
in
|
in
|
||||||
case <bcond,v2.c2.isDir> of
|
case <bcond,v2.c2.isDir> of
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ lin
|
|||||||
mkPronoun
|
mkPronoun
|
||||||
"" "el" "lui" "lui" [] "său" "sa" "săi" "sale" Masc Sg P3 ;
|
"" "el" "lui" "lui" [] "său" "sa" "săi" "sale" Masc Sg P3 ;
|
||||||
|
|
||||||
less_CAdv = X.mkCAdv "mai puţin" conjThan ;
|
less_CAdv = {s = "mai puţin" ; sNum = ""; p = conjThan ; lock_CAdv = <> } ;
|
||||||
many_Det = mkDet "mulţi" "multe" "multor" "multor" "mulţi" "multe" "multora" "multora" Pl;
|
many_Det = mkDet "mulţi" "multe" "multor" "multor" "mulţi" "multe" "multora" "multora" Pl;
|
||||||
more_CAdv = X.mkCAdv "mai" conjThan ;
|
more_CAdv = {s = "mai" ; sNum = "mult" ; p =conjThan ; lock_CAdv = <>};
|
||||||
most_Predet = {
|
most_Predet = {
|
||||||
s = \\a => table { AGenDat => "marii parţi a" ;
|
s = \\a => table { AGenDat => "marii parţi a" ;
|
||||||
ANomAcc => "marea parte a";
|
ANomAcc => "marea parte a";
|
||||||
@@ -294,7 +294,7 @@ whatPl_IP =
|
|||||||
|
|
||||||
except_Prep = mkPrep "cu excepţia" Ge ;
|
except_Prep = mkPrep "cu excepţia" Ge ;
|
||||||
|
|
||||||
as_CAdv = X.mkCAdv "la fel de" "ca" ;
|
as_CAdv = { s = "la fel de"; sNum = "mult"; p = "ca" ; lock_CAdv = <> };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,20 +4,9 @@ concrete VerbRon of Verb =
|
|||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
UseV = \verb ->
|
UseV = useVerb ;
|
||||||
{
|
|
||||||
s = verb.s ;
|
|
||||||
isRefl = verb.isRefl;
|
|
||||||
nrClit = verb.nrClit;
|
|
||||||
isFemSg = False ; pReflClit = verb.pReflClit ;
|
|
||||||
neg = table {Pos => ""; Neg => "nu"} ;
|
|
||||||
clAcc = RNoAg ; nrClit = verb.nrClit;
|
|
||||||
clDat = RNoAg ;
|
|
||||||
comp = \\a => [] ;
|
|
||||||
ext = \\p => [] ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
ComplVV v vp =insertSimpObj (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++vp.comp ! a ++ vp.ext ! Pos) (UseV v) ;
|
ComplVV v vp =insertSimpObj (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++vp.comp ! a ++ vp.ext ! Pos) (useVerb v) ;
|
||||||
|
|
||||||
|
|
||||||
ComplVS v s = insertExtrapos (\\b => conjThat ++ s.s ! (v.m ! b)) (predV v) ;
|
ComplVS v s = insertExtrapos (\\b => conjThat ++ s.s ! (v.m ! b)) (predV v) ;
|
||||||
@@ -25,7 +14,7 @@ concrete VerbRon of Verb =
|
|||||||
|
|
||||||
|
|
||||||
ComplVA v ap =
|
ComplVA v ap =
|
||||||
insertSimpObj (\\a => ap.s ! AF a.g a.n Indef ANomAcc) (UseV v) ;
|
insertSimpObj (\\a => ap.s ! AF a.g a.n Indef ANomAcc) (useVerb v) ;
|
||||||
|
|
||||||
|
|
||||||
SlashV2a verb = {s = verb.s ; isRefl = verb.isRefl; nrClit = verb.nrClit;
|
SlashV2a verb = {s = verb.s ; isRefl = verb.isRefl; nrClit = verb.nrClit;
|
||||||
@@ -43,36 +32,36 @@ concrete VerbRon of Verb =
|
|||||||
Slash2V3 v np = let s1 = v.c2.s ++(np.s ! (v.c2.c)).comp ;
|
Slash2V3 v np = let s1 = v.c2.s ++(np.s ! (v.c2.c)).comp ;
|
||||||
ss = if_then_Str np.hasRef (v.c2.prepDir ++ s1) s1;
|
ss = if_then_Str np.hasRef (v.c2.prepDir ++ s1) s1;
|
||||||
sir = if_then_Str np.isPronoun "" ss ;
|
sir = if_then_Str np.isPronoun "" ss ;
|
||||||
vcDa = if_then_else VClit np.hasRef (nextClit v.nrClit PDat) v.nrClit;
|
vcDa = if_then_else VClit np.hasClit (nextClit v.nrClit PDat) v.nrClit;
|
||||||
vcAc = if_then_else VClit np.hasRef (nextClit v.nrClit PAcc) v.nrClit
|
vcAc = if_then_else VClit np.hasClit (nextClit v.nrClit PAcc) v.nrClit
|
||||||
in
|
in
|
||||||
case v.c2.isDir of
|
case v.c2.isDir of
|
||||||
{Dir PAcc => (insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c3} ;
|
{Dir PAcc => (insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (useVerb v)) ** {needAgr = False ; needClit = True ; c2 = v.c3} ;
|
||||||
Dir PDat => (insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa (UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c3};
|
Dir PDat => (insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa (useVerb v)) ** {needAgr = False ; needClit = True ; c2 = v.c3};
|
||||||
_ => (insertSimpObjPre (\\_ => ss) (UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c3}
|
_ => (insertSimpObjPre (\\_ => ss) (useVerb v)) ** {needAgr = False ; needClit = True ; c2 = v.c3}
|
||||||
};
|
};
|
||||||
|
|
||||||
Slash3V3 v np = let s1 = v.c3.s ++ (np.s ! (v.c3.c)).comp ;
|
Slash3V3 v np = let s1 = v.c3.s ++ (np.s ! (v.c3.c)).comp ;
|
||||||
ss = if_then_Str np.hasRef (v.c3.prepDir ++ s1) s1 ;
|
ss = if_then_Str np.hasRef (v.c3.prepDir ++ s1) s1 ;
|
||||||
sir = if_then_Str np.isPronoun "" ss ;
|
sir = if_then_Str np.isPronoun "" ss ;
|
||||||
vcDa = if_then_else VClit np.hasRef (nextClit v.nrClit PDat) v.nrClit;
|
vcDa = if_then_else VClit np.hasClit (nextClit v.nrClit PDat) v.nrClit;
|
||||||
vcAc = if_then_else VClit np.hasRef (nextClit v.nrClit PAcc) v.nrClit
|
vcAc = if_then_else VClit np.hasClit (nextClit v.nrClit PAcc) v.nrClit
|
||||||
in
|
in
|
||||||
case v.c3.isDir of
|
case v.c3.isDir of
|
||||||
{Dir PAcc => (insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c2} ;
|
{Dir PAcc => (insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (useVerb v)) ** {needAgr = False ; needClit = True ; c2 = v.c2} ;
|
||||||
Dir PDat => (insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa (UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c2} ;
|
Dir PDat => (insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa (useVerb v)) ** {needAgr = False ; needClit = True ; c2 = v.c2} ;
|
||||||
_ => (insertSimpObjPre (\\_ => ss) (UseV v)) ** {needAgr = False ; needClit = True ;c2 = v.c2}
|
_ => (insertSimpObjPre (\\_ => ss) (useVerb v)) ** {needAgr = False ; needClit = True ;c2 = v.c2}
|
||||||
};
|
};
|
||||||
|
|
||||||
-- needs fixing - agreement for the added verb must be made accordingly to what we add in ComplSlash !!!
|
-- needs fixing - agreement for the added verb must be made accordingly to what we add in ComplSlash !!!
|
||||||
-- fixed with extra parameter !
|
-- fixed with extra parameter !
|
||||||
|
|
||||||
SlashV2V v vp = (insertSimpObj (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) (UseV v)) ** {needAgr = True ; needClit = True ;c2 = v.c2} ;
|
SlashV2V v vp = (insertSimpObj (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) (useVerb v)) ** {needAgr = True ; needClit = True ;c2 = v.c2} ;
|
||||||
|
|
||||||
|
|
||||||
SlashV2S v s = (insertExtrapos (\\b => conjThat ++ s.s ! Indic) (UseV v)) ** {needAgr = False; needClit = True ;c2 = v.c2};
|
SlashV2S v s = (insertExtrapos (\\b => conjThat ++ s.s ! Indic) (useVerb v)) ** {needAgr = False; needClit = True ;c2 = v.c2};
|
||||||
|
|
||||||
SlashV2Q v q = (insertExtrapos (\\_ => q.s ! QIndir) (UseV v)) ** {needAgr = False ; needClit = False ;c2 = v.c2 } ;
|
SlashV2Q v q = (insertExtrapos (\\_ => q.s ! QIndir) (useVerb v)) ** {needAgr = False ; needClit = False ;c2 = v.c2 } ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -80,13 +69,13 @@ concrete VerbRon of Verb =
|
|||||||
|
|
||||||
SlashV2A v ap =
|
SlashV2A v ap =
|
||||||
(insertSimpObj (\\a => v.c3.s ++ ap.s ! (AF Masc Sg Indef (convCase v.c3.c)))
|
(insertSimpObj (\\a => v.c3.s ++ ap.s ! (AF Masc Sg Indef (convCase v.c3.c)))
|
||||||
(UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c2} ;
|
(useVerb v)) ** {needAgr = False ; needClit = True ; c2 = v.c2} ;
|
||||||
|
|
||||||
ComplSlash vp np = let s1 = vp.c2.s ++(np.s ! (vp.c2.c)).comp ;
|
ComplSlash vp np = let s1 = vp.c2.s ++(np.s ! (vp.c2.c)).comp ;
|
||||||
ss = if_then_Str np.hasRef (vp.c2.prepDir ++ s1) s1 ;
|
ss = if_then_Str np.hasRef (vp.c2.prepDir ++ s1) s1 ;
|
||||||
sir = if_then_Str np.isPronoun "" ss ;
|
sir = if_then_Str np.isPronoun "" ss ;
|
||||||
vcDa = if_then_else VClit np.hasRef (nextClit vp.nrClit PDat) vp.nrClit;
|
vcDa = if_then_else VClit np.hasClit (nextClit vp.nrClit PDat) vp.nrClit;
|
||||||
vcAc = if_then_else VClit np.hasRef (nextClit vp.nrClit PAcc) vp.nrClit;
|
vcAc = if_then_else VClit np.hasClit (nextClit vp.nrClit PAcc) vp.nrClit;
|
||||||
vpp = case vp.c2.isDir of
|
vpp = case vp.c2.isDir of
|
||||||
{Dir PAcc => insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc vp ;
|
{Dir PAcc => insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc vp ;
|
||||||
Dir PDat => insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa vp;
|
Dir PDat => insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa vp;
|
||||||
@@ -129,25 +118,26 @@ concrete VerbRon of Verb =
|
|||||||
|
|
||||||
|
|
||||||
SlashVV v vp =
|
SlashVV v vp =
|
||||||
insertObjc (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) ((UseV v) **{c2=vp.c2; needAgr= vp.needAgr ; needClit = False; lock_VPSlash = <>}) ;
|
insertObjc (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) ((useVerb v) **{c2=vp.c2; needAgr= vp.needAgr ; needClit = False; lock_VPSlash = <>}) ;
|
||||||
|
|
||||||
SlashV2VNP v np vp = let s1 = v.c2.s ++(np.s ! (v.c2.c)).comp ;
|
SlashV2VNP v np vp = let s1 = v.c2.s ++(np.s ! (v.c2.c)).comp ;
|
||||||
ss = if_then_Str np.hasRef (v.c2.prepDir ++ s1) s1;
|
ss = if_then_Str np.hasRef (v.c2.prepDir ++ s1) s1;
|
||||||
sir = if_then_Str np.isPronoun "" ss ;
|
sir = if_then_Str np.isPronoun "" ss ;
|
||||||
vcDa = if_then_else VClit np.hasRef (nextClit v.nrClit PDat) v.nrClit;
|
vcDa = if_then_else VClit np.hasClit (nextClit v.nrClit PDat) v.nrClit;
|
||||||
vcAc = if_then_else VClit np.hasRef (nextClit v.nrClit PAcc) v.nrClit ;
|
vcAc = if_then_else VClit np.hasClit (nextClit v.nrClit PAcc) v.nrClit ;
|
||||||
vcomp = (getConjComp vp np.a).s
|
vvp = vp ** {lock_VP = <>};
|
||||||
|
vcomp = (getConjComp vvp np.a).s
|
||||||
in
|
in
|
||||||
case v.c2.isDir of
|
case v.c2.isDir of
|
||||||
{Dir PAcc => (insertObje (\\a => sir ++ vcomp ! a) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (UseV v)) ** {needAgr = vp.needAgr ; needClit = False ;c2 = vp.c2} ;
|
{Dir PAcc => (insertObje (\\a => sir ++ vcomp ! a) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (useVerb v)) ** {needAgr = vp.needAgr ; needClit = False ;c2 = vp.c2} ;
|
||||||
|
|
||||||
Dir PDat => (insertObje (\\a => sir ++ vcomp ! a) RNoAg (clitFromNoun np Da) False vcDa (UseV v)) ** {needAgr = vp.needAgr ; needClit = False ; c2 = vp.c2};
|
Dir PDat => (insertObje (\\a => sir ++ vcomp ! a) RNoAg (clitFromNoun np Da) False vcDa (useVerb v)) ** {needAgr = vp.needAgr ; needClit = False ; c2 = vp.c2};
|
||||||
|
|
||||||
_ => (insertSimpObjPre (\\a => ss ++ vcomp ! a) (UseV v)) ** {needAgr = vp.needAgr ; needClit = False ; c2 = vp.c2}
|
_ => (insertSimpObjPre (\\a => ss ++ vcomp ! a) (useVerb v)) ** {needAgr = vp.needAgr ; needClit = False ; c2 = vp.c2}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
UseComp comp = insertSimpObj comp.s (UseV copula) ;
|
UseComp comp = insertSimpObj comp.s copula ;
|
||||||
|
|
||||||
CompAP ap = {s = \\ag => ap.s ! AF ag.g ag.n Indef ANomAcc} ;
|
CompAP ap = {s = \\ag => ap.s ! AF ag.g ag.n Indef ANomAcc} ;
|
||||||
CompNP np = {s = \\_ => (np.s ! No).comp} ;
|
CompNP np = {s = \\_ => (np.s ! No).comp} ;
|
||||||
@@ -157,26 +147,7 @@ concrete VerbRon of Verb =
|
|||||||
AdvVP vp adv = insertAdv adv.s vp ;
|
AdvVP vp adv = insertAdv adv.s vp ;
|
||||||
AdVVP adv vp = insertAdv adv.s vp ;
|
AdVVP adv vp = insertAdv adv.s vp ;
|
||||||
|
|
||||||
PassV2 v = insertSimpObj (\\a => v.s ! PPasse a.g a.n Indef ANomAcc) (UseV auxPassive) ;
|
PassV2 v = insertSimpObj (\\a => v.s ! PPasse a.g a.n Indef ANomAcc) auxPassive ** {lock_VP = <>};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
oper
|
|
||||||
insertAdv : Str -> VP -> VP = \co,vp -> {
|
|
||||||
s = vp.s ;
|
|
||||||
isRefl = vp.isRefl;
|
|
||||||
isFemSg = vp.isFemSg ; pReflClit = vp.pReflClit ;
|
|
||||||
clAcc = vp.clAcc ; nrClit = vp.nrClit ;
|
|
||||||
clDat = vp.clDat ;
|
|
||||||
neg = vp.neg ;
|
|
||||||
comp = \\a => vp.comp ! a ++ co ;
|
|
||||||
ext = vp.ext ;
|
|
||||||
lock_VP = <>
|
|
||||||
} ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -193,9 +164,4 @@ insertObjc : (Agr => Str) -> VPSlash -> VPSlash = \obj,vp ->
|
|||||||
getConjComp : VP -> Agr -> {s: Agr => Str} = \vp,ag ->
|
getConjComp : VP -> Agr -> {s: Agr => Str} = \vp,ag ->
|
||||||
{s = \\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp ag ++ vp.comp ! a ++ vp.ext ! Pos};
|
{s = \\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp ag ++ vp.comp ! a ++ vp.ext ! Pos};
|
||||||
|
|
||||||
-- discuss example
|
|
||||||
-- l -table (ComplSlash (Slash3V3 sell_V3 (UsePN john_PN)) (UsePN paris_PN))
|
|
||||||
-- in English the direct object always comes first, which could lead to incorrect longer examples
|
|
||||||
-- while in French it always comes last
|
|
||||||
-- ?!?
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user