Merge pull request #201 from inariksit/here_are_Cl

Extend + DictSpa
This commit is contained in:
Inari Listenmaa
2019-03-19 09:42:12 +01:00
committed by GitHub
8 changed files with 117 additions and 104 deletions

View File

@@ -30,7 +30,7 @@ abstract Extend = Cat ** {
StrandQuestSlash : IP -> ClSlash -> QCl ; -- whom does John live with
StrandRelSlash : RP -> ClSlash -> RCl ; -- that he lives in
EmptyRelSlash : ClSlash -> RCl ; -- he lives in
-- $VP$ conjunction, separate categories for finite and infinitive forms (VPS and VPI, respectively)
-- covering both in the same category leads to spurious VPI parses because VPS depends on many more tenses
@@ -45,7 +45,7 @@ abstract Extend = Cat ** {
MkVPS : Temp -> Pol -> VP -> VPS ; -- hasn't slept
ConjVPS : Conj -> [VPS] -> VPS ; -- has walked and won't sleep
PredVPS : NP -> VPS -> S ; -- she [has walked and won't sleep]
MkVPI : VP -> VPI ; -- to sleep (TODO: Ant and Pol)
ConjVPI : Conj -> [VPI] -> VPI ; -- to sleep and to walk
ComplVPIVV : VV -> VPI -> VP ; -- must sleep and walk
@@ -59,17 +59,17 @@ abstract Extend = Cat ** {
[VPI2] {2} ; -- to love, to hate
fun
MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates
ComplVPS2 : VPS2 -> NP -> VPS ; -- has loved and now hates that person
MkVPI2 : VPSlash -> VPI2 ; -- to love
MkVPI2 : VPSlash -> VPI2 ; -- to love
ConjVPI2 : Conj -> [VPI2] -> VPI2 ; -- to love and hate
ComplVPI2 : VPI2 -> NP -> VPI ; -- to love and hate that person
fun
ProDrop : Pron -> Pron ; -- unstressed subject pronoun becomes empty: "am tired"
ICompAP : AP -> IComp ; -- "how old"
IAdvAdv : Adv -> IAdv ; -- "how often"
@@ -88,15 +88,15 @@ abstract Extend = Cat ** {
-- participle constructions
PresPartAP : VP -> AP ; -- (the man) looking at Mary
EmbedPresPart : VP -> SC ; -- looking at Mary (is fun)
PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
PastPartAgentAP : VPSlash -> NP -> AP ; -- (opportunity) lost by the company
-- this is a generalization of Verb.PassV2 and should replace it in the future.
PassVPSlash : VPSlash -> VP ; -- be forced to sleep
-- the form with an agent may result in a different linearization
-- the form with an agent may result in a different linearization
-- from an adverbial modification by an agent phrase.
PassAgentVPSlash : VPSlash -> NP -> VP ; -- be begged by her to go
@@ -115,6 +115,9 @@ abstract Extend = Cat ** {
ExistMassCN : CN -> Cl ; -- there is beer / there is no beer
ExistPluralCN : CN -> Cl ; -- there are trees / there are no trees
-- generalisation of existential, with adverb as a parameter
AdvIsNP : Adv -> NP -> Cl ; -- here is the tree / here are the trees
-- infinitive for purpose AR 21/8/2013
PurposeVP : VP -> Adv ; -- to become happy
@@ -148,8 +151,8 @@ abstract Extend = Cat ** {
cat
RNP ; -- reflexive noun phrase, e.g. "my family and myself"
RNPList ; -- list of reflexives to be coordinated, e.g. "my family, myself, everyone"
-- Notice that it is enough for one NP in RNPList to be RNP.
-- Notice that it is enough for one NP in RNPList to be RNP.
fun
ReflRNP : VPSlash -> RNP -> VP ; -- love my family and myself
@@ -161,7 +164,7 @@ abstract Extend = Cat ** {
ConjRNP : Conj -> RNPList -> RNP ; -- my family, John and myself
Base_rr_RNP : RNP -> RNP -> RNPList ; -- my family, myself
Base_rr_RNP : RNP -> RNP -> RNPList ; -- my family, myself
Base_nr_RNP : NP -> RNP -> RNPList ; -- John, myself
Base_rn_RNP : RNP -> NP -> RNPList ; -- myself, John
Cons_rr_RNP : RNP -> RNPList -> RNPList ; -- my family, myself, John
@@ -181,8 +184,8 @@ abstract Extend = Cat ** {
GerundNP : VP -> NP ; -- publishing the document (by nature definite)
GerundAdv : VP -> Adv ; -- publishing the document (prepositionless adverb)
WithoutVP : VP -> Adv ; -- without publishing the document
ByVP : VP -> Adv ; -- by publishing the document
WithoutVP : VP -> Adv ; -- without publishing the document
ByVP : VP -> Adv ; -- by publishing the document
InOrderToVP : VP -> Adv ; -- (in order) to publish the document
ApposNP : NP -> NP -> NP ; -- Mr Macron, the president of France,
@@ -207,7 +210,7 @@ abstract Extend = Cat ** {
DetNPFem : Det -> NP ;
UseComp_estar : Comp -> VP ; -- (Cat, Spa, Por) "está cheio" instead of "é cheio"
iFem_Pron : Pron ; -- I (Fem)
youFem_Pron : Pron ; -- you (Fem)
weFem_Pron : Pron ; -- we (Fem)

View File

@@ -29,10 +29,10 @@ lin
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
MkVPS2 = variants {} ; -- : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
MkVPS2 = variants {} ; -- : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
ConjVPS2 = variants {} ; -- : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates
ComplVPS2 = variants {} ; -- : VPS2 -> NP -> VPS ; -- has loved and now hates that person
MkVPI2 = variants {} ; -- : Ant -> Pol -> VPSlash -> VPI2 ; -- to have loved
MkVPI2 = variants {} ; -- : Ant -> Pol -> VPSlash -> VPI2 ; -- to have loved
ConjVPI2 = variants {} ; -- : Conj -> [VPI2] -> VPI2 ; -- to love and have hated
ComplVPI2 = variants {} ; -- : VPI2 -> NP -> VPI ; -- to love and hate that person
ProDrop pro = pro ; -- am tired ; DEFAULT I am tired (no pro drop)
@@ -54,6 +54,7 @@ lin
ExistCN cn = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ;
ExistMassCN cn = ExistNP (MassNP cn) ;
ExistPluralCN cn = ExistNP (DetCN (DetQuant IndefArt NumPl) cn) ;
AdvIsNP adv np = PredVP np (UseComp (CompAdv adv)) ; -- here is the tree / here are the trees
PurposeVP = variants {} ; -- VP -> Adv ; -- to become happy
ComplBareVS = ComplVS ; -- VS -> S -> VP ; -- say she runs ; DEFAULT say that she runs
SlashBareV2S = SlashV2S ; -- V2S -> S -> VPSlash ; -- answer (to him) it is good ; DEFAULT answer that it is good

View File

@@ -3,8 +3,8 @@
concrete ExtendEng of Extend =
CatEng ** ExtendFunctor -
[
VPS, ListVPS, VPI, ListVPI, VPS2, ListVPS2, VPI2, ListVPI2, RNP, RNPList,
AdAdV, AdjAsCN, AdjAsNP, ApposNP,
VPS, ListVPS, VPI, ListVPI, VPS2, ListVPS2, VPI2, ListVPI2, RNP, RNPList,
AdAdV, AdjAsCN, AdjAsNP, ApposNP, AdvIsNP,
BaseVPS, ConsVPS, BaseVPI, ConsVPI, BaseVPS2, ConsVPS2, BaseVPI2, ConsVPI2,
MkVPS, ConjVPS, PredVPS, MkVPI, ConjVPI, ComplVPIVV,
MkVPS2, ConjVPS2, ComplVPS2, MkVPI2, ConjVPI2, ComplVPI2,
@@ -33,23 +33,23 @@ concrete ExtendEng of Extend =
GenNP np = {s = \\_,_ => np.s ! npGen ; sp = \\_,_,_,_ => np.s ! npGen ; isDef = True} ;
GenIP ip = {s = \\_ => ip.s ! NCase Gen} ;
GenRP nu cn = {
s = \\c => "whose" ++ nu.s ! False ! Nom ++
s = \\c => "whose" ++ nu.s ! False ! Nom ++
case c of {
RC _ (NCase Gen) => cn.s ! nu.n ! Gen ;
_ => cn.s ! nu.n ! Nom
} ;
a = RAg (agrP3 nu.n)
} ;
GenModNP num np cn = DetCN (DetQuant (GenNP (lin NP np)) num) cn ;
GenModIP num ip cn = IdetCN (IdetQuant (GenIP (lin IP ip)) num) cn ;
StrandQuestSlash ip slash =
{s = \\t,a,b,q =>
StrandQuestSlash ip slash =
{s = \\t,a,b,q =>
(mkQuestion (ss (ip.s ! NPAcc)) slash).s ! t ! a ! b ! q ++ slash.c2
};
StrandRelSlash rp slash = {
s = \\t,a,p,ag =>
s = \\t,a,p,ag =>
rp.s ! RC (fromAgr ag).g NPAcc ++ slash.s ! t ! a ! p ! oDir ++ slash.c2 ;
c = NPAcc
} ;
@@ -70,14 +70,14 @@ concrete ExtendEng of Extend =
lincat
VPS = {s : Agr => Str} ;
[VPS] = {s1,s2 : Agr => Str} ;
[VPS] = {s1,s2 : Agr => Str} ;
VPI = {s : VVType => Agr => Str} ;
[VPI] = {s1,s2 : VVType => Agr => Str} ;
lin
BaseVPS = twoTable Agr ;
ConsVPS = consrTable Agr comma ;
BaseVPI = twoTable2 VVType Agr ;
ConsVPI = consrTable2 VVType Agr comma ;
@@ -85,7 +85,7 @@ concrete ExtendEng of Extend =
ConjVPS c xs = conjunctDistrTable Agr c xs ;
PredVPS np vps = {s = np.s ! npNom ++ vps.s ! np.a} ;
MkVPI vp = mkVPI (lin VP vp) ;
ConjVPI c xs = conjunctDistrTable2 VVType Agr c xs ;
ComplVPIVV vv vpi = insertObj (\\a => vpi.s ! vv.typ ! a) (predVV vv) ;
@@ -94,8 +94,8 @@ concrete ExtendEng of Extend =
-------- two-place verb conjunction
lincat
VPS2 = {s : Agr => Str ; c2 : Str} ;
[VPS2] = {s1,s2 : Agr => Str ; c2 : Str} ;
VPS2 = {s : Agr => Str ; c2 : Str} ;
[VPS2] = {s1,s2 : Agr => Str ; c2 : Str} ;
VPI2 = {s : VVType => Agr => Str ; c2 : Str} ;
[VPI2] = {s1,s2 : VVType => Agr => Str ; c2 : Str} ;
@@ -105,7 +105,7 @@ concrete ExtendEng of Extend =
BaseVPS2 x y = twoTable Agr x y ** {c2 = y.c2} ; ---- just remembering the prep of the latter verb
ConsVPS2 x xs = consrTable Agr comma x xs ** {c2 = xs.c2} ;
BaseVPI2 x y = twoTable2 VVType Agr x y ** {c2 = y.c2} ; ---- just remembering the prep of the latter verb
ConsVPI2 x xs = consrTable2 VVType Agr comma x xs ** {c2 = xs.c2} ;
@@ -121,15 +121,15 @@ concrete ExtendEng of Extend =
s = \\t,a => vpi2.s ! t ! a ++ vpi2.c2 ++ np.s ! NPAcc
} ;
oper
oper
mkVPS : Temp -> Pol -> VP -> VPS = \t,p,vp -> lin VPS {
s = \\a =>
let
s = \\a =>
let
verb = vp.s ! t.t ! t.a ! p.p ! oDir ! a ;
verbf = verb.aux ++ verb.adv ++ verb.fin ++ verb.inf ;
in t.s ++ p.s ++ vp.ad ! a ++ verbf ++ vp.p ++ vp.s2 ! a ++ vp.ext
} ;
mkVPI : VP -> VPI = \vp -> lin VPI {
s = table {
VVAux => \\a => vp.ad ! a ++ vp.inf ++ vp.p ++ vp.s2 ! a ;
@@ -152,11 +152,11 @@ concrete ExtendEng of Extend =
EmbedPresPart vp = {s = \\a => infVP VVPresPart vp False Simul CPos a} ;
PastPartAP vp = {
PastPartAP vp = {
s = \\a => vp.ad ! a ++ vp.ptp ++ vp.p ++ vp.c2 ++ vp.s2 ! a ++ vp.ext ;
isPre = vp.isSimple -- depends on whether there are complements
} ;
PastPartAgentAP vp np = {
PastPartAgentAP vp np = {
s = \\a => vp.ad ! a ++ vp.ptp ++ vp.p ++ vp.c2 ++ vp.s2 ! a ++ "by" ++ np.s ! NPAcc ++ vp.ext ;
isPre = False
} ;
@@ -168,45 +168,45 @@ concrete ExtendEng of Extend =
<Sg,Gen> => Predef.BIND ++ "'s" ;
<Pl,Nom> => Predef.BIND ++ "s" ;
<Pl,Gen> => Predef.BIND ++ "s'"
} ++
vp.p ++ vp.s2 ! AgP3Sg Neutr ++ vp.ext ;
} ++
vp.p ++ vp.s2 ! AgP3Sg Neutr ++ vp.ext ;
g = Neutr
} ;
GerundNP vp =
GerundNP vp =
let a = AgP3Sg Neutr ---- agr
in
in
{s = \\_ => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a ++ vp.ext ; a = a} ;
GerundAdv vp =
GerundAdv vp =
let a = AgP3Sg Neutr
in
in
{s = vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a ++ vp.ext} ;
WithoutVP vp = {s = "without" ++ (GerundAdv (lin VP vp)).s} ;
WithoutVP vp = {s = "without" ++ (GerundAdv (lin VP vp)).s} ;
InOrderToVP vp = {s = ("in order" | []) ++ infVP VVInf vp False Simul CPos (AgP3Sg Neutr)} ;
PurposeVP vp = {s = infVP VVInf vp False Simul CPos (agrP3 Sg)} ; --- agr
ByVP vp = {s = "by" ++ (GerundAdv (lin VP vp)).s} ;
ByVP vp = {s = "by" ++ (GerundAdv (lin VP vp)).s} ;
NominalizeVPSlashNP vpslash np =
NominalizeVPSlashNP vpslash np =
let vp : ResEng.VP = insertObjPre (\\_ => vpslash.c2 ++ np.s ! NPAcc) vpslash ;
a = AgP3Sg Neutr
in
lin NP {s = \\_ => vp.ad ! a ++ vp.prp ++ vp.s2 ! a ; a = a} ;
in
lin NP {s = \\_ => vp.ad ! a ++ vp.prp ++ vp.s2 ! a ; a = a} ;
oper passVPSlash : VPSlash -> Str -> ResEng.VP =
\vps,ag ->
let
oper passVPSlash : VPSlash -> Str -> ResEng.VP =
\vps,ag ->
let
be = predAux auxBe ;
ppt = vps.ptp
in {
s = be.s ;
p = [] ;
p = [] ;
prp = be.prp ;
ptp = be.ptp ;
inf = be.inf ;
@@ -216,7 +216,7 @@ concrete ExtendEng of Extend =
ext = vps.ext
} ;
lin
lin
PassVPSlash vps = passVPSlash (lin VPS vps) [] ;
PassAgentVPSlash vps np = passVPSlash (lin VPS vps) ("by" ++ np.s ! NPAcc) ;
@@ -226,8 +226,8 @@ concrete ExtendEng of Extend =
} ;
--- AR 22/5/2013
ExistsNP np =
mkClause "there" (agrP3 (fromAgr np.a).n)
ExistsNP np =
mkClause "there" (agrP3 (fromAgr np.a).n)
(insertObj (\\_ => np.s ! NPAcc) (predV (regV "exist"))) ;
ExistCN cn =
@@ -263,8 +263,8 @@ concrete ExtendEng of Extend =
} ;
FrontExtPredVP np vp = {
s = \\t,a,b,o =>
let
s = \\t,a,b,o =>
let
subj = np.s ! npNom ;
agr = np.a ;
verb = vp.s ! t ! a ! b ! o ! agr ;
@@ -277,8 +277,8 @@ concrete ExtendEng of Extend =
} ;
InvFrontExtPredVP np vp = {
s = \\t,a,b,o =>
let
s = \\t,a,b,o =>
let
subj = np.s ! npNom ;
agr = np.a ;
verb = vp.s ! t ! a ! b ! o ! agr ;
@@ -311,7 +311,7 @@ concrete ExtendEng of Extend =
RNP = {s : Agr => Str} ;
RNPList = {s1,s2 : Agr => Str} ;
lin
lin
ReflRNP vps rnp = insertObjPre (\\a => vps.c2 ++ rnp.s ! a) vps ;
ReflPron = {s = reflPron} ;
ReflPoss num cn = {s = \\a => possPron ! a ++ num.s ! True ! Nom ++ cn.s ! num.n ! Nom} ;
@@ -328,21 +328,23 @@ concrete ExtendEng of Extend =
lin
ApposNP np1 np2 = {s = \\c => np1.s ! c ++ comma ++ np2.s ! c; a = np1.a} ;
AdvIsNP adv np = PredVP {s = \\_ => adv.s ; a = np.a} (UseComp (CompNP np)) ;
---- TODO: RNPList construction
lin
ComplGenVV v a p vp = insertObj (\\agr => a.s ++ p.s ++
ComplGenVV v a p vp = insertObj (\\agr => a.s ++ p.s ++
infVP v.typ vp False a.a p.p agr)
(predVV v) ;
CompS s = {s = \\_ => "that" ++ s.s} ;
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
infVP VVInf vp False ant.a p.p a} ;
-- quite specific for English anyway
UncontractedNeg = {s = [] ; p = CNeg False} ;
UncontractedNeg = {s = [] ; p = CNeg False} ;
UttVPShort vp = {s = infVP VVAux vp False Simul CPos (agrP3 Sg)} ;

View File

@@ -5,7 +5,7 @@ concrete ExtendFin of Extend =
VPI2,VPS2,MkVPS,MkVPS2,ConjVPS2,ComplVPS2, ConsVPS, BaseVPS, ListVPS, VPS, ConjVPS,PredVPS,
MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV
,ExistCN, ExistMassCN, ICompAP, ByVP
,CompoundN, GenNP, GenIP
,CompoundN, GenNP, GenIP, AdvIsNP
]
with
(Grammar = GrammarFin) **
@@ -120,7 +120,7 @@ lin
---- copied from VerbFin.CompAP, should be shared
ICompAP ap = {
s = \\agr =>
s = \\agr =>
let
n = complNumAgr agr ;
c = case n of {
@@ -133,19 +133,20 @@ lin
lin
GenNP np = {
s1,sp = \\_,_ => np.s ! NPCase Gen ;
s2 = case np.isPron of { -- "isän auto", "hänen autonsa"
True => table {Front => BIND ++ possSuffixFront np.a ;
s2 = case np.isPron of { -- "isän auto", "hänen autonsa"
True => table {Front => BIND ++ possSuffixFront np.a ;
Back => BIND ++ possSuffix np.a } ;
False => \\_ => []
} ;
isNum = False ;
isPoss = np.isPron ; --- also gives "sen autonsa"
isDef = True ; --- "Jussin kolme autoa ovat" ; thus "...on" is missing
isNeg = False
isNeg = False
} ;
GenIP ip = {s = \\_,_ => ip.s ! NPCase Gen} ;
ByVP vp = lin Adv {s = S.infVP vp.s.sc Pos (Ag Sg P3) vp Inf3Adess} ; ---- Agr ?
AdvIsNP adv np = S.mkClause (\_ -> adv.s) np.a (UseComp (CompNP np)) ;
}

View File

@@ -2,7 +2,7 @@
concrete ExtendPes of Extend =
CatPes ** ExtendFunctor - [
GenNP, ApposNP, ICompAP
GenNP, ApposNP, ICompAP, AdvIsNP
,GerundNP,GerundCN,GerundAdv,EmbedPresPart
]
with (Grammar=GrammarPes)
@@ -30,6 +30,9 @@ lin
-- : VP -> Adv ; -- publishing the document (prepositionless adverb)
GerundAdv vp = lin Adv {s = showVPH Inf defaultAgr vp} ;
-- : VP -> SC ;
-- : VP -> SC ;
EmbedPresPart vp = lin SC {s = showVPH Inf defaultAgr vp} ;
-- : Adv -> NP -> Cl -- here is the car / here are the cars
AdvIsNP adv np = mkClause (indeclNP adv.s ** {a = np.a}) (UseComp (CompNP np)) ;
}

View File

@@ -95,7 +95,7 @@ incomplete concrete ExtendRomanceFunctor of Extend =
FocusAdv = variants {} ; -- Adv -> S -> Utt ; -- today I will sleep
FocusAdV = variants {} ; -- AdV -> S -> Utt ; -- never will I sleep
FocusAP = variants {} ; -- AP -> NP -> Utt ; -- green was the tree
lin
EmbedPresPart = variants {} ; -- VP -> SC ; -- looking at Mary (is fun)
@@ -118,6 +118,7 @@ incomplete concrete ExtendRomanceFunctor of Extend =
ExistCN cn = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ;
ExistMassCN cn = ExistNP (MassNP cn) ;
ExistPluralCN cn = ExistNP (DetCN (DetQuant IndefArt NumPl) cn) ;
AdvIsNP adv np = mkClause adv.s False False np.a (UseComp_estar (CompNP np)) ;
lin
ComplBareVS = ComplVS ; -- VS -> S -> VP ; -- say she runs ; DEFAULT say that she runs
@@ -176,7 +177,7 @@ incomplete concrete ExtendRomanceFunctor of Extend =
PurposeVP vp = {
s = infVP vp (Ag Masc Sg P3)
} ;
WithoutVP = variants {} ; -- VP -> Adv ; -- without publishing the document
ByVP vp = {

View File

@@ -25813,7 +25813,7 @@ lin manivela_N = mkN "manivela" ;
lin maniático_A = mkA "maniático" ;
lin maniático_N = mkN "maniático" ;
lin manjar_blanco_N = mkAN manjar_N "blanco" ; -- to-check segmentation
lin mano_N = mkN "mano" ;
lin mano_N = mkN "mano" feminine ;
lin mano_a_mano_Adv = mkAdv "mano a mano" ;
lin mano_de_obra_N = mkN mano_N "de obra" ;
lin manojo_N = mkN "manojo" ;
@@ -35264,10 +35264,10 @@ lin rorcual_N = mkN "rorcual" ;
lin roridula_N = mkN "roridula" ;
lin rosa_A = mkA "rosa" ;
lin rosa_N = mkN "rosa" ;
lin rosa_amarillento_N = mkAN rosa_N "amarillento" ; -- to-check segmentation
lin rosa_amarillento_N = mkAN rosa_N "amarillento" ;
lin rosa_de_jericó_N = mkN rosa_N "de jericó" ;
lin rosa_de_muerto_N = mkN rosa_N "de muerto" ;
lin rosa_salmón_N = mkAN rosa_N "salmón" ; -- to-check segmentation
lin rosa_salmón_N = mkN rosa_N "salmón" ;
lin rosacruz_A = mkA "rosacruz" ;
lin rosadizo_A = mkA "rosadizo" ;
lin rosado_A = mkA "rosado" ;
@@ -35282,10 +35282,10 @@ lin roseta_N = mkN "roseta" ;
lin rosetas_de_maíz_N = mkN rosetas_N "de maíz" ;
lin rositas_de_maíz_N = mkN rositas_N "de maíz" ;
lin rosmarinus_N = mkN "rosmarinus" ;
lin rosmarinus_officinalis_N = mkAN rosmarinus_N "officinalis" ; -- to-check segmentation
lin rosmarinus_officinalis_N = mkN rosmarinus_N "officinalis" ;
lin rosquilla_N = mkN "rosquilla" ;
lin rostro_N = mkN "rostro" ;
lin rostro_humano_N = mkAN rostro_N "humano" ; -- to-check segmentation
lin rostro_humano_N = mkAN rostro_N "humano" ;
lin rosácea_N = mkN "rosácea" ;
lin rotacional_A = mkA "rotacional" ;
lin rotación_N = mkN "rotación" ;
@@ -35317,10 +35317,10 @@ lin rubio_N = mkN "rubio" ;
lin rublo_N = mkN "rublo" ;
lin ruborizarse_V = reflV ruborizar_V ;
lin rubricar_V = mkV "rubricar" ;
lin rubus_caesius_N = mkAN rubus_N "caesius" ; -- to-check segmentation
lin rubus_canadensis_N = mkAN rubus_N "canadensis" ; -- to-check segmentation
lin rubus_idaeus_strigosus_N = mkAN (mkAN rubus_N "idaeus") "strigosus" ; -- to-check segmentation
lin rubus_strigosus_N = mkAN rubus_N "strigosus" ; -- to-check segmentation
lin rubus_caesius_N = mkN rubus_N "caesius" ;
lin rubus_canadensis_N = mkN rubus_N "canadensis" ;
lin rubus_idaeus_strigosus_N = mkN (mkN rubus_N "idaeus") "strigosus" ;
lin rubus_strigosus_N = mkN rubus_N "strigosus" ;
lin rubéola_N = mkN "rubéola" ;
lin rubí_N = mkN "rubí" ;
lin ruda_N = mkN "ruda" ;

View File

@@ -12,7 +12,7 @@ concrete ExtendSwe of Extend = CatSwe **
AdAdV, PositAdVAdj, GerundCN, GerundNP, GerundAdv, PresPartAP, PastPartAP, PastPartAgentAP,
RNP, RNPList, ReflRNP, ReflPron, ReflPoss, PredetRNP, ConjRNP,
Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP,
CompoundN, CompoundAP
CompoundN, CompoundAP, AdvIsNP
]
with (Grammar = GrammarSwe)
**
@@ -23,7 +23,7 @@ concrete ExtendSwe of Extend = CatSwe **
lin
GenNP np = {
s,sp = \\n,_,_,g => np.s ! NPPoss (gennum (ngen2gen g) n) Nom ;
s,sp = \\n,_,_,g => np.s ! NPPoss (gennum (ngen2gen g) n) Nom ;
det = DDef Indef
} ;
@@ -31,26 +31,26 @@ concrete ExtendSwe of Extend = CatSwe **
ComplBareVS v s = insertObj (\\_ => s.s ! Sub) (predV v) ;
CompBareCN cn = {s = \\a => case a.n of {
CompBareCN cn = {s = \\a => case a.n of {
Sg => cn.s ! Sg ! DIndef ! Nom ;
Pl => cn.s ! Pl ! DIndef ! Nom
}
} ;
StrandRelSlash rp slash = {
s = \\t,a,p,ag,_ =>
s = \\t,a,p,ag,_ =>
rp.s ! ag.g ! ag.n ! RNom ++ slash.s ! t ! a ! p ! Sub ++ slash.n3 ! ag ++ slash.c2.s ;
c = NPAcc
} ;
EmptyRelSlash slash = {
s = \\t,a,p,ag,_ =>
s = \\t,a,p,ag,_ =>
slash.s ! t ! a ! p ! Sub ++ slash.n3 ! ag ++ slash.c2.s ;
c = NPAcc
} ;
StrandQuestSlash ip slash = {
s = \\t,a,p =>
let
s = \\t,a,p =>
let
cls = slash.s ! t ! a ! p ;
who = ip.s ! accusative ;
agr = agrP3 ip.g ip.n ;
@@ -61,9 +61,9 @@ concrete ExtendSwe of Extend = CatSwe **
} ;
lin
PassVPSlash vps =
PassVPSlash vps =
insertObj (\\a => vps.c2.s ++ vps.n3 ! a) (passiveVP vps) ;
PassAgentVPSlash vps np =
PassAgentVPSlash vps np =
insertObjPost (\\a => vps.c2.s ++ vps.n3 ! a) (insertObj (\\_ => (PrepNP by8agent_Prep np).s) (passiveVP vps)) ;
lin UttVPShort vp = {s = infVP vp (agrP3 Utr Sg)} ;
@@ -90,23 +90,23 @@ concrete ExtendSwe of Extend = CatSwe **
BaseVPS = twoTable2 Order Agr ;
ConsVPS = consrTable2 Order Agr comma ;
PredVPS np vpi =
PredVPS np vpi =
let
subj = np.s ! nominative ;
agr = np.a ;
in {
s = \\o =>
let verb = vpi.s ! o ! agr
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
Sub => subj ++ verb
}
} ;
MkVPS t p vp = {
s = \\o,a =>
let
s = \\o,a =>
let
verb = vp.s ! Act ! VPFinite t.t t.a ;
neg = verb.a1 ! p.p ! a ;
compl = vp.n2 ! a ++ vp.a2 ++ vp.ext ;
@@ -128,13 +128,13 @@ concrete ExtendSwe of Extend = CatSwe **
RNP = {s : Agr => Str ; isPron : Bool} ; ---- inherent Agr needed: han färgar sitt hår vitt. But also depends on subject
RNPList = {s1,s2 : Agr => Str} ;
lin
ReflRNP vps rnp =
lin
ReflRNP vps rnp =
insertObjPron
(andB (notB vps.c2.hasPrep) rnp.isPron)
rnp.s
(insertObj (\\a => vps.c2.s ++ vps.n3 ! a) vps) ;
ReflPron = {s = \\a => reflPron a ; isPron = True} ; ---- agr ??
ReflPoss num cn = {
s = \\a => possPron a.n a.p num.n (ngen2gen cn.g) ++ num.s ! cn.g ++ cn.s ! num.n ! DDef Indef ! Nom ;
@@ -159,7 +159,7 @@ concrete ExtendSwe of Extend = CatSwe **
ApposNP np1 np2 = {s = \\nform => np1.s ! nform ++ comma ++ np2.s ! nform; a = np1.a; isPron = False} ;
DetNPMasc, DetNPFem = \det ->
let
let
g = utrum ; ----
m = True ; ---- is this needed for other than Art?
in {
@@ -173,7 +173,7 @@ concrete ExtendSwe of Extend = CatSwe **
co = n1.co ++ BIND ++ n2.co ;
g = n2.g
} ;
CompoundAP noun adj = {
s = \\ap => noun.co ++ BIND ++ adj.s ! AF (APosit ap) Nom ;
isPre = True
@@ -183,7 +183,7 @@ concrete ExtendSwe of Extend = CatSwe **
AdAdV = cc2 ;
PositAdVAdj a = {s = a.s ! AAdv} ;
PresPartAP vp = {
s = \\af => case vp.isSimple of {
True => partVPPlus vp (PartPres Sg Indef Nom) (aformpos2agr af) Pos ;
@@ -206,13 +206,13 @@ concrete ExtendSwe of Extend = CatSwe **
} ;
GerundCN vp = { -- infinitive: att dricka öl, att vara glad
s = \\_,_,_ => "att" ++ infVP vp {g = Utr ; n = Sg ; p = P3} ;
s = \\_,_,_ => "att" ++ infVP vp {g = Utr ; n = Sg ; p = P3} ;
g = Neutr ;
isMod = False
} ;
GerundNP vp = { -- infinitive: att dricka öl, att vara glad
s = \\_ => "att" ++ infVP vp {g = Utr ; n = Sg ; p = P3} ;
s = \\_ => "att" ++ infVP vp {g = Utr ; n = Sg ; p = P3} ;
a = {g = Neutr ; n = Sg ; p = P3} ;
isPron = False
} ;
@@ -220,12 +220,14 @@ concrete ExtendSwe of Extend = CatSwe **
GerundAdv vp = {
s = partVPPlusPost vp (PartPres Sg Indef (Nom|Gen)) {g = Utr ; n = Sg ; p = P3} Pos -- sovande(s) i sängen
} ;
ByVP vp = { -- infinitive: att dricka öl, att vara glad
s = "genom att" ++ infVP vp {g = Utr ; n = Sg ; p = P3}
} ;
InOrderToVP vp = { -- infinitive: att dricka öl, att vara glad
s = "för att" ++ infVP vp {g = Utr ; n = Sg ; p = P3}
} ;
AdvIsNP adv np = PredVP {s = \\_ => adv.s ; a = np.a ; isPron = False} (UseComp (CompNP np)) ;
}