mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
Merge remote-tracking branch 'origin/master' into new-VPS2-extend
This commit is contained in:
@@ -48,3 +48,4 @@ Tel,Telugu,telugu,,,y,n,n,n,,n
|
||||
Tha,Thai,thai,,to_thai,,,,,,y
|
||||
Tur,Turkish,turkish,,,y,,,n,,n
|
||||
Urd,Urdu,urdu,Hindustani,,,,,,,y
|
||||
Som,Somali,somali,,,,,n,n,,n
|
||||
|
||||
|
@@ -13,6 +13,7 @@ fun
|
||||
InflectionN : N -> Inflection ;
|
||||
InflectionN2 : N2 -> Inflection ;
|
||||
InflectionN3 : N3 -> Inflection ;
|
||||
InflectionPN : PN -> Inflection ;
|
||||
InflectionA : A -> Inflection ;
|
||||
InflectionA2 : A2 -> Inflection ;
|
||||
InflectionV : V -> Inflection ;
|
||||
@@ -27,6 +28,9 @@ fun
|
||||
InflectionV2Q : V2Q -> Inflection ;
|
||||
InflectionV2A : V2A -> Inflection ;
|
||||
InflectionAdv : Adv -> Inflection ;
|
||||
InflectionAdV : AdV -> Inflection ;
|
||||
InflectionAdA : AdA -> Inflection ;
|
||||
InflectionAdN : AdN -> Inflection ;
|
||||
InflectionPrep : Prep -> Inflection ;
|
||||
|
||||
fun
|
||||
|
||||
@@ -75,6 +75,14 @@ abstract Extend = Cat ** {
|
||||
ConjVPI2 : Conj -> [VPI2] -> VPI2 ; -- to love and hate
|
||||
ComplVPI2 : VPI2 -> NP -> VPI ; -- to love and hate that person
|
||||
|
||||
-- Conjunction of copula complements
|
||||
cat [Comp]{2} ;
|
||||
fun ConjComp : Conj -> ListComp -> Comp ;
|
||||
|
||||
-- Conjunction of imperatives
|
||||
cat [Imp] {2} ;
|
||||
fun ConjImp : Conj -> ListImp -> Imp ;
|
||||
|
||||
fun
|
||||
ProDrop : Pron -> Pron ; -- unstressed subject pronoun becomes empty: "am tired"
|
||||
|
||||
@@ -190,6 +198,15 @@ abstract Extend = Cat ** {
|
||||
|
||||
PredetRNP : Predet -> RNP -> RNP ; -- all my brothers
|
||||
|
||||
AdvRNP : NP -> Prep -> RNP -> RNP ; -- a dispute with his wife
|
||||
AdvRVP : VP -> Prep -> RNP -> VP ; -- lectured about her travels
|
||||
AdvRAP : AP -> Prep -> RNP -> AP ; -- adamant in his refusal
|
||||
|
||||
ReflA2RNP : A2 -> RNP -> AP ; -- indifferent to their surroundings
|
||||
-- NOTE: generalizes ReflA2
|
||||
|
||||
PossPronRNP : Pron -> Num -> CN -> RNP -> NP ; -- his abandonment of his wife and children
|
||||
|
||||
ConjRNP : Conj -> RNPList -> RNP ; -- my family, John and myself
|
||||
|
||||
Base_rr_RNP : RNP -> RNP -> RNPList ; -- my family, myself
|
||||
|
||||
@@ -40,6 +40,7 @@ abstract Sentence = Cat ** {
|
||||
-- To fix these parameters, see [Phrase Phrase.html].
|
||||
|
||||
ImpVP : VP -> Imp ; -- love yourselves
|
||||
AdvImp : Adv -> Imp -> Imp ; -- please love yourselves
|
||||
|
||||
--2 Embedded sentences
|
||||
|
||||
|
||||
@@ -79,6 +79,19 @@ lin
|
||||
s3 = ""
|
||||
} ;
|
||||
|
||||
InflectionPN = \pn -> {
|
||||
t = "същ.с." ;
|
||||
s1= heading1 ("Съществително Собствено"++
|
||||
case pn.gn of {
|
||||
GSg Masc => "(м.р.)" ;
|
||||
GSg Fem => "(ж.р.)" ;
|
||||
GSg Neut => "(ср.р.)" ;
|
||||
GPl => "(мн.ч.)"
|
||||
}) ;
|
||||
s2 = pn.s ;
|
||||
s3 = ""
|
||||
} ;
|
||||
|
||||
InflectionA, InflectionA2 = \a -> {
|
||||
t = "пр" ;
|
||||
s1= heading1 ("Прилагателно") ;
|
||||
@@ -104,7 +117,7 @@ lin
|
||||
s3= ""
|
||||
} ;
|
||||
|
||||
InflectionAdv = \adv -> {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "нар" ;
|
||||
s1= heading1 ("Наречие") ;
|
||||
s2= paragraph (adv.s) ;
|
||||
|
||||
@@ -96,6 +96,10 @@ lin
|
||||
lin
|
||||
PassVPSlash vp = insertObj (\\a => vp.ad.s ++ vp.s ! Perf ! VPassive (aform a.gn Indef (RObj Acc)) ++
|
||||
vp.compl1 ! a ++ vp.compl2 ! a) Pos (predV verbBe) ;
|
||||
ProgrVPSlash vp = vp ** {
|
||||
s = \\_ => vp.s ! Imperf ;
|
||||
isSimple = False
|
||||
} ;
|
||||
|
||||
PassAgentVPSlash vp np =
|
||||
insertObj (\\_ => "от" ++ np.s ! RObj CPrep) Pos
|
||||
@@ -155,6 +159,25 @@ lin
|
||||
s = \\a => linCoord []!conj.sep ++ vps.s!a!conj.sep ++ conj.s ++ vps.s!a!4
|
||||
} ;
|
||||
|
||||
lincat [Comp] = {s : Agr => Ints 4 => Str} ;
|
||||
lin BaseComp x y =
|
||||
{s = \\agr=>table {4 => y.s!agr; _ => x.s!agr}} ;
|
||||
ConsComp x xs =
|
||||
{s = \\agr=>table {4 => xs.s!agr!4; t => x.s!agr++linCoord bindComma!t++xs.s!agr!t}} ;
|
||||
ConjComp conj ss = {
|
||||
s = \\agr => linCoord [] ! conj.sep ++ ss.s!agr!conj.sep ++ conj.s ++ ss.s!agr!4 ;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
lincat ListImp = {s : Polarity => GenNum => Ints 4 => Str} ;
|
||||
lin BaseImp x y =
|
||||
{s = \\p,gn=>table {4 => y.s!p!gn; _ => x.s!p!gn}} ;
|
||||
ConsImp x xs =
|
||||
{s = \\p,gn=>table {4 => xs.s!p!gn!4; t => x.s!p!gn++linCoord bindComma!t++xs.s!p!gn!t}} ;
|
||||
ConjImp conj ss = {
|
||||
s = \\p,gn => linCoord [] ! conj.sep ++ ss.s!p!gn!conj.sep ++ conj.s ++ ss.s!p!gn!4
|
||||
} ;
|
||||
|
||||
lin
|
||||
ComplBareVS = ComplVS ;
|
||||
ComplSlashPartLast = ComplSlash ;
|
||||
@@ -204,6 +227,20 @@ lin
|
||||
gn = rnp.gn
|
||||
} ;
|
||||
|
||||
AdvRNP np prep rnp = {s = \\role => np.s ! role ++ prep.s ++ rnp.s ! RObj prep.c; gn = np.gn; p = np.p} ;
|
||||
AdvRVP vp prep rnp = insertObj (\\a => prep.s ++ rnp.s ! RObj prep.c) Pos vp ;
|
||||
AdvRAP ap prep rnp = {
|
||||
s = \\aform,p => ap.s ! aform ! p ++ prep.s ++ rnp.s ! RObj prep.c ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
ReflA2RNP a rnp = {
|
||||
s = \\aform,_ => a.s ! aform ++ a.c2.s ++ rnp.s ! RObj a.c2.c ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
PossPronRNP pron num cn rnp = DetCN (DetQuant (PossPron pron) num) (PossNP cn (lin NP {s = rnp.s; gn = rnp.gn; p=NounP3 Pos})) ;
|
||||
|
||||
lin
|
||||
ApposNP np1 np2 = {s = \\role => case role of {
|
||||
RObj c => linCase c (personPol np1.p) ++ np1.s ! RObj CPrep ;
|
||||
|
||||
@@ -31,6 +31,10 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
||||
} ++ compl ;
|
||||
} ;
|
||||
|
||||
AdvImp adv imp = {
|
||||
s = \\pol,gennum => adv.s ++ imp.s ! pol ! gennum
|
||||
} ;
|
||||
|
||||
SlashVP np slash = {
|
||||
s = \\agr => (mkClause (np.s ! RSubj) np.gn np.p {s = slash.s ;
|
||||
ad = slash.ad ;
|
||||
|
||||
@@ -50,7 +50,7 @@ lin
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionAdv adv = {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adv" ;
|
||||
s1 = heading1 "Adverbi" ;
|
||||
s2 = paragraph adv.s
|
||||
|
||||
@@ -22,7 +22,7 @@ lin
|
||||
s2 = adj.s
|
||||
} ;
|
||||
|
||||
InflectionAdv adv = {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adv" ;
|
||||
s1 = heading1 "Adverb" ;
|
||||
s2 = paragraph adv.s
|
||||
|
||||
@@ -56,4 +56,6 @@ concrete AdjectiveDut of Adjective = CatDut ** open ResDut, Prelude in
|
||||
isPre = True
|
||||
} ;
|
||||
|
||||
AdvAP ap adv = {s = \\agr,af => ap.s ! agr ! af ++ adv.s ; isPre = False} ; -- KA: guessed
|
||||
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ lin
|
||||
s2 = dtable
|
||||
} ;
|
||||
|
||||
InflectionAdv adv = {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adv" ;
|
||||
s1 = heading1 (heading preposition_Category) ;
|
||||
s2 = paragraph adv.s
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
|
||||
concrete ExtendDut of Extend =
|
||||
CatDut ** ExtendFunctor
|
||||
- [PastPartAP,ICompAP,IAdvAdv]
|
||||
- [PastPartAP,ICompAP,IAdvAdv,
|
||||
VPS,
|
||||
BaseVPS, ConsVPS,
|
||||
MkVPS, ConjVPS, PredVPS
|
||||
]
|
||||
with
|
||||
(Grammar = GrammarDut) **
|
||||
open
|
||||
@@ -12,8 +16,7 @@ concrete ExtendDut of Extend =
|
||||
Prelude,
|
||||
ParadigmsDut in {
|
||||
|
||||
lin
|
||||
|
||||
lin --# notpresent
|
||||
PastPartAP vp = { --# notpresent
|
||||
s = \\agr,af => let aForm = case vp.isHeavy of { --# notpresent
|
||||
True => APred ; --# notpresent
|
||||
@@ -21,8 +24,81 @@ lin
|
||||
in (infClause [] agr vp aForm).s ! Past ! Anter ! Pos ! Sub ; --# notpresent
|
||||
isPre = notB vp.isHeavy ; --# notpresent
|
||||
} ; --# notpresent
|
||||
|
||||
|
||||
lincat
|
||||
VPS = {s : Order => Agr => Str} ;
|
||||
[VPS] = {s1,s2 : Order => Agr => Str} ;
|
||||
|
||||
lin
|
||||
BaseVPS = twoTable2 Order Agr ;
|
||||
ConsVPS = consrTable2 Order Agr comma ;
|
||||
|
||||
PredVPS np vpi =
|
||||
let
|
||||
subj = np.s ! NPNom ;
|
||||
agr = np.a ;
|
||||
in {
|
||||
s = \\o =>
|
||||
let verb = vpi.s ! o ! agr
|
||||
in case o of {
|
||||
Main => subj ++ verb ;
|
||||
Inv => verb ++ subj ; ---- älskar henne och sover jag
|
||||
Sub => subj ++ verb
|
||||
}
|
||||
} ;
|
||||
|
||||
MkVPS tm p vp = {
|
||||
s = \\o,agr =>
|
||||
let
|
||||
ord = case o of {
|
||||
Sub => True ; -- glue prefix to verb
|
||||
_ => False
|
||||
} ;
|
||||
subj = [] ;
|
||||
t = tm.t ;
|
||||
a = tm.a ;
|
||||
b = p.p ;
|
||||
vform = vForm t agr.g agr.n agr.p o ;
|
||||
auxv = (auxVerb vp.s.aux).s ;
|
||||
vperf = vp.s.s ! VPerf APred ;
|
||||
verb : Str * Str = case <t,a> of {
|
||||
<Fut|Cond,Simul> => <zullen_V.s ! vform, vp.s.s ! VInf> ; --# notpresent
|
||||
<Fut|Cond,Anter> => <zullen_V.s ! vform, vperf ++ auxv ! VInf> ; --# notpresent
|
||||
<_, Anter> => <auxv ! vform, vperf> ; --# notpresent
|
||||
<_, Simul> => <vp.s.s ! vform, []>
|
||||
} ;
|
||||
fin = verb.p1 ;
|
||||
neg = vp.a1 ! b ;
|
||||
obj0 = vp.n0 ! agr ;
|
||||
obj = vp.n2 ! agr ;
|
||||
compl = obj0 ++ neg ++ obj ++ vp.a2 ++ vp.s.prefix ;
|
||||
inf =
|
||||
case <vp.isAux, vp.inf.p2, a> of { --# notpresent
|
||||
<True,True,Anter> => vp.s.s ! VInf ++ vp.inf.p1 ; --# notpresent
|
||||
_ => --# notpresent
|
||||
vp.inf.p1 ++ verb.p2
|
||||
} --# notpresent
|
||||
;
|
||||
extra = vp.ext ;
|
||||
inffin =
|
||||
case <a,vp.isAux> of { --# notpresent
|
||||
<Anter,True> => fin ++ inf ; -- double inf --# notpresent
|
||||
_ => --# notpresent
|
||||
inf ++ fin --- or just auxiliary vp
|
||||
} --# notpresent
|
||||
in
|
||||
tm.s ++ p.s ++
|
||||
case o of {
|
||||
Main => subj ++ fin ++ compl ++ inf ++ extra ;
|
||||
Inv => fin ++ subj ++ compl ++ inf ++ extra ;
|
||||
Sub => subj ++ compl ++ inffin ++ extra
|
||||
}
|
||||
} ;
|
||||
|
||||
lin
|
||||
ConjVPS = conjunctDistrTable2 Order Agr ;
|
||||
|
||||
ICompAP ap = {s = \\agr => "hoe" ++ ap.s ! agr ! APred} ;
|
||||
|
||||
IAdvAdv adv = {s = "hoe" ++ adv.s} ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,20 @@ lin
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionPN = \pn -> {
|
||||
t = "pn" ;
|
||||
s1 = heading1 ("Proper Name" ++
|
||||
case pn.g of {
|
||||
Neutr => "";
|
||||
Masc => "(masc)";
|
||||
Fem => "(fem)"
|
||||
}) ;
|
||||
s2 = frameTable (
|
||||
tr (th "nom" ++ th "gen") ++
|
||||
tr (td (pn.s ! Nom) ++ td (pn.s ! Gen))
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionA, InflectionA2 = \adj -> {
|
||||
t = "a" ;
|
||||
s1 = heading1 "Adjective" ;
|
||||
@@ -37,7 +51,7 @@ lin
|
||||
paragraph (adj.s ! AAdv)
|
||||
} ;
|
||||
|
||||
InflectionAdv = \adv -> {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adv" ;
|
||||
s1= heading1 "Adverb" ;
|
||||
s2= paragraph (adv.s) ;
|
||||
|
||||
@@ -189,6 +189,20 @@ concrete ExtendEng of Extend =
|
||||
}
|
||||
} ;
|
||||
|
||||
-- Conjunction of copula complements
|
||||
|
||||
lincat [Comp] = {s1,s2 : Agr => Str} ;
|
||||
lin BaseComp x y = twoTable Agr x y ;
|
||||
ConsComp xs x = consrTable Agr comma xs x ;
|
||||
ConjComp conj ss = conjunctDistrTable Agr conj ss ;
|
||||
|
||||
-- Conjunction of imperatives
|
||||
|
||||
lincat ListImp = {s1,s2 : CPolarity => ImpForm => Str} ;
|
||||
lin BaseImp = twoTable2 CPolarity ImpForm ;
|
||||
ConsImp = consrTable2 CPolarity ImpForm comma ;
|
||||
ConjImp conj ss = conjunctDistrTable2 CPolarity ImpForm conj ss ;
|
||||
|
||||
-----
|
||||
|
||||
lin
|
||||
@@ -386,6 +400,17 @@ concrete ExtendEng of Extend =
|
||||
ReflPoss num cn = {s = \\a => possPron ! a ++ num.s ! True ! Nom ++ cn.s ! num.n ! Nom} ;
|
||||
PredetRNP predet rnp = {s = \\a => predet.s ++ rnp.s ! a} ;
|
||||
|
||||
AdvRNP np prep rnp = {s = \\a => np.s ! NPAcc ++ prep.s ++ rnp.s ! a} ;
|
||||
AdvRVP vp prep rnp = insertObj (\\a => prep.s ++ rnp.s ! a) vp ;
|
||||
AdvRAP ap prep rnp = {s = \\a => ap.s ! a ++ prep.s ++ rnp.s ! a ; isPre = False} ;
|
||||
|
||||
ReflA2RNP a rnp = {
|
||||
s = \\ag => a.s ! AAdj Posit Nom ++ a.c2 ++ rnp.s ! ag ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
PossPronRNP pron num cn rnp = DetCN (DetQuant (PossPron pron) num) (PossNP cn (lin NP {s = \\_ => rnp.s ! pron.a; a = pron.a})) ;
|
||||
|
||||
ConjRNP conj rpns = conjunctDistrTable Agr conj rpns ;
|
||||
|
||||
Base_rr_RNP x y = twoTable Agr x y ;
|
||||
|
||||
@@ -22,6 +22,10 @@ concrete SentenceEng of Sentence = CatEng ** open Prelude, ResEng in {
|
||||
dont ++ verb
|
||||
} ;
|
||||
|
||||
AdvImp adv imp = {
|
||||
s = \\pol,impform => adv.s ++ imp.s ! pol ! impform
|
||||
} ;
|
||||
|
||||
SlashVP np vp =
|
||||
mkClause (np.s ! npNom) np.a vp ** {c2 = vp.c2} ;
|
||||
|
||||
|
||||
@@ -61,4 +61,6 @@ concrete AdjectiveEst of Adjective = CatEst ** open ResEst, Prelude in {
|
||||
infl = a.infl
|
||||
} ;
|
||||
|
||||
AdvAP ap adv = {s = \\b,af => ap.s ! b ! af ++ adv.s ; infl = ap.infl} ; -- KA: guessed
|
||||
|
||||
}
|
||||
|
||||
@@ -2,5 +2,8 @@
|
||||
|
||||
concrete AllEst of AllEstAbs =
|
||||
LangEst, -- - [SlashV2VNP,SlashVV, TFut], ---- to speed up linking; to remove spurious parses
|
||||
ExtraEst -- - [ProDrop, ProDropPoss, S_OSV, S_VSO, S_ASV] -- to exclude spurious parses
|
||||
** {} ;
|
||||
ExtendEst -- - [ProDrop, ProDropPoss, S_OSV, S_VSO, S_ASV] -- to exclude spurious parses
|
||||
**
|
||||
open ExtraEst --- to force compilation since this module is used in many places
|
||||
in
|
||||
{} ;
|
||||
|
||||
@@ -44,7 +44,7 @@ lin
|
||||
inflNoun (\nf -> superl ! AN nf)
|
||||
} ;
|
||||
|
||||
InflectionAdv adv = {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adv" ;
|
||||
s1 = heading1 (heading adverb_Category) ;
|
||||
s2 = paragraph adv.s
|
||||
|
||||
@@ -41,7 +41,7 @@ lin
|
||||
inflNoun (\nf -> (snoun2nounSep {s = \\f => adj.s ! Superl ! sAN f ; h = adj.h}).s ! nf)
|
||||
} ;
|
||||
|
||||
InflectionAdv adv = {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adv" ;
|
||||
s1 = heading1 (heading adverb_Category) ;
|
||||
s2 = paragraph adv.s
|
||||
|
||||
@@ -76,14 +76,16 @@ oper
|
||||
casePrep : Case -> Prep ; -- just case, e.g. adessive
|
||||
|
||||
mkPrep = overload {
|
||||
mkPrep : Case -> Prep
|
||||
mkPrep : Case -> Prep -- inessive
|
||||
= casePrep ;
|
||||
mkPrep : Str -> Prep
|
||||
mkPrep : Str -> Prep -- kanssa
|
||||
= postGenPrep ;
|
||||
mkPrep : Case -> Str -> Prep
|
||||
mkPrep : Case -> Str -> Prep -- genitive kanssa
|
||||
= postPrep ;
|
||||
mkPrep : Str -> Case -> Prep
|
||||
mkPrep : Str -> Case -> Prep -- ilman partitive
|
||||
= \s,c -> prePrep c s ;
|
||||
mkPrep : Str -> Case -> Str -> Prep -- yhdessä genitive kanssa
|
||||
= \s,c,t -> lin Prep {c = NPCase c ; s = <s,t,\\_ => []>}
|
||||
} ;
|
||||
|
||||
accusative : Prep
|
||||
@@ -635,6 +637,9 @@ mkVS = overload {
|
||||
ukon ++ ukkoja ++ ukkoa)
|
||||
} ;
|
||||
|
||||
--- this is a paradigm hidden from the API. It should not be used without caution
|
||||
invarN : Str -> N = \s -> <lin N {s = \\_ => s ; h = Back} : N> ;
|
||||
|
||||
mkN2 = overload {
|
||||
mkN2 : N -> N2 = \n -> mmkN2 n (casePrep genitive) ;
|
||||
mkN2 : N -> Prep -> N2 = mmkN2
|
||||
|
||||
@@ -50,7 +50,7 @@ lin
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionAdv adv = {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adv" ;
|
||||
s1 = heading1 "Adverbe" ;
|
||||
s2 = paragraph adv.s
|
||||
|
||||
@@ -62,7 +62,7 @@ lin
|
||||
s2 = dtable positive_Parameter Posit ++ dtable comparative_Parameter Compar ++ dtable superlative_Parameter Superl
|
||||
} ;
|
||||
|
||||
InflectionAdv adv = {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adverb" ;
|
||||
s1 = heading1 (heading adverb_Category) ;
|
||||
s2 = paragraph adv.s
|
||||
|
||||
@@ -59,6 +59,12 @@ lin
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adv" ;
|
||||
s1 = heading1 "Adverb" ;
|
||||
s2 = adv.s
|
||||
} ;
|
||||
|
||||
InflectionPrep = \prep -> {
|
||||
t = "prep" ;
|
||||
s1 = heading1 "Preposition" ;
|
||||
|
||||
@@ -74,7 +74,7 @@ lin
|
||||
} ;
|
||||
|
||||
{-
|
||||
InflectionAdv adv = {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adverb" ;
|
||||
s1 = heading1 (heading adverb_Category) ;
|
||||
s2 = paragraph adv.s
|
||||
|
||||
@@ -50,7 +50,7 @@ lin
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionAdv adv = {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adv" ;
|
||||
s1 = heading1 "Adverbe" ;
|
||||
s2 = paragraph adv.s
|
||||
|
||||
@@ -24619,7 +24619,7 @@ lin pienennös_N = mkN {s = d39 "pienennös"} ;
|
||||
lin pienentyä_V = mkV {s = c52A "pienentyä"} ;
|
||||
lin pienentää_V = mkV {s = c54A "pienentää"} ;
|
||||
lin pienetä_V = mkV {s = c72 "pienetä"} ;
|
||||
lin pieni_N = mkN {s = d26 "pieni"} ;
|
||||
lin pieni_A = mkA (mkN {s = d26 "pieni"}) ;
|
||||
lin pieniä_V = mkV {s = c61 "pieniä"} ;
|
||||
lin piennar_N = mkN {s = d49A "piennar"} ;
|
||||
lin pienoinen_N = mkN {s = d38 "pienoinen"} ;
|
||||
|
||||
@@ -24613,7 +24613,7 @@ fun pienennös_N : N ;
|
||||
fun pienentyä_V : V ;
|
||||
fun pienentää_V : V ;
|
||||
fun pienetä_V : V ;
|
||||
fun pieni_N : N ;
|
||||
fun pieni_A : A ;
|
||||
fun pieniä_V : V ;
|
||||
fun piennar_N : N ;
|
||||
fun pienoinen_N : N ;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -50,7 +50,7 @@ lin
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionAdv adv = {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adv" ;
|
||||
s1 = heading1 "Advérbio" ;
|
||||
s2 = paragraph adv.s
|
||||
|
||||
@@ -28,9 +28,10 @@ concrete ExtendPor of Extend = CatPor ** ExtendRomanceFunctor -
|
||||
Prelude,
|
||||
ParadigmsPor,
|
||||
(L = LexiconPor),
|
||||
(S = StructuralPor) in {
|
||||
(S = StructuralPor),
|
||||
(P = ParamX) in {
|
||||
|
||||
lin
|
||||
lin
|
||||
ExistsNP np =
|
||||
mkClause [] True False np.a
|
||||
(insertComplement (\\_ => (np.s ! Nom).ton)
|
||||
@@ -88,6 +89,21 @@ concrete ExtendPor of Extend = CatPor ** ExtendRomanceFunctor -
|
||||
s = "a fim de" ++ infStr vp
|
||||
} ;
|
||||
|
||||
lincat ListComp = {s1,s2 : Agr => Str ; cop : CopulaType} ;
|
||||
|
||||
lin
|
||||
-- should one allow different copulas?
|
||||
BaseComp x y = twoTable Agr x y ** {cop = x.cop } ;
|
||||
ConsComp xs x = consrTable Agr comma xs x ** xs ;
|
||||
ConjComp conj cs = conjunctDistrTable Agr conj cs ** {cop = cs.cop} ;
|
||||
|
||||
lincat ListImp = {s1,s2 : RPolarity => P.ImpForm => Gender => Str} ;
|
||||
|
||||
lin
|
||||
BaseImp = twoTable3 RPolarity P.ImpForm Gender ;
|
||||
ConsImp = consrTable3 RPolarity P.ImpForm Gender comma ;
|
||||
ConjImp conj is = conjunctDistrTable3 RPolarity P.ImpForm Gender conj is ;
|
||||
|
||||
lin
|
||||
iFem_Pron = pronAgr S.i_Pron Fem Sg P1 ;
|
||||
weFem_Pron = pronAgr S.we_Pron Fem Pl P1 ;
|
||||
|
||||
@@ -15,6 +15,10 @@ incomplete concrete SentenceRomance of Sentence =
|
||||
}
|
||||
} ;
|
||||
|
||||
AdvImp adv imp = {
|
||||
s = \\pol,impform,g => imp.s ! pol ! impform ! g ++ adv.s
|
||||
} ;
|
||||
|
||||
{-
|
||||
SlashVP np vps =
|
||||
-- agreement decided afterwards: la fille qu'il a trouvée
|
||||
|
||||
@@ -44,7 +44,7 @@ lin
|
||||
frameTable (tr (tr (adj.comp)))
|
||||
} ;
|
||||
|
||||
InflectionAdv adv = {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adv" ;
|
||||
s1 = heading1 (heading adverb_Category) ;
|
||||
s2 = paragraph adv.s
|
||||
|
||||
@@ -357,7 +357,7 @@ intagAttr "tr" "style=\"border-top-color:white;border-left-color:white;border-ri
|
||||
|
||||
} ;
|
||||
|
||||
InflectionAdv = \adv -> {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "нар" ;
|
||||
s1= heading1 ("Наречие") ;
|
||||
s2= paragraph (adv.s) ;
|
||||
|
||||
@@ -56,7 +56,7 @@ incomplete concrete AdjectiveScand of Adjective =
|
||||
|
||||
AdvAP ap adv = {
|
||||
s = \\a => ap.s ! a ++ adv.s ;
|
||||
isPre = ap.isPre
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
UseA2 a = {
|
||||
|
||||
@@ -19,6 +19,10 @@ incomplete concrete SentenceScand of Sentence =
|
||||
verb.fin ++ neg.p1 ++ verb.inf ++ pron ++ neg.p2 ++ vp.n2 ! agr ++ vp.a2 ++ vp.ext
|
||||
} ;
|
||||
|
||||
AdvImp adv imp = {
|
||||
s = \\p,n => adv.s ++ imp.s ! p ! n
|
||||
} ;
|
||||
|
||||
SlashVP np vp =
|
||||
mkClause
|
||||
(np.s ! nominative) np.a
|
||||
|
||||
@@ -60,7 +60,7 @@ lin
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionAdv = \adv -> {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "prs" ;
|
||||
s1= heading1 ("Prislov") ;
|
||||
s2= paragraph (adv.s)
|
||||
|
||||
@@ -29,6 +29,12 @@ concrete NounSlv of Noun = CatSlv ** open ResSlv,Prelude in {
|
||||
isPron = True
|
||||
} ;
|
||||
|
||||
AdvNP np adv = {
|
||||
s = \\c => np.s ! c ++ adv.s ;
|
||||
a = np.a ;
|
||||
isPron = False -- KA: guessed
|
||||
} ;
|
||||
|
||||
DetQuant quant num = {
|
||||
s = \\g,c => quant.s ! g ! c ! (numAgr2num ! num.n) ++ num.s ! g ! c;
|
||||
spec = quant.spec ;
|
||||
|
||||
@@ -16,5 +16,8 @@ lin
|
||||
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p
|
||||
} ;
|
||||
|
||||
ExtAdvS a s = {s = a.s ++ bindComma ++ s.s} ;
|
||||
AdvS a s = {s = a.s ++ s.s} ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--# -path=.:../common:../abstract
|
||||
|
||||
concrete ExtendSom of Extend = CatSom
|
||||
** ExtendFunctor - [GenModNP, FocusObj, ComplDirectVS, ComplDirectVQ]
|
||||
** ExtendFunctor - [GenModNP, FocusObj, ComplDirectVS, ComplDirectVQ, ExistIPQS]
|
||||
with (Grammar=GrammarSom)
|
||||
** open Prelude, ResSom, NounSom in {
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ lin
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionAdv adv = {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adv" ;
|
||||
s1 = heading1 "Adverbe" ;
|
||||
s2 = paragraph adv.s
|
||||
|
||||
@@ -32,6 +32,18 @@ lin
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionPN = \pn -> {
|
||||
t = "nm" ;
|
||||
s1 = heading1 ("Namn" ++ case pn.g of {
|
||||
Utr => "(utr)" ;
|
||||
Neutr => "(neutr)"
|
||||
}) ;
|
||||
s2 = frameTable (
|
||||
tr (th "nom" ++ td (pn.s ! Nom)) ++
|
||||
tr (th "gen" ++ td (pn.s ! Gen))
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionA, InflectionA2 = \adj -> {
|
||||
t = "a" ;
|
||||
s1 = heading1 "Adjektiv" ;
|
||||
@@ -66,7 +78,7 @@ lin
|
||||
td (adj.s ! (AF (APosit (Weak Pl)) c))) ;
|
||||
} ;
|
||||
|
||||
InflectionAdv adv = {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adv" ;
|
||||
s1 = heading1 "Adverb" ;
|
||||
s2 = paragraph adv.s
|
||||
|
||||
@@ -70,6 +70,28 @@ in {
|
||||
insertObj (\\a => vps.c2.s ++ vps.n3 ! a) (passiveVP vps) ;
|
||||
PassAgentVPSlash vps np =
|
||||
insertObjPost (\\a => vps.c2.s ++ vps.n3 ! a) (insertObj (\\_ => (PrepNP by8agent_Prep np).s) (passiveVP vps)) ;
|
||||
ProgrVPSlash vp =
|
||||
insertObj (\\a => "att" ++ infVP vp a) (predV (P.partV I.hålla_V "på")) **
|
||||
{ n3 = vp.n3 ;
|
||||
c2 = vp.c2
|
||||
} ;
|
||||
|
||||
|
||||
N2VPSlash n2 =
|
||||
let vp : CatSwe.VP = UseComp (CompCN (UseN2 n2)) ;
|
||||
dummyVPS : VPSlash = SlashV2a (P.mkV2 "dummy") ;
|
||||
in dummyVPS ** -- has necessary fields for VPSlash
|
||||
vp ** -- has all the right fields except for c2
|
||||
{c2 = n2.c2} ; -- has the right c2
|
||||
|
||||
|
||||
|
||||
A2VPSlash a2 =
|
||||
let vp : CatSwe.VP = UseComp (CompAP (UseA2 a2)) ;
|
||||
dummyVPS : VPSlash = SlashV2a (P.mkV2 "dummy") ;
|
||||
in dummyVPS ** -- has necessary fields for VPSlash
|
||||
vp ** -- has all the right fields except for c2
|
||||
{c2 = a2.c2} ; -- has the right c2
|
||||
|
||||
|
||||
N2VPSlash n2 =
|
||||
@@ -193,6 +215,16 @@ in {
|
||||
s = \\t,a => vpi2.s ! t ! a ++ vpi2.c2.s ++ np.s ! NPAcc
|
||||
} ;
|
||||
|
||||
lincat [Comp] = {s1,s2 : Agr => Str} ;
|
||||
lin BaseComp x y = twoTable Agr x y ;
|
||||
ConsComp xs x = consrTable Agr comma xs x ;
|
||||
ConjComp conj ss = conjunctDistrTable Agr conj ss ;
|
||||
|
||||
lincat ListImp = {s1,s2 : Polarity => Number => Str} ;
|
||||
lin BaseImp = twoTable2 Polarity Number ;
|
||||
ConsImp = consrTable2 Polarity Number comma ;
|
||||
ConjImp conj ss = conjunctDistrTable2 Polarity Number conj ss ;
|
||||
|
||||
-----------
|
||||
|
||||
ICompAP ap = {s = \\a => hur_IAdv.s ++ ap.s ! a} ;
|
||||
@@ -205,10 +237,9 @@ in {
|
||||
|
||||
lin
|
||||
ReflRNP vps rnp =
|
||||
insertObjPron
|
||||
(andB (notB vps.c2.hasPrep) rnp.isPron)
|
||||
rnp.s
|
||||
(insertObj (\\a => vps.c2.s ++ vps.n3 ! a) vps) ;
|
||||
insertObjPost (\\a => vps.n3 ! a)
|
||||
(insertObjPron (andB rnp.isPron (notB vps.c2.hasPrep)) (\\a => vps.c2.s ++ rnp.s ! a)
|
||||
vps) ;
|
||||
|
||||
ReflPron = {s = \\a => reflPron a ; isPron = True} ; ---- agr ??
|
||||
ReflPoss num cn = {
|
||||
@@ -222,6 +253,30 @@ in {
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
AdvRNP np prep rnp = {s = \\a => np.s ! NPAcc ++ prep.s ++ rnp.s ! a; isPron = False} ;
|
||||
AdvRVP vp prep rnp = insertObjPost (\\a => prep.s ++ rnp.s ! a) vp ;
|
||||
AdvRAP ap prep rnp = {
|
||||
s = \\a => let agr = case a of {
|
||||
Strong (GSg g) => agrP3 g Sg ;
|
||||
Strong GPl => agrP3 Utr Pl ;
|
||||
Weak n => agrP3 Utr n
|
||||
}
|
||||
in ap.s ! a ++ prep.s ++ rnp.s ! agr ;
|
||||
isPre = ap.isPre
|
||||
} ;
|
||||
|
||||
ReflA2RNP a rnp = {
|
||||
s = \\ap => let agr = case ap of {
|
||||
Strong (GSg g) => agrP3 g Sg ;
|
||||
Strong GPl => agrP3 Utr Pl ;
|
||||
Weak n => agrP3 Utr n
|
||||
}
|
||||
in a.s ! AF (APosit ap) Nom ++ a.c2.s ++ rnp.s ! agr ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
PossPronRNP pron num cn rnp = DetCN (DetQuant (PossPron pron) num) (PossNP cn (lin NP {s = \\_ => rnp.s ! pron.a; a = pron.a; isPron=False})) ;
|
||||
|
||||
ConjRNP conj rpns = conjunctDistrTable Agr conj rpns ** {isPron = False} ;
|
||||
|
||||
Base_rr_RNP x y = twoTable Agr x y ;
|
||||
|
||||
@@ -54,7 +54,7 @@ lin
|
||||
paragraph (adj.adv) ;
|
||||
} ;
|
||||
|
||||
InflectionAdv = \adv -> {
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "b" ;
|
||||
s1= heading1 ("Belirteç") ;
|
||||
s2= paragraph (adv.s) ;
|
||||
|
||||
@@ -59,6 +59,12 @@ lin
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adv" ;
|
||||
s1 = heading1 "Adverb" ;
|
||||
s2 = adv.s
|
||||
} ;
|
||||
|
||||
InflectionPrep = \prep -> {
|
||||
t = "prep" ;
|
||||
s1 = heading1 "Preposition" ;
|
||||
|
||||
Reference in New Issue
Block a user