mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
1. updated types in ../abstract/*'.gf to replace NP,Det,Quant,Predep,Prep,DAP by
their primed versions 2. implemented all linearizations to use the primed categories This allows linearization with prep+defart's, but parsing gives metavariables in parses (DetQuant ? NumSg) and (DetQuantOrd ? NumSg ord) for prep+defart. Todo: make Quant.s and NP. depend on PronType = isCat | isPron | isPronDefArt. Without SlashV2VNP', compiles in 84 sec and gives 3,6M VerbGer.gfo, 2,3M SentenceGer.gfo. Uses |Prep'|=12 instead of |Prep|=18, |NP'|=72 instead of |NP|=54
This commit is contained in:
@@ -9,12 +9,12 @@ abstract Adjective' = Cat' ** {
|
|||||||
-- elliptic-relational.
|
-- elliptic-relational.
|
||||||
|
|
||||||
PositA : A -> AP ; -- warm
|
PositA : A -> AP ; -- warm
|
||||||
ComparA : A -> NP -> AP ; -- warmer than I
|
ComparA : A -> NP' -> AP ; -- warmer than I
|
||||||
ComplA2 : A2 -> NP' -> AP ; -- married to her
|
ComplA2 : A2 -> NP' -> AP ; -- married to her
|
||||||
ReflA2 : A2 -> AP ; -- married to itself
|
ReflA2 : A2 -> AP ; -- married to itself
|
||||||
UseA2 : A2 -> AP ; -- married
|
UseA2 : A2 -> AP ; -- married
|
||||||
UseComparA : A -> AP ; -- warmer
|
UseComparA : A -> AP ; -- warmer
|
||||||
CAdvAP : CAdv -> AP -> NP -> AP ; -- as cool as John
|
CAdvAP : CAdv -> AP -> NP' -> AP ; -- as cool as John
|
||||||
|
|
||||||
-- The superlative use is covered in $Ord$.
|
-- The superlative use is covered in $Ord$.
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ abstract Adverb' = Cat' ** {
|
|||||||
-- Comparative adverbs have a noun phrase or a sentence as object of
|
-- Comparative adverbs have a noun phrase or a sentence as object of
|
||||||
-- comparison.
|
-- comparison.
|
||||||
|
|
||||||
ComparAdvAdj : CAdv -> A -> NP -> Adv ; -- more warmly than John
|
ComparAdvAdj : CAdv -> A -> NP' -> Adv ; -- more warmly than John
|
||||||
ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
||||||
|
|
||||||
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
abstract Cat' = Cat ** {cat NP'; Det'; Quant'; Predet'; Prep'; }
|
abstract Cat' = Cat ** {cat NP'; Det'; Quant'; Predet'; Prep'; DAP' ;}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ abstract Lang' =
|
|||||||
Lexicon
|
Lexicon
|
||||||
-- ,Construction --- could be compiled here, but not in concretes, as they call Syntax and Grammar
|
-- ,Construction --- could be compiled here, but not in concretes, as they call Syntax and Grammar
|
||||||
-- ,Documentation --# notpresent
|
-- ,Documentation --# notpresent
|
||||||
,Markup - [stringMark]
|
,Markup' - [stringMark]
|
||||||
** {
|
** {
|
||||||
flags startcat=Phr ;
|
flags startcat=Phr ;
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -12,28 +12,27 @@ abstract Noun' = Cat' ** {
|
|||||||
--
|
--
|
||||||
--
|
--
|
||||||
fun
|
fun
|
||||||
DetCN : Det -> CN -> NP ; -- the man
|
DetCN : Det' -> CN -> NP' ; -- the man
|
||||||
DetCN' : Det' -> CN -> NP' ; -- the man
|
UsePN : PN -> NP' ; -- John
|
||||||
UsePN : PN -> NP ; -- John
|
UsePron : Pron -> NP' ; -- he
|
||||||
UsePron : Pron -> NP ; -- he
|
|
||||||
|
|
||||||
-- Pronouns are defined in the module [``Structural`` Structural.html].
|
-- Pronouns are defined in the module [``Structural`` Structural.html].
|
||||||
|
|
||||||
-- A noun phrase already formed can be modified by a $Predet$erminer.
|
-- A noun phrase already formed can be modified by a $Predet$erminer.
|
||||||
|
|
||||||
PredetNP : Predet -> NP -> NP ; -- only the man
|
PredetNP : Predet' -> NP' -> NP' ; -- only the man
|
||||||
|
|
||||||
-- A noun phrase can also be postmodified by the past participle of a
|
-- A noun phrase can also be postmodified by the past participle of a
|
||||||
-- verb, by an adverb, or by a relative clause
|
-- verb, by an adverb, or by a relative clause
|
||||||
|
|
||||||
PPartNP : NP -> V2 -> NP ; -- the man seen
|
PPartNP : NP' -> V2 -> NP' ; -- the man seen
|
||||||
AdvNP : NP -> Adv -> NP ; -- Paris today
|
AdvNP : NP' -> Adv -> NP' ; -- Paris today
|
||||||
ExtAdvNP: NP -> Adv -> NP ; -- boys, such as ..
|
ExtAdvNP: NP' -> Adv -> NP' ; -- boys, such as ..
|
||||||
RelNP : NP -> RS -> NP ; -- Paris, which is here
|
RelNP : NP' -> RS -> NP' ; -- Paris, which is here
|
||||||
|
|
||||||
-- Determiners can form noun phrases directly.
|
-- Determiners can form noun phrases directly.
|
||||||
|
|
||||||
DetNP : Det -> NP ; -- these five
|
DetNP : Det' -> NP' ; -- these five
|
||||||
|
|
||||||
|
|
||||||
--2 Determiners
|
--2 Determiners
|
||||||
@@ -41,9 +40,8 @@ abstract Noun' = Cat' ** {
|
|||||||
-- The determiner has a fine-grained structure, in which a 'nucleus'
|
-- The determiner has a fine-grained structure, in which a 'nucleus'
|
||||||
-- quantifier and an optional numeral can be discerned.
|
-- quantifier and an optional numeral can be discerned.
|
||||||
|
|
||||||
DetQuant : Quant -> Num -> Det ; -- these five
|
DetQuant : Quant' -> Num -> Det' ; -- these five
|
||||||
DetQuant' : Quant' -> Num -> Det'; -- these five
|
DetQuantOrd : Quant' -> Num -> Ord -> Det' ; -- these five best
|
||||||
DetQuantOrd : Quant -> Num -> Ord -> Det ; -- these five best
|
|
||||||
|
|
||||||
-- Whether the resulting determiner is singular or plural depends on the
|
-- Whether the resulting determiner is singular or plural depends on the
|
||||||
-- cardinal.
|
-- cardinal.
|
||||||
@@ -84,21 +82,20 @@ abstract Noun' = Cat' ** {
|
|||||||
-- neatly distinct words (Spanish "un, unos ; el, los") but also without
|
-- neatly distinct words (Spanish "un, unos ; el, los") but also without
|
||||||
-- any particular word (Finnish; Swedish definites).
|
-- any particular word (Finnish; Swedish definites).
|
||||||
|
|
||||||
IndefArt : Quant ; -- a/an
|
DefArt : Quant'; -- the
|
||||||
DefArt : Quant ; -- the
|
IndefArt : Quant' ; -- a/an
|
||||||
DefArt' : Quant'; -- the
|
|
||||||
|
|
||||||
-- Nouns can be used without an article as mass nouns. The resource does
|
-- Nouns can be used without an article as mass nouns. The resource does
|
||||||
-- not distinguish mass nouns from other common nouns, which can result
|
-- not distinguish mass nouns from other common nouns, which can result
|
||||||
-- in semantically odd expressions.
|
-- in semantically odd expressions.
|
||||||
|
|
||||||
MassNP : CN -> NP ; -- (beer)
|
MassNP : CN -> NP' ; -- (beer)
|
||||||
|
|
||||||
-- Pronouns have possessive forms. Genitives of other kinds
|
-- Pronouns have possessive forms. Genitives of other kinds
|
||||||
-- of noun phrases are not given here, since they are not possible
|
-- of noun phrases are not given here, since they are not possible
|
||||||
-- in e.g. Romance languages. They can be found in $Extra$ modules.
|
-- in e.g. Romance languages. They can be found in $Extra$ modules.
|
||||||
|
|
||||||
PossPron : Pron -> Quant ; -- my (house)
|
PossPron : Pron -> Quant' ; -- my (house)
|
||||||
|
|
||||||
-- Other determiners are defined in [Structural Structural.html].
|
-- Other determiners are defined in [Structural Structural.html].
|
||||||
|
|
||||||
@@ -140,14 +137,14 @@ abstract Noun' = Cat' ** {
|
|||||||
|
|
||||||
-- This is certainly overgenerating.
|
-- This is certainly overgenerating.
|
||||||
|
|
||||||
ApposCN : CN -> NP -> CN ; -- city Paris (, numbers x and y)
|
ApposCN : CN -> NP' -> CN ; -- city Paris (, numbers x and y)
|
||||||
|
|
||||||
--2 Possessive and partitive constructs
|
--2 Possessive and partitive constructs
|
||||||
|
|
||||||
-- (New 13/3/2013 AR; Structural.possess_Prep and part_Prep should be deprecated in favour of these.)
|
-- (New 13/3/2013 AR; Structural.possess_Prep and part_Prep should be deprecated in favour of these.)
|
||||||
|
|
||||||
PossNP : CN -> NP -> CN ; -- house of Paris, house of mine
|
PossNP : CN -> NP' -> CN ; -- house of Paris, house of mine
|
||||||
PartNP : CN -> NP -> CN ; -- glass of wine
|
PartNP : CN -> NP' -> CN ; -- glass of wine
|
||||||
|
|
||||||
-- This is different from the partitive, as shown by many languages.
|
-- This is different from the partitive, as shown by many languages.
|
||||||
|
|
||||||
@@ -156,6 +153,6 @@ abstract Noun' = Cat' ** {
|
|||||||
--3 Conjoinable determiners and ones with adjectives
|
--3 Conjoinable determiners and ones with adjectives
|
||||||
|
|
||||||
AdjDAP : DAP -> AP -> DAP ; -- the large (one)
|
AdjDAP : DAP -> AP -> DAP ; -- the large (one)
|
||||||
DetDAP : Det -> DAP ; -- this (or that)
|
DetDAP : Det' -> DAP' ; -- this (or that)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ abstract Structural' = Cat' ** {
|
|||||||
|
|
||||||
above_Prep : Prep' ;
|
above_Prep : Prep' ;
|
||||||
after_Prep : Prep' ;
|
after_Prep : Prep' ;
|
||||||
all_Predet : Predet ;
|
all_Predet : Predet' ;
|
||||||
all_Predet' : Predet' ;
|
|
||||||
almost_AdA : AdA ;
|
almost_AdA : AdA ;
|
||||||
almost_AdN : AdN ;
|
almost_AdN : AdN ;
|
||||||
although_Subj : Subj ;
|
although_Subj : Subj ;
|
||||||
@@ -35,12 +34,12 @@ abstract Structural' = Cat' ** {
|
|||||||
during_Prep : Prep' ;
|
during_Prep : Prep' ;
|
||||||
either7or_DConj : Conj ; -- either...or
|
either7or_DConj : Conj ; -- either...or
|
||||||
---b either7or_DConj : DConj ;
|
---b either7or_DConj : DConj ;
|
||||||
every_Det : Det ;
|
every_Det : Det' ;
|
||||||
everybody_NP : NP ; -- everybody
|
everybody_NP : NP' ; -- everybody
|
||||||
everything_NP : NP ;
|
everything_NP : NP' ;
|
||||||
everywhere_Adv : Adv ;
|
everywhere_Adv : Adv ;
|
||||||
--- first_Ord : Ord ; DEPRECATED
|
--- first_Ord : Ord ; DEPRECATED
|
||||||
few_Det : Det ;
|
few_Det : Det' ;
|
||||||
for_Prep : Prep' ;
|
for_Prep : Prep' ;
|
||||||
from_Prep : Prep' ;
|
from_Prep : Prep' ;
|
||||||
he_Pron : Pron ;
|
he_Pron : Pron ;
|
||||||
@@ -56,17 +55,16 @@ abstract Structural' = Cat' ** {
|
|||||||
in_Prep : Prep' ;
|
in_Prep : Prep' ;
|
||||||
it_Pron : Pron ;
|
it_Pron : Pron ;
|
||||||
less_CAdv : CAdv ;
|
less_CAdv : CAdv ;
|
||||||
many_Det : Det ;
|
many_Det : Det' ;
|
||||||
more_CAdv : CAdv ;
|
more_CAdv : CAdv ;
|
||||||
most_Predet : Predet ;
|
most_Predet : Predet' ;
|
||||||
most_Predet' : Predet' ;
|
much_Det : Det' ;
|
||||||
much_Det : Det ;
|
|
||||||
must_VV : VV ;
|
must_VV : VV ;
|
||||||
---b no_Phr : Phr ;
|
---b no_Phr : Phr ;
|
||||||
no_Utt : Utt ;
|
no_Utt : Utt ;
|
||||||
on_Prep : Prep' ;
|
on_Prep : Prep' ;
|
||||||
--- one_Quant : QuantSg ; DEPRECATED
|
--- one_Quant : QuantSg ; DEPRECATED
|
||||||
only_Predet : Predet ;
|
only_Predet : Predet' ;
|
||||||
or_Conj : Conj ;
|
or_Conj : Conj ;
|
||||||
otherwise_PConj : PConj ;
|
otherwise_PConj : PConj ;
|
||||||
part_Prep : Prep' ;
|
part_Prep : Prep' ;
|
||||||
@@ -75,19 +73,19 @@ abstract Structural' = Cat' ** {
|
|||||||
quite_Adv : AdA ;
|
quite_Adv : AdA ;
|
||||||
she_Pron : Pron ;
|
she_Pron : Pron ;
|
||||||
so_AdA : AdA ;
|
so_AdA : AdA ;
|
||||||
someSg_Det : Det ;
|
someSg_Det : Det' ;
|
||||||
somePl_Det : Det ;
|
somePl_Det : Det' ;
|
||||||
somebody_NP : NP ;
|
somebody_NP : NP' ;
|
||||||
something_NP : NP ;
|
something_NP : NP' ;
|
||||||
somewhere_Adv : Adv ;
|
somewhere_Adv : Adv ;
|
||||||
that_Quant : Quant ;
|
that_Quant : Quant' ;
|
||||||
that_Subj : Subj ;
|
that_Subj : Subj ;
|
||||||
there_Adv : Adv ;
|
there_Adv : Adv ;
|
||||||
there7to_Adv : Adv ; -- to there
|
there7to_Adv : Adv ; -- to there
|
||||||
there7from_Adv : Adv ; -- from there
|
there7from_Adv : Adv ; -- from there
|
||||||
therefore_PConj : PConj ;
|
therefore_PConj : PConj ;
|
||||||
they_Pron : Pron ;
|
they_Pron : Pron ;
|
||||||
this_Quant : Quant ;
|
this_Quant : Quant' ;
|
||||||
through_Prep : Prep' ;
|
through_Prep : Prep' ;
|
||||||
to_Prep : Prep' ;
|
to_Prep : Prep' ;
|
||||||
too_AdA : AdA ;
|
too_AdA : AdA ;
|
||||||
@@ -112,13 +110,13 @@ abstract Structural' = Cat' ** {
|
|||||||
youPl_Pron : Pron ; -- you (plural)
|
youPl_Pron : Pron ; -- you (plural)
|
||||||
youPol_Pron : Pron ; -- you (polite)
|
youPol_Pron : Pron ; -- you (polite)
|
||||||
|
|
||||||
no_Quant : Quant ;
|
no_Quant : Quant' ;
|
||||||
not_Predet : Predet ;
|
not_Predet : Predet' ;
|
||||||
if_then_Conj : Conj ;
|
if_then_Conj : Conj ;
|
||||||
at_least_AdN : AdN ;
|
at_least_AdN : AdN ;
|
||||||
at_most_AdN : AdN ;
|
at_most_AdN : AdN ;
|
||||||
nobody_NP : NP ;
|
nobody_NP : NP' ;
|
||||||
nothing_NP : NP ;
|
nothing_NP : NP' ;
|
||||||
except_Prep : Prep' ;
|
except_Prep : Prep' ;
|
||||||
|
|
||||||
as_CAdv : CAdv ;
|
as_CAdv : CAdv ;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ abstract Verb' = Cat' ** {
|
|||||||
-- Adjectival phrases, noun phrases, and adverbs can be used.
|
-- Adjectival phrases, noun phrases, and adverbs can be used.
|
||||||
|
|
||||||
CompAP : AP -> Comp ; -- (be) small
|
CompAP : AP -> Comp ; -- (be) small
|
||||||
CompNP : NP -> Comp ; -- (be) the man
|
CompNP : NP' -> Comp ; -- (be) the man
|
||||||
CompAdv : Adv -> Comp ; -- (be) here
|
CompAdv : Adv -> Comp ; -- (be) here
|
||||||
CompCN : CN -> Comp ; -- (be) a man/men
|
CompCN : CN -> Comp ; -- (be) a man/men
|
||||||
|
|
||||||
|
|||||||
@@ -10,14 +10,18 @@ concrete AdjectiveGer of Adjective' = CatGer ** open ResGer, Prelude in {
|
|||||||
c = <[],[]> ;
|
c = <[],[]> ;
|
||||||
ext = []
|
ext = []
|
||||||
} ;
|
} ;
|
||||||
ComparA a np = {
|
ComparA a np =
|
||||||
s = \\af => a.s ! Compar ! af ++ conjThan ++ np.s ! NPC Nom ++ bigNP np ;
|
let nps = (np.s ! Nom).p1 ++ (np.s ! Nom).p2 ++ bigNP' np
|
||||||
|
in {
|
||||||
|
s = \\af => a.s ! Compar ! af ++ conjThan ++ nps ;
|
||||||
isPre = True ;
|
isPre = True ;
|
||||||
c = <[],[]> ;
|
c = <[],[]> ;
|
||||||
ext = []
|
ext = []
|
||||||
} ;
|
} ;
|
||||||
CAdvAP ad ap np = ap ** {
|
CAdvAP ad ap np =
|
||||||
s = \\af => ad.s ++ ap.s ! af ++ ad.p ++ np.s ! NPC Nom ++ bigNP np ;
|
let nps = (np.s ! Nom).p1 ++ (np.s ! Nom).p2 ++ bigNP' np in
|
||||||
|
ap ** {
|
||||||
|
s = \\af => ad.s ++ ap.s ! af ++ ad.p ++ nps ;
|
||||||
isPre = False
|
isPre = False
|
||||||
} ;
|
} ;
|
||||||
UseComparA a = {
|
UseComparA a = {
|
||||||
@@ -37,33 +41,31 @@ concrete AdjectiveGer of Adjective' = CatGer ** open ResGer, Prelude in {
|
|||||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||||
|
|
||||||
ComplA2 a np =
|
ComplA2 a np =
|
||||||
let CExt = case a.c2.isPrep of {
|
let CExt = case a.c2.isPrep of {
|
||||||
isCase => <appPrepNP' a.c2 np, []> ;
|
isCase => <appPrepNP' a.c2 np, []> ;
|
||||||
_ => <[], appPrepNP' a.c2 np> } -- HL: check 7/22
|
_ => <[], appPrepNP' a.c2 np> } -- HL: check 7/22
|
||||||
in {
|
in {
|
||||||
s = a.s ! Posit ;
|
s = a.s ! Posit ;
|
||||||
isPre = True ;
|
isPre = True ;
|
||||||
c = CExt ;
|
c = CExt ;
|
||||||
ext = []
|
ext = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ReflA2 a =
|
ReflA2 a =
|
||||||
let
|
let
|
||||||
-- compl = appPrep a.c2 (\\k => usePrepC k (\c -> reflPron ! agrP3 Sg ! c)) ;
|
compl = appPrep' a.c2 (reflPron ! agrP3 Sg) ;
|
||||||
compl = appPrep' a.c2 (reflPron ! agrP3 Sg) ;
|
CExt = case a.c2.isPrep of
|
||||||
CExt = case a.c2.isPrep of
|
{isCase => <compl, []> ; _ => <[], compl> }
|
||||||
{isCase => <compl, []> ;
|
in {
|
||||||
_ => <[], compl> } -- HL Check isPrepDefArt
|
s = a.s ! Posit ;
|
||||||
in {
|
isPre = True ;
|
||||||
s = a.s ! Posit ;
|
c = CExt ;
|
||||||
isPre = True ;
|
ext = []
|
||||||
c = CExt ;
|
|
||||||
ext = []
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SentAP ap sc = ap ** {
|
SentAP ap sc = ap ** {
|
||||||
isPre = False ;
|
isPre = False ;
|
||||||
ext = ap.ext ++ sc.s
|
ext = ap.ext ++ sc.s
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdAP ada ap = ap ** {s = \\a => ada.s ++ ap.s ! a} ;
|
AdAP ada ap = ap ** {s = \\a => ada.s ++ ap.s ! a} ;
|
||||||
|
|||||||
@@ -3,8 +3,10 @@ concrete AdverbGer of Adverb' = CatGer ** open ResGer, Prelude in {
|
|||||||
lin
|
lin
|
||||||
PositAdvAdj a = {s = a.s ! Posit ! APred} ;
|
PositAdvAdj a = {s = a.s ! Posit ! APred} ;
|
||||||
|
|
||||||
ComparAdvAdj cadv a np = {
|
ComparAdvAdj cadv a np =
|
||||||
s = cadv.s ++ a.s ! Posit ! APred ++ cadv.p ++ np.s ! NPC Nom
|
let nps = (np.s ! Nom).p1 ++ (np.s ! Nom).p2 ++ bigNP' np in
|
||||||
|
{
|
||||||
|
s = cadv.s ++ a.s ! Posit ! APred ++ cadv.p ++ nps
|
||||||
} ;
|
} ;
|
||||||
ComparAdvAdjS cadv a s = {
|
ComparAdvAdjS cadv a s = {
|
||||||
s = cadv.s ++ a.s ! Posit ! APred ++ cadv.p ++ s.s ! Sub
|
s = cadv.s ++ a.s ! Posit ! APred ++ cadv.p ++ s.s ! Sub
|
||||||
|
|||||||
@@ -75,7 +75,8 @@ concrete CatGer of Cat' =
|
|||||||
|
|
||||||
-- HL: To reduce PCase to Case:
|
-- HL: To reduce PCase to Case:
|
||||||
NP' = ResGer.NP' ;
|
NP' = ResGer.NP' ;
|
||||||
Det' = {s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef, hasDefArt : Bool } ;
|
Det' = {s,sp : Gender => Case => {quant,num:Str}; n : Number ; a : Adjf ; isDef, hasDefArt : Bool } ;
|
||||||
|
DAP' = {s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef, hasDefArt : Bool } ;
|
||||||
Quant' = {
|
Quant' = {
|
||||||
s : Bool => Number => Gender => Case => Str ; -- Bool is True if a cardinal number is present
|
s : Bool => Number => Gender => Case => Str ; -- Bool is True if a cardinal number is present
|
||||||
sp : Bool => Number => Gender => Case => Str ;
|
sp : Bool => Number => Gender => Case => Str ;
|
||||||
@@ -85,11 +86,10 @@ concrete CatGer of Cat' =
|
|||||||
} ;
|
} ;
|
||||||
Predet' = {
|
Predet' = {
|
||||||
s : Number => Gender => Case => Str ;
|
s : Number => Gender => Case => Str ;
|
||||||
c : {p : Str ; k : PredetCase} ;
|
c : {p : Str ; k : PredetCase'} ;
|
||||||
a : PredetAgr -- if an agr is forced, e.g. jeder von uns ist ...
|
a : PredetAgr -- if an agr is forced, e.g. jeder von uns ist ...
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
Num = {s : Gender => Case => Str ; n : Number ; isNum : Bool} ;
|
Num = {s : Gender => Case => Str ; n : Number ; isNum : Bool} ;
|
||||||
Card = {s : Gender => Case => Str ; n : Number} ;
|
Card = {s : Gender => Case => Str ; n : Number} ;
|
||||||
Ord = {s : AForm => Str} ;
|
Ord = {s : AForm => Str} ;
|
||||||
@@ -129,7 +129,7 @@ concrete CatGer of Cat' =
|
|||||||
|
|
||||||
linref
|
linref
|
||||||
NP = \np -> np.s!(NPC Nom) ++ np.ext ++ np.rc ; -- HL 6/2019
|
NP = \np -> np.s!(NPC Nom) ++ np.ext ++ np.rc ; -- HL 6/2019
|
||||||
NP' = \np -> (np.s!Nom).p1 ++ (np.s!Nom).p2 ++ np.ext ++ np.rc ; -- HL 6/2019
|
NP' = \np -> (np.s!Nom).p1 ++ (np.s!Nom).p2 ++ np.ext ++ np.rc ; -- HL 7/2022
|
||||||
CN = \cn -> cn.s ! Strong ! Pl ! Nom ++ cn.adv ++ cn.ext ++ cn.rc ! Pl ;
|
CN = \cn -> cn.s ! Strong ! Pl ! Nom ++ cn.adv ++ cn.ext ++ cn.rc ! Pl ;
|
||||||
|
|
||||||
SSlash = \ss -> ss.s ! Main ++ ss.c2.s ;
|
SSlash = \ss -> ss.s ! Main ++ ss.c2.s ;
|
||||||
@@ -149,4 +149,8 @@ concrete CatGer of Cat' =
|
|||||||
V2V = \v -> useInfVP v.isAux (predVGen v.isAux v) ++ v.c2.s ;
|
V2V = \v -> useInfVP v.isAux (predVGen v.isAux v) ++ v.c2.s ;
|
||||||
|
|
||||||
Conj = \c -> c.s1 ++ c.s2 ;
|
Conj = \c -> c.s1 ++ c.s2 ;
|
||||||
|
|
||||||
|
Det' = \det -> (det.s ! Masc ! Nom).quant ++ (det.s ! Masc ! Nom).num ;
|
||||||
|
Prep' = \prep -> case prep.isPrep of {PrepDefArf => prep.sg ! Masc ;
|
||||||
|
_ => prep.s ++ prep.s2 } ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
concrete GrammarGer of Grammar' =
|
concrete GrammarGer of Grammar' =
|
||||||
NounGer,
|
NounGer,
|
||||||
VerbGer, -- to save compile time during development HL 7/22
|
VerbGer,
|
||||||
AdjectiveGer,
|
AdjectiveGer,
|
||||||
AdverbGer,
|
AdverbGer,
|
||||||
NumeralGer,
|
NumeralGer,
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ flags
|
|||||||
lin
|
lin
|
||||||
add_V3 = dirV3 (prefixV "hinzu" (regV "fügen")) zu_Prep ;
|
add_V3 = dirV3 (prefixV "hinzu" (regV "fügen")) zu_Prep ;
|
||||||
airplane_N = mkN "Flugzeug" "Flugzeuge" neuter ;
|
airplane_N = mkN "Flugzeug" "Flugzeuge" neuter ;
|
||||||
|
alas_Interj = {s = "ach" } ;
|
||||||
already_Adv = mkAdv "schon" ;
|
already_Adv = mkAdv "schon" ;
|
||||||
answer_V2S = mkV2S (regV "antworten") datPrep ;
|
answer_V2S = mkV2S (regV "antworten") datPrep ;
|
||||||
apartment_N = mkN "Wohnung" ;
|
apartment_N = mkN "Wohnung" ;
|
||||||
@@ -212,7 +213,8 @@ lin
|
|||||||
dirV2 (irregV "verstehen" "versteht" "verstand" "verstände" "verstanden") ;
|
dirV2 (irregV "verstehen" "versteht" "verstand" "verstände" "verstanden") ;
|
||||||
university_N = reg2N "Universität" "Universitäten" feminine ;
|
university_N = reg2N "Universität" "Universitäten" feminine ;
|
||||||
village_N = reg2N "Dorf" "Dörfer" neuter ;
|
village_N = reg2N "Dorf" "Dörfer" neuter ;
|
||||||
wait_V2 = prepV2 (regV "warten") (mkPrep "auf" accusative) ;
|
-- wait_V2 = prepV2 (regV "warten") (mkPrep "auf" accusative) ;
|
||||||
|
wait_V2 = prepV2 (regV "warten") (mkPrep "auf" "auf den" "auf die" "aufs" accusative) ;
|
||||||
walk_V = seinV Irreg.gehen_V ;
|
walk_V = seinV Irreg.gehen_V ;
|
||||||
warm_A = mk3A "warm" "wärmer" "wärmste" ;
|
warm_A = mk3A "warm" "wärmer" "wärmste" ;
|
||||||
war_N = mkN "Krieg" ;
|
war_N = mkN "Krieg" ;
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
--# -path=.:../abstract:../common
|
--# -path=.:../abstract:../common
|
||||||
|
|
||||||
concrete MarkupGer of Markup = CatGer, MarkHTMLX ** {
|
concrete MarkupGer of Markup' = CatGer, MarkHTMLX ** {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
MarkupCN m cn = cn ** {s = \\a,n,c => appMark m (cn.s ! a ! n ! c)} ; --- other fields e.g ext intact
|
MarkupCN m cn = cn ** {s = \\a,n,c => appMark m (cn.s ! a ! n ! c)} ; --- other fields e.g ext intact
|
||||||
MarkupNP m np = np ** {s = \\c => appMark m (np.s ! c)} ;
|
MarkupNP m np = np ** {s = \\c => appMark m (np.s ! c)} ;
|
||||||
|
MarkupNP' m np = np ** {s = \\c => appMark2 m (np.s ! c)} ;
|
||||||
MarkupAP m ap = ap ** {s = \\a => appMark m (ap.s ! a)} ;
|
MarkupAP m ap = ap ** {s = \\a => appMark m (ap.s ! a)} ;
|
||||||
MarkupAdv m adv = {s = appMark m adv.s} ;
|
MarkupAdv m adv = {s = appMark m adv.s} ;
|
||||||
MarkupS m s = {s = \\o => appMark m (s.s ! o)} ;
|
MarkupS m s = {s = \\o => appMark m (s.s ! o)} ;
|
||||||
@@ -12,5 +13,8 @@ lin
|
|||||||
MarkupPhr m phr = {s = appMark m phr.s} ;
|
MarkupPhr m phr = {s = appMark m phr.s} ;
|
||||||
MarkupText m txt = {s = appMark m txt.s} ;
|
MarkupText m txt = {s = appMark m txt.s} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
appMark2 : {begin,end : Str} -> Str * Str -> Str * Str
|
||||||
|
= \m,s -> <m.begin ++ s.p1, s.p2 ++ m.end> ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,16 @@ oper
|
|||||||
s = \\c => usePrepC c (\k -> name.s ! k) ;
|
s = \\c => usePrepC c (\k -> name.s ! k) ;
|
||||||
a = agrP3 Sg
|
a = agrP3 Sg
|
||||||
} ;
|
} ;
|
||||||
|
nameNounPhrase' : Gender -> {s : Case => Str} -> {s : Case => Str * Str;
|
||||||
|
a : Agr ;
|
||||||
|
w : Weight' ;
|
||||||
|
ext,rc : Str} =
|
||||||
|
\g,name -> {
|
||||||
|
s = \\c => <[],name.s ! c> ;
|
||||||
|
a = agrgP3 g Sg ;
|
||||||
|
ext,rc = [] ;
|
||||||
|
w = WHeavy' -- ok?
|
||||||
|
} ;
|
||||||
|
|
||||||
detLikeAdj : Bool -> Number -> Str ->
|
detLikeAdj : Bool -> Number -> Str ->
|
||||||
{s,sp : Gender => PCase => Str ; n : Number ; a : Adjf ; isDef : Bool} = \isDef,n,dies ->
|
{s,sp : Gender => PCase => Str ; n : Number ; a : Adjf ; isDef : Bool} = \isDef,n,dies ->
|
||||||
|
|||||||
@@ -7,142 +7,116 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
DetCN det cn = {
|
DetCN det cn = {
|
||||||
s = \\c => det.s ! cn.g ! c ++
|
s = \\c => <(det.s ! cn.g ! c).quant,
|
||||||
(let k = (prepC c).c in cn.s ! adjfCase det.a k ! det.n ! k ++ cn.adv) ;
|
(det.s ! cn.g ! c).num ++ cn.s ! (adjfCase det.a c) ! det.n ! c ++ cn.adv> ;
|
||||||
a = agrgP3 cn.g det.n ;
|
a = agrgP3 cn.g det.n ;
|
||||||
-- isLight = det.isDef ; -- ich sehe den Mann nicht vs. ich sehe nicht einen Mann
|
-- isLight = det.isDef ; -- ich sehe den Mann nicht vs. ich sehe nicht einen Mann
|
||||||
-- isPron = False ; -- HL 6/2019 (but:) sehe (die|einige) Männer nicht
|
-- isPron = False ; -- HL 6/2019 (but:) sehe (die|einige) Männer nicht
|
||||||
-- don't see a|no man = sehe keinen Mann
|
-- don't see a|no man = sehe keinen Mann
|
||||||
w = case det.isDef of { True => WLight ; _ => WHeavy } ;
|
-- w = case det.isDef of { True => WLight' ; _ => WHeavy' } ;
|
||||||
rc = cn.rc ! det.n ;
|
|
||||||
ext = cn.ext
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- HL:
|
|
||||||
DetCN' det' cn = {
|
|
||||||
s = \\c => <det'.s ! cn.g ! c, cn.s ! (adjfCase det'.a c) ! det'.n ! c ++ cn.adv> ;
|
|
||||||
a = agrgP3 cn.g det'.n ;
|
|
||||||
-- isLight = det.isDef ; -- ich sehe den Mann nicht vs. ich sehe nicht einen Mann
|
|
||||||
-- isPron = False ; -- HL 6/2019 (but:) sehe (die|einige) Männer nicht
|
|
||||||
-- don't see a|no man = sehe keinen Mann
|
|
||||||
-- w = case det'.isDef of { True => WLight' ; _ => WHeavy' } ;
|
|
||||||
-- Would be clearer with w:Weight and hasDefArt:Bool with |NP|=|Agr|*3*2 = 108
|
-- Would be clearer with w:Weight and hasDefArt:Bool with |NP|=|Agr|*3*2 = 108
|
||||||
-- instead of the more efficient w:Weigth' with |NP|=|Agr|*4 = 18*4 = 54
|
-- instead of the more efficient w:Weigth' with |NP|=|Agr|*4 = 18*4 = 54
|
||||||
w = case det'.isDef of { True => case det'.hasDefArt of { True => WDefArt ;
|
w = case det.isDef of { True => case det.hasDefArt of { True => WDefArt ;
|
||||||
_ => WLight' } ;
|
_ => WLight' } ;
|
||||||
_ => WHeavy'
|
_ => WHeavy' } ;
|
||||||
} ;
|
rc = cn.rc ! det.n ;
|
||||||
rc = cn.rc ! det'.n ;
|
|
||||||
ext = cn.ext
|
ext = cn.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetNP det = {
|
DetNP det = { -- more genders in ExtraGer -- HL: der+er,den+en ; der drei,den drei+en
|
||||||
s = \\c => det.sp ! Neutr ! c ; -- more genders in ExtraGer -- HL: der+er,den+en ; der drei,den drei+en
|
s = \\c => <(det.sp ! Neutr ! c).quant, (det.sp ! Neutr ! c).num> ;
|
||||||
a = agrP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
-- isLight = det.isDef ;
|
-- isLight = det.isDef ;
|
||||||
-- isPron = False ; -- HL 6/2019: don't apply pronoun switch: ich gebe ihr das vs. ich gebe es ihr
|
-- isPron = False ; -- HL 6/2019: don't apply pronoun switch: ich gebe ihr das vs. ich gebe es ihr
|
||||||
w = case det.isDef of { True => WLight ; _ => WHeavy } ;
|
w = case det.isDef of { True => WLight' ; _ => WHeavy' } ;
|
||||||
rc, ext = []
|
rc, ext = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UsePN pn = {
|
UsePN pn = {
|
||||||
s = \\c => usePrepC c (\k -> pn.s ! k) ;
|
s = \\c => <[], pn.s ! c> ;
|
||||||
a = agrgP3 pn.g Sg ;
|
a = agrgP3 pn.g Sg ;
|
||||||
-- isLight = True ; -- means: this is not a heavy NP, but comes before negation
|
w = WLight' ; -- means: this is not a heavy NP, but comes before negation
|
||||||
-- isPron = False ; -- HL 6/2019: to regulate Pron/NonPronNP order
|
rc, ext = [] -- Pron => Light HL 6/2019: to regulate Pron/NonPronNP order
|
||||||
w = WLight ;
|
|
||||||
rc, ext = []
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UsePron pron = {
|
UsePron pron = {
|
||||||
s = \\c => usePrepC c (\k -> pron.s ! NPCase k) ;
|
s = \\c => <[], pron.s ! NPCase c> ;
|
||||||
a = pron.a ;
|
a = pron.a ;
|
||||||
-- isLight = True ;
|
w = WPron' ;
|
||||||
-- isPron = True ;
|
|
||||||
w = WPron ;
|
|
||||||
rc, ext = []
|
rc, ext = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PredetNP pred np =
|
PredetNP pred np =
|
||||||
let ag = case pred.a of {PAg n => agrP3 n ; _ => np.a} in np ** {
|
let ag = case pred.a of {PAg n => agrP3 n ; _ => np.a} in np ** {
|
||||||
s = \\c0 =>
|
s = \\c0 =>
|
||||||
let c = case pred.c.k of {NoCase => c0 ; PredCase k => k} in
|
let c = case pred.c.k of {NoCase' => c0 ; PredCase' k => k} in
|
||||||
pred.s ! numberAgr ag ! genderAgr np.a ! c0 ++ pred.c.p ++ np.s ! c ;
|
<pred.s ! numberAgr ag ! genderAgr np.a ! c0 ++ pred.c.p ++ (np.s ! c).p1, (np.s ! c).p2> ;
|
||||||
a = ag ;
|
a = ag ;
|
||||||
-- isLight = False ;
|
w = WHeavy'
|
||||||
-- isPron = False
|
|
||||||
w = WHeavy
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PPartNP np v2 = np ** {
|
PPartNP np v2 = np ** {
|
||||||
s = \\c => np.s ! c ++ embedInCommas (v2.s ! VPastPart APred) ; --- invar part
|
s = incr2 np.s (embedInCommas (v2.s ! VPastPart APred)) ; --- invar part
|
||||||
-- isPron = False
|
w = WHeavy'
|
||||||
w = WHeavy
|
|
||||||
} ;
|
} ;
|
||||||
{- "eine erfolgreiche Frau, geliebt von vielen," but only with v2 not possible in German?
|
{- "eine erfolgreiche Frau, geliebt von vielen," but only with v2 not possible in German?
|
||||||
HL: PPartNP np vps|vp: "der Autor, heute vergessen" , "der Mond, gerade aufgegangen,"
|
HL: PPartNP np vps|vp: "der Autor, heute vergessen" , "der Mond, gerade aufgegangen,"
|
||||||
-}
|
-}
|
||||||
|
|
||||||
AdvNP np adv = np ** {
|
AdvNP np adv = np ** {
|
||||||
s = \\c => np.s ! c ++ adv.s ;
|
s = incr2 np.s adv.s ;
|
||||||
-- isLight = False ;
|
w = WHeavy'
|
||||||
-- isPron = False
|
|
||||||
w = WHeavy
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ExtAdvNP np adv = np ** {
|
ExtAdvNP np adv = np ** {
|
||||||
s = \\c => np.s ! c ++ embedInCommas adv.s ;
|
s = incr2 np.s (embedInCommas adv.s) ;
|
||||||
-- isLight = False ;
|
w = WHeavy'
|
||||||
-- isPron = False
|
|
||||||
w = WHeavy
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetQuantOrd quant num ord =
|
-- HL 21.7.2022: the dropping of DefArt in Prep+DefArt via hasDefArt works by splitting the
|
||||||
let
|
-- np.s into det':Str and cn:Str and (det.s ! g ! n) into {quant:Str; num:Str}, so that in
|
||||||
n = num.n ;
|
-- PrepNP in_Prep np we can replace "in" + "das" by "im" to get
|
||||||
a = quant.a
|
-- PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (warme Meer)) => im warmen Meer
|
||||||
in {
|
-- But parsing "im warmen Meer" results in a
|
||||||
s = \\g,c => quant.s ! num.isNum ! n ! g ! c ++ (let k = (prepC c).c in
|
-- PrepNP in_Prep (DetCN (DetQuant ? NumSg) (AdjCN ... ))
|
||||||
num.s!g!k ++ ord.s ! agrAdj g (adjfCase a k) n k) ;
|
-- because (DetQuant.s!g!c).quant is ignored, but the .num is part of (np.s!c).p2.
|
||||||
sp = \\g,c => quant.sp ! num.isNum ! n ! g ! c ++ (let k = (prepC c).c in
|
-- To avoid the metavariable ?, we have to make Det.s and NP.s depend on t:PrepType = isPrep.
|
||||||
num.s!g!k ++ ord.s ! agrAdj g (adjfCase quant.aPl k) n k) ;
|
|
||||||
n = n ;
|
|
||||||
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
|
||||||
isDef = case <quant.a, quant.aPl> of {<Strong,Strong> => False ; _ => True} ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
DetQuant quant num =
|
DetQuantOrd quant num ord =
|
||||||
let
|
let -- does not work, since here DefArt is combined with ord
|
||||||
n = num.n ;
|
n = num.n ; --
|
||||||
a = quant.a
|
a = quant.a
|
||||||
in {
|
in {
|
||||||
s = \\g,c => quant.s ! num.isNum ! n ! g ! c ++ (let k = (prepC c).c in
|
s = \\g,c => {quant = quant.s ! num.isNum ! n ! g ! c;
|
||||||
num.s!g!k) ;
|
num = num.s!g!c ++ ord.s ! agrAdj g (adjfCase a c) n c} ;
|
||||||
sp = \\g,c => quant.sp ! num.isNum ! n ! g ! c ++ (let k = (prepC c).c in
|
sp = \\g,c => {quant = quant.sp ! num.isNum ! n ! g ! c;
|
||||||
num.s!g!k) ; -- HL: der+er,den+en ; der drei,den drei+en
|
num = num.s!g!c ++ ord.s ! agrAdj g (adjfCase quant.aPl c) n c} ;
|
||||||
n = n ;
|
|
||||||
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
|
||||||
isDef = case <quant.a, quant.aPl> of {<Strong,Strong> => False ; _ => True} ;
|
|
||||||
} ;
|
|
||||||
DetQuant' quant num =
|
|
||||||
let
|
|
||||||
n = num.n ;
|
|
||||||
a = quant.a
|
|
||||||
in {
|
|
||||||
s = \\g,c => quant.s ! num.isNum ! n ! g ! c ++ num.s!g!c ;
|
|
||||||
sp = \\g,c => quant.sp ! num.isNum ! n ! g ! c ++ num.s!g!c ; -- HL: der+er,den+en ; der drei,den drei+en
|
|
||||||
n = n ;
|
n = n ;
|
||||||
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
||||||
isDef = case <quant.a, quant.aPl> of {<Strong,Strong> => False ; _ => True} ;
|
isDef = case <quant.a, quant.aPl> of {<Strong,Strong> => False ; _ => True} ;
|
||||||
hasDefArt = quant.hasDefArt ;
|
hasDefArt = quant.hasDefArt ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
DetQuant quant num =
|
||||||
|
let
|
||||||
|
n = num.n ;
|
||||||
|
a = quant.a
|
||||||
|
in {
|
||||||
|
s = \\g,c => {quant = quant.s ! num.isNum ! n ! g ! c ; num = num.s!g!c} ;
|
||||||
|
sp = \\g,c => {quant = quant.sp ! num.isNum ! n ! g ! c ; num = num.s!g!c} ;
|
||||||
|
-- HL: der+er,den+en ; der drei,den drei+en
|
||||||
|
n = n ;
|
||||||
|
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
||||||
|
isDef = case <quant.a, quant.aPl> of {<Strong,Strong> => False ; _ => True} ;
|
||||||
|
hasDefArt = quant.hasDefArt ;
|
||||||
|
} ;
|
||||||
|
|
||||||
PossPron p = {
|
PossPron p = {
|
||||||
s = \\_,n,g,c => usePrepC c (\k -> p.s ! NPPoss (gennum g n) k) ;
|
s = \\_,n,g,c => p.s ! NPPoss (gennum g n) c ;
|
||||||
sp = \\_,n,g,c => usePrepC c (\k -> p.s ! NPPoss (gennum g n) k) ;
|
sp = \\_,n,g,c => p.s ! NPPoss (gennum g n) c ;
|
||||||
a = Strong ;
|
a = Strong ;
|
||||||
aPl = Weak ;
|
aPl = Weak ;
|
||||||
|
hasDefArt = False ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
NumCard n = n ** {isNum = True} ;
|
NumCard n = n ** {isNum = True} ;
|
||||||
@@ -163,39 +137,6 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
OrdNumeralSuperl n a = {s = \\af => n.s ! NOrd APred ++ Predef.BIND ++ a.s ! Superl ! af} ; -- drittbeste
|
OrdNumeralSuperl n a = {s = \\af => n.s ! NOrd APred ++ Predef.BIND ++ a.s ! Superl ! af} ; -- drittbeste
|
||||||
|
|
||||||
DefArt = {
|
DefArt = {
|
||||||
s = \\_,n,g,c => artDefContr (gennum g n) c ;
|
|
||||||
-- sp = \\_,n,g,c => artDefContr (gennum g n) c ; ---- deren, denen ...
|
|
||||||
sp = \\_,n,g,c => case <n,c> of {
|
|
||||||
<Sg,NPP p> => let sp = prepC c ; gn = gennum g n
|
|
||||||
in sp.s ++ artDef ! gn ! sp.c ;
|
|
||||||
<Pl,NPP CInAcc> => let sp = prepC c in sp.s ++ "die" ;
|
|
||||||
<Pl,NPP p> => let sp = prepC c ; gn = gennum g n
|
|
||||||
in sp.s ++ (artDef ! gn ! sp.c + "en") ;
|
|
||||||
<Pl,NPC Dat> => "denen" ; -- HL 6/2019
|
|
||||||
<Pl,NPC Gen> => "derer" ; -- HL 6/2019
|
|
||||||
_ => artDefContr (gennum g n) c } ; -- von den+en
|
|
||||||
a, aPl = Weak
|
|
||||||
} ;
|
|
||||||
|
|
||||||
IndefArt = {
|
|
||||||
s = table {
|
|
||||||
True => \\_,_,c => usePrepC c (\k -> []) ;
|
|
||||||
False => table {
|
|
||||||
Sg => \\g,c => usePrepC c (\k -> "ein" + pronEnding ! GSg g ! k) ;
|
|
||||||
Pl => \\_,c => usePrepC c (\k -> [])
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
sp = table {
|
|
||||||
True => \\_,_,c => usePrepC c (\k -> []) ;
|
|
||||||
False => table {
|
|
||||||
Sg => \\g,c => usePrepC c (\k -> (detUnlikeAdj False Sg "ein").s ! g ! NPC k) ;
|
|
||||||
Pl => \\_,c => usePrepC c (\k -> caselist "einige" "einige" "einigen" "einiger" ! k)
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
a, aPl = Strong
|
|
||||||
} ;
|
|
||||||
-- HL
|
|
||||||
DefArt' = {
|
|
||||||
s = \\_,n,g,c => artDef ! (gennum g n) ! c ;
|
s = \\_,n,g,c => artDef ! (gennum g n) ! c ;
|
||||||
sp = \\_,n,g,c => case <n,c> of {
|
sp = \\_,n,g,c => case <n,c> of {
|
||||||
<Pl,Dat> => "denen" ; -- HL 6/2019
|
<Pl,Dat> => "denen" ; -- HL 6/2019
|
||||||
@@ -204,15 +145,34 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
a, aPl = Weak ;
|
a, aPl = Weak ;
|
||||||
hasDefArt = True
|
hasDefArt = True
|
||||||
} ;
|
} ;
|
||||||
|
IndefArt = {
|
||||||
|
s = table {
|
||||||
|
True => \\_,_,c => [] ;
|
||||||
|
False => table {
|
||||||
|
Sg => \\g,c => "ein" + pronEnding ! GSg g ! c ;
|
||||||
|
Pl => \\_,c => []
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
sp = table {
|
||||||
|
True => \\_,_,c => [] ;
|
||||||
|
False => table {
|
||||||
|
Sg => \\g,c => (detUnlikeAdj' False Sg "ein").s ! g ! c ;
|
||||||
|
Pl => \\_,c => caselist "einige" "einige" "einigen" "einiger" ! c
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
a, aPl = Strong ;
|
||||||
|
hasDefArt = False
|
||||||
|
} ;
|
||||||
|
|
||||||
MassNP cn = {
|
MassNP cn = {
|
||||||
s = \\c => usePrepC c (\k -> cn.s ! Strong ! Sg ! k) ++ cn.adv ;
|
s = \\c => <[], cn.s ! Strong ! Sg ! c ++ cn.adv> ;
|
||||||
a = agrgP3 cn.g Sg ;
|
a = agrgP3 cn.g Sg ;
|
||||||
-- isLight = True ; -- ich trinke Bier nicht vs. ich trinke kein Bier
|
-- isLight = True ; -- ich trinke Bier nicht vs. ich trinke kein Bier
|
||||||
-- isPron = False ;
|
-- isPron = False ;
|
||||||
w = WLight ;
|
w = WLight' ;
|
||||||
rc = cn.rc ! Sg ;
|
rc = cn.rc ! Sg ;
|
||||||
ext = cn.ext
|
ext = cn.ext ;
|
||||||
|
hasDefArt = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseN, UseN2 = \n -> {
|
UseN, UseN2 = \n -> {
|
||||||
@@ -262,9 +222,8 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
---- another layer of embedInCommas needed if there is a non-empty rc
|
---- another layer of embedInCommas needed if there is a non-empty rc
|
||||||
|
|
||||||
RelNP np rs = np ** {
|
RelNP np rs = np ** {
|
||||||
rc = (np.rc ++ embedInCommas (rs.s ! RGenNum (gennum (genderAgr np.a) (numberAgr np.a)))) ;
|
rc = np.rc ++ embedInCommas (rs.s ! RGenNum (gennum (genderAgr np.a) (numberAgr np.a))) ;
|
||||||
-- isPron = False
|
w = case isPron' np of { True => WLight' ; _ => np.w }
|
||||||
w = case isPron np of { True => WLight ; _ => np.w }
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SentCN cn s = cn ** {ext = cn.ext ++ embedInCommas s.s} ;
|
SentCN cn s = cn ** {ext = cn.ext ++ embedInCommas s.s} ;
|
||||||
@@ -272,11 +231,33 @@ concrete NounGer of Noun' = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
AdvCN cn a = cn ** {adv = cn.adv ++ a.s} ;
|
AdvCN cn a = cn ** {adv = cn.adv ++ a.s} ;
|
||||||
|
|
||||||
ApposCN cn np = let g = cn.g in cn ** {
|
ApposCN cn np = let g = cn.g in cn ** {
|
||||||
s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! NPC c ++ bigNP np } ;
|
s = \\a,n,c => cn.s ! a ! n ! c ++ (np.s ! c).p1 ++ (np.s ! c).p2 ++ bigNP' np } ;
|
||||||
|
|
||||||
|
-- PossNP cn np = cn ** {
|
||||||
|
-- s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! NPP CVonDat ++ bigNP np } ;
|
||||||
PossNP cn np = cn ** {
|
PossNP cn np = cn ** {
|
||||||
s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! NPP CVonDat ++ bigNP np } ;
|
s = \\a,n,c => cn.s ! a ! n ! c ++ appPrep2' vonDat' np.s ++ bigNP' np } ; -- HL, ad hoc
|
||||||
|
|
||||||
DetDAP det = det ;
|
-- PartNP cn np = todo -- glass of wine
|
||||||
|
|
||||||
|
CountNP det np = -- drei der Kinder | drei von den Kindern -- HL 7/22, ad-hoc
|
||||||
|
-- det or numeral? np or rather (DefArt +) cn? drei (einiger Kinder) ?
|
||||||
|
let g = genderAgr np.a
|
||||||
|
in {
|
||||||
|
s = \\c => det.s ! g ! c ++ np.s ! NPP CVonDat ++ bigNP np ;
|
||||||
|
a = agrgP3 g det.n ;
|
||||||
|
w = case det.isDef of { True => WLight ; _ => WHeavy } ;
|
||||||
|
rc = np.rc ;
|
||||||
|
ext = np.ext
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- AdjDAP dap adj = ?? TODO -- the large (one)
|
||||||
|
|
||||||
|
DetDAP det = {s = \\g,c => (det.s ! g ! c).quant ++ (det.s ! g ! c).num ; -- HL 7/22
|
||||||
|
sp = \\g,c => (det.sp ! g ! c).quant ++ (det.sp ! g ! c).num ;
|
||||||
|
n = det.n ; a = det.a ; isDef = det.isDef ; hasDefArt = det.hasDefArt} ;
|
||||||
|
oper
|
||||||
|
incr2 : (Case => Str * Str) -> Str -> (Case => Str * Str) = \tab,str ->
|
||||||
|
\\c => <(tab ! c).p1, (tab ! c).p2 ++ str> ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,10 +137,10 @@ mkN : overload {
|
|||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- To extract the number of a noun phrase
|
-- To extract the number of a noun phrase --never used in RGL
|
||||||
|
|
||||||
ifPluralNP : NP -> Bool
|
-- ifPluralNP : NP -> Bool
|
||||||
= \np -> case (numberAgr np.a) of {Sg => False ; Pl => True} ;
|
-- = \np -> case (numberAgr np.a) of {Sg => False ; Pl => True} ;
|
||||||
|
|
||||||
|
|
||||||
--2 Adjectives
|
--2 Adjectives
|
||||||
@@ -185,6 +185,9 @@ mkN : overload {
|
|||||||
mkPrep : Str -> Case -> Prep' ; -- e.g. "durch" + accusative
|
mkPrep : Str -> Case -> Prep' ; -- e.g. "durch" + accusative
|
||||||
mkPrep : Case -> Str -> Prep' ; -- postposition
|
mkPrep : Case -> Str -> Prep' ; -- postposition
|
||||||
mkPrep : Str -> Case -> Str -> Prep' ; -- both sides
|
mkPrep : Str -> Case -> Str -> Prep' ; -- both sides
|
||||||
|
-- for preposition glued with DefArt in singular:
|
||||||
|
-- e.g. "auf" "auf den" "auf die" "aufs" + accusative
|
||||||
|
mkPrep : Str -> Str -> Str -> Str-> Case -> Prep' ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Often just a case with the empty string is enough.
|
-- Often just a case with the empty string is enough.
|
||||||
@@ -195,11 +198,11 @@ mkN : overload {
|
|||||||
|
|
||||||
-- A couple of common prepositions (the first two always with the dative).
|
-- A couple of common prepositions (the first two always with the dative).
|
||||||
|
|
||||||
von_Prep : Prep' ; -- von + dative
|
von_Prep : Prep' ; -- von + dative, with contraction vom
|
||||||
zu_Prep : Prep' ; -- zu + dative, with contractions zum, zur
|
zu_Prep : Prep' ; -- zu + dative, with contractions zum, zur
|
||||||
anDat_Prep : Prep' ; -- an + dative, with contraction am
|
anDat_Prep : Prep' ; -- an + dative, with contraction am
|
||||||
inDat_Prep : Prep' ; -- in + dative, with contraction ins
|
inDat_Prep : Prep' ; -- in + dative, with contraction im
|
||||||
inAcc_Prep : Prep' ; -- in + accusative, with contraction im
|
inAcc_Prep : Prep' ; -- in + accusative, with contraction ins
|
||||||
|
|
||||||
--2 Verbs
|
--2 Verbs
|
||||||
|
|
||||||
@@ -503,7 +506,10 @@ mkV2 : overload {
|
|||||||
mkPrep : Case -> Str -> Prep' = \c,s -> {s = [] ; s2 = s ; sg = \\_ => [] ;
|
mkPrep : Case -> Str -> Prep' = \c,s -> {s = [] ; s2 = s ; sg = \\_ => [] ;
|
||||||
c = c ; isPrep = isPrep ; lock_Prep' = <>} ;
|
c = c ; isPrep = isPrep ; lock_Prep' = <>} ;
|
||||||
mkPrep : Str -> Case -> Str -> Prep' = \s,c,t -> {s = s ; s2 = t ; sg = \\_ => [] ;
|
mkPrep : Str -> Case -> Str -> Prep' = \s,c,t -> {s = s ; s2 = t ; sg = \\_ => [] ;
|
||||||
c = c ; isPrep = isPrep ; lock_Prep' = <>}
|
c = c ; isPrep = isPrep ; lock_Prep' = <>} ;
|
||||||
|
mkPrep : Str -> Str -> Str -> Str-> Case -> Prep' = \s,masc,fem,neutr, c ->
|
||||||
|
{s = s ; s2 = [] ; sg = table{Masc => masc ; Fem => fem ; Neutr => neutr} ;
|
||||||
|
c = c ; isPrep = isPrepDefArt ; lock_Prep' = <>} ;
|
||||||
} ;
|
} ;
|
||||||
accPrep = {s,s2 = [] ; sg = \\_ => [] ; c = accusative ; isPrep = isCase ; lock_Prep' = <>} ;
|
accPrep = {s,s2 = [] ; sg = \\_ => [] ; c = accusative ; isPrep = isCase ; lock_Prep' = <>} ;
|
||||||
datPrep = {s,s2 = [] ; sg = \\_ => [] ; c = dative ; isPrep = isCase ; lock_Prep' = <>} ;
|
datPrep = {s,s2 = [] ; sg = \\_ => [] ; c = dative ; isPrep = isCase ; lock_Prep' = <>} ;
|
||||||
|
|||||||
@@ -82,6 +82,12 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
oper
|
oper
|
||||||
noCase : {p : Str ; k : PredetCase} = {p = [] ; k = NoCase} ;
|
noCase : {p : Str ; k : PredetCase} = {p = [] ; k = NoCase} ;
|
||||||
|
|
||||||
|
param
|
||||||
|
PredetCase' = NoCase' | PredCase' Case ;
|
||||||
|
-- PredetAgr = PAg Number | PAgNone ;
|
||||||
|
oper
|
||||||
|
noCase' : {p : Str ; k : PredetCase'} = {p = [] ; k = NoCase'} ;
|
||||||
|
|
||||||
-- Pronominal nps are ordered differently, and light nps come before negation in clauses.
|
-- Pronominal nps are ordered differently, and light nps come before negation in clauses.
|
||||||
-- (To save space, reduce isPron * isLight = 4 values to the following three.) HL 9/19
|
-- (To save space, reduce isPron * isLight = 4 values to the following three.) HL 9/19
|
||||||
param
|
param
|
||||||
@@ -95,11 +101,11 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
-- To reduce c:PCase to c:Case in Preposition' and NP.s:PCase => Str to NP'.s:Case => Str*Str:
|
-- To reduce c:PCase to c:Case in Preposition' and NP.s:PCase => Str to NP'.s:Case => Str*Str:
|
||||||
param
|
param
|
||||||
Weight' = WPron' | WLight' | WHeavy' | WDefArt ;
|
Weight' = WPron' | WLight' | WHeavy' | WDefArt ;
|
||||||
-- oper
|
oper
|
||||||
-- isPron : {w : Weight} -> Bool = \np ->
|
isPron' : {w : Weight'} -> Bool = \np ->
|
||||||
-- case np.w of {WPron => True ; _ => False} ;
|
case np.w of {WPron' => True ; _ => False} ;
|
||||||
-- isLight : {w : Weight} -> Bool = \np ->
|
isLight' : {w : Weight'} -> Bool = \np ->
|
||||||
-- case np.w of {WHeavy => False ; _ => True} ;
|
case np.w of {WHeavy' => False ; _ => True} ;
|
||||||
|
|
||||||
--2 For $Adjective$
|
--2 For $Adjective$
|
||||||
|
|
||||||
@@ -512,6 +518,8 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
Dat' : Preposition' = {s=""; s2=""; sg = \\c => []; c=Dat; isPrep=isCase} ;
|
Dat' : Preposition' = {s=""; s2=""; sg = \\c => []; c=Dat; isPrep=isCase} ;
|
||||||
mit' : Preposition' = {s="zusammen mit"; s2=""; sg = \\_ => []; c=Dat; isPrep=isPrep} ;
|
mit' : Preposition' = {s="zusammen mit"; s2=""; sg = \\_ => []; c=Dat; isPrep=isPrep} ;
|
||||||
|
|
||||||
|
vonDat' : Preposition' = {s="von"; s2=""; sg = table{Fem => "von der"; _ => "vom"}; c=Dat; isPrep=isPrep} ;
|
||||||
|
|
||||||
zuDat' : Preposition' = {s="zu"; s2="herein"; sg = \\_ => ""; c=Dat; isPrep=isPrep} ;
|
zuDat' : Preposition' = {s="zu"; s2="herein"; sg = \\_ => ""; c=Dat; isPrep=isPrep} ;
|
||||||
zum' : Preposition' = {s="zu"; s2="herein"; sg = table{Masc=>"zum"; Fem=>"zur"; Neutr=>"zum"};
|
zum' : Preposition' = {s="zu"; s2="herein"; sg = table{Masc=>"zum"; Fem=>"zur"; Neutr=>"zum"};
|
||||||
c=Dat; isPrep=isPrepDefArt} ;
|
c=Dat; isPrep=isPrepDefArt} ;
|
||||||
@@ -848,9 +856,8 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
|
|
||||||
insertObjRefl : VPSlash -> VPSlash = \vp -> -- HL 6/2019, to order reflPron < neg < prep+reflPron
|
insertObjRefl : VPSlash -> VPSlash = \vp -> -- HL 6/2019, to order reflPron < neg < prep+reflPron
|
||||||
let prep = vp.c2 ;
|
let prep = vp.c2 ; -- HL 7/22 reduced to c:Case
|
||||||
c = prep.c ; -- HL 7/22 reduced to c:Case
|
obj : Agr => Str = \\a => prep.s ++ reflPron ! a ! prep.c ++ prep.s2 ;
|
||||||
obj : Agr => Str = \\a => prep.s ++ reflPron ! a ! c ++ prep.s2 ;
|
|
||||||
in vp ** {
|
in vp ** {
|
||||||
nn = \\a =>
|
nn = \\a =>
|
||||||
let vpnn = vp.nn ! a in
|
let vpnn = vp.nn ! a in
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ concrete SentenceGer of Sentence' = CatGer ** open ResGer, Prelude in {
|
|||||||
-- verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ! pol ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
-- verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ! pol ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
||||||
verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ++ negation ! pol ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ++ negation ! pol ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
||||||
} ;
|
} ;
|
||||||
|
-- to save (67299 - 27432 = 39863 msec) compile time: HL 7/22, comment out:
|
||||||
SlashVP np vp =
|
SlashVP np vp =
|
||||||
let subj = mkSubj' np vp.c1 ; -- HL 3/2022: need a mkClSlash to prevent
|
let subj = mkSubj' np vp.c1 ; -- HL 3/2022: need a mkClSlash to prevent
|
||||||
in mkClause subj.p1 subj.p2 vp ** { c2 = vp.c2 } ; -- reflexives in vp instantiated to np.a
|
in mkClause subj.p1 subj.p2 vp ** { c2 = vp.c2 } ; -- reflexives in vp instantiated to np.a
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ concrete StructuralGer of Structural' = CatGer **
|
|||||||
|
|
||||||
above_Prep = mkPrep "über" P.dative ;
|
above_Prep = mkPrep "über" P.dative ;
|
||||||
after_Prep = mkPrep "nach" P.dative ;
|
after_Prep = mkPrep "nach" P.dative ;
|
||||||
all_Predet = {s = appAdj (regA "all") ; c = noCase ; a = PAgNone} ;
|
all_Predet = {s = appAdj' (regA "all") ; c = noCase' ; a = PAgNone} ;
|
||||||
all_Predet' = {s = appAdj' (regA "all") ; c = noCase ; a = PAgNone} ;
|
|
||||||
almost_AdA, almost_AdN = ss "fast" ;
|
almost_AdA, almost_AdN = ss "fast" ;
|
||||||
although_Subj = ss "obwohl" ;
|
although_Subj = ss "obwohl" ;
|
||||||
always_AdV = ss "immer" ;
|
always_AdV = ss "immer" ;
|
||||||
@@ -32,11 +31,14 @@ concrete StructuralGer of Structural' = CatGer **
|
|||||||
VHaben) ;
|
VHaben) ;
|
||||||
during_Prep = mkPrep "während" P.genitive ; --- no variants in the rgl | P.mkPrep P.accusative "über" ;
|
during_Prep = mkPrep "während" P.genitive ; --- no variants in the rgl | P.mkPrep P.accusative "über" ;
|
||||||
either7or_DConj = sd2 "entweder" "oder" ** {n = Sg} ;
|
either7or_DConj = sd2 "entweder" "oder" ** {n = Sg} ;
|
||||||
everybody_NP = nameNounPhrase {s = caselist "jeder" "jeden" "jedem" "jedes"} ;
|
everybody_NP = nameNounPhrase' Masc {s = caselist "jeder" "jeden" "jedem" "jedes"} ;
|
||||||
every_Det = detUnlikeAdj False Sg "jed" ;
|
-- every_Det = detUnlikeAdj False Sg "jed" ;
|
||||||
everything_NP = nameNounPhrase {s = caselist "alles" "alles" "allem" "alles"} ;
|
every_Det = let tab = (detUnlikeAdj' False Sg "jed").s
|
||||||
|
in {s,sp = asQuant tab ; n = Sg ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
||||||
|
everything_NP = nameNounPhrase' Neutr {s = caselist "alles" "alles" "allem" "alles"} ;
|
||||||
everywhere_Adv = ss "überall" ;
|
everywhere_Adv = ss "überall" ;
|
||||||
few_Det = detLikeAdj False Pl "wenig" ;
|
few_Det = let tab = (detLikeAdj' False Pl "wenig").s
|
||||||
|
in {s,sp = asQuant tab ; n = Pl ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
||||||
---- first_Ord = {s = (regA "erst").s ! Posit} ;
|
---- first_Ord = {s = (regA "erst").s ! Posit} ;
|
||||||
for_Prep = mkPrep "für" P.accusative ;
|
for_Prep = mkPrep "für" P.accusative ;
|
||||||
from_Prep = mkPrep "aus" P.dative ;
|
from_Prep = mkPrep "aus" P.dative ;
|
||||||
@@ -54,11 +56,13 @@ concrete StructuralGer of Structural' = CatGer **
|
|||||||
in_Prep = P.inDat_Prep ; -- HL 7/2022
|
in_Prep = P.inDat_Prep ; -- HL 7/2022
|
||||||
it_Pron = mkPronPers "es" "es" "ihm" "seiner" "sein" Neutr Sg P3 ;
|
it_Pron = mkPronPers "es" "es" "ihm" "seiner" "sein" Neutr Sg P3 ;
|
||||||
less_CAdv = X.mkCAdv "weniger" "als" ;
|
less_CAdv = X.mkCAdv "weniger" "als" ;
|
||||||
many_Det = detLikeAdj False Pl "viel" ;
|
many_Det = let tab = (detLikeAdj' False Pl "viel").s
|
||||||
|
in {s,sp = asQuant tab ; n = Pl ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
||||||
more_CAdv = X.mkCAdv "mehr" "als" ;
|
more_CAdv = X.mkCAdv "mehr" "als" ;
|
||||||
most_Predet = {s = appAdj (regA "meist") ; c = noCase ; a = PAgNone} ;
|
most_Predet = {s = appAdj' (regA "meist") ; c = noCase' ; a = PAgNone} ;
|
||||||
most_Predet' = {s = appAdj' (regA "meist") ; c = noCase ; a = PAgNone} ;
|
-- much_Det = {s = \\_,_ => "viel" ; sp = \\_,_ => "vieles" ; n = Sg ; a = Weak ; isDef = False} ;
|
||||||
much_Det = {s = \\_,_ => "viel" ; sp = \\_,_ => "vieles" ; n = Sg ; a = Weak ; isDef = False} ;
|
much_Det = {s = asQuant (\\_,_ => "viel") ; sp = asQuant (\\_,_ => "vieles") ;
|
||||||
|
n = Sg ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
||||||
must_VV = auxVV
|
must_VV = auxVV
|
||||||
(mkV
|
(mkV
|
||||||
"müssen" "muss" "musst" "muss" "müsst" "müss"
|
"müssen" "muss" "musst" "muss" "müsst" "müss"
|
||||||
@@ -66,10 +70,11 @@ concrete StructuralGer of Structural' = CatGer **
|
|||||||
"müsste" "gemusst" []
|
"müsste" "gemusst" []
|
||||||
VHaben) ;
|
VHaben) ;
|
||||||
--- one_Quant = DEPREC
|
--- one_Quant = DEPREC
|
||||||
only_Predet = {s = \\_,_,_ => "nur" ; c = noCase ; a = PAgNone} ;
|
only_Predet = {s = \\_,_,_ => "nur" ; c = noCase' ; a = PAgNone} ;
|
||||||
no_Utt = ss "nein" ;
|
no_Utt = ss "nein" ;
|
||||||
---b no_Phr = ss "nein" ;
|
---b no_Phr = ss "nein" ;
|
||||||
on_Prep = mkPrep "auf" P.dative ;
|
-- on_Prep = mkPrep "auf" P.dative ;
|
||||||
|
on_Prep = P.mkPrep "auf" "auf den" "auf die" "aufs" P.accusative ; -- test HL 7/2022
|
||||||
or_Conj = {s1 = [] ; s2 = "oder" ; n = Sg} ;
|
or_Conj = {s1 = [] ; s2 = "oder" ; n = Sg} ;
|
||||||
otherwise_PConj = ss "sonst" ;
|
otherwise_PConj = ss "sonst" ;
|
||||||
part_Prep = P.von_Prep ; -- mkPrep "von" P.dative ;
|
part_Prep = P.von_Prep ; -- mkPrep "von" P.dative ;
|
||||||
@@ -78,21 +83,21 @@ concrete StructuralGer of Structural' = CatGer **
|
|||||||
quite_Adv = ss "ziemlich" ;
|
quite_Adv = ss "ziemlich" ;
|
||||||
she_Pron = mkPronPers "sie" "sie" "ihr" "ihrer" "ihr" Fem Sg P3 ;
|
she_Pron = mkPronPers "sie" "sie" "ihr" "ihrer" "ihr" Fem Sg P3 ;
|
||||||
so_AdA = ss "so" ;
|
so_AdA = ss "so" ;
|
||||||
somebody_NP = nameNounPhrase {s = caselist "jemand" "jemanden" "jemandem" "jemands"} ;
|
somebody_NP = nameNounPhrase' Masc {s = caselist "jemand" "jemanden" "jemandem" "jemands"} ;
|
||||||
somePl_Det = detLikeAdj True Pl "einig" ;
|
somePl_Det = let tab = (detLikeAdj' True Pl "einig").s
|
||||||
|
in {s,sp = asQuant tab ; isDef = True ; n = Pl ; a = Weak ; hasDefArt = False} ;
|
||||||
someSg_Det = {
|
someSg_Det = {
|
||||||
s,sp = \\g,c =>
|
s,sp = asQuant (\\g,c => "ein" + pronEnding ! GSg g ! c) ; ---- einer,eines
|
||||||
usePrepC c (\k -> "ein" + pronEnding ! GSg g ! k) ; ---- einer,eines
|
|
||||||
n = Sg ;
|
n = Sg ;
|
||||||
a = Strong ;
|
a = Strong ;
|
||||||
hasNum = True ;
|
hasNum = True ;
|
||||||
isDef = False ;
|
isDef = False ; hasDefArt = False
|
||||||
} ;
|
} ;
|
||||||
something_NP = nameNounPhrase {s = \\_ => "etwas"} ;
|
something_NP = nameNounPhrase' Neutr {s = \\_ => "etwas"} ;
|
||||||
somewhere_Adv = ss "irgendwo" ;
|
somewhere_Adv = ss "irgendwo" ;
|
||||||
that_Quant = let
|
that_Quant = let
|
||||||
jener : Number => Gender => PCase => Str = \\n => (detUnlikeAdj True n "jen").s in
|
jener : Number => Gender => Case => Str = \\n => (detUnlikeAdj' True n "jen").s in
|
||||||
{s,sp = \\_ => jener ; a,aPl = Weak} ;
|
{s,sp = \\_ => jener ; a,aPl = Weak ; hasDefArt = False} ;
|
||||||
---b that_NP = nameNounPhrase {s = caselist "das" "das" "denem" "dessen"} ; ----
|
---b that_NP = nameNounPhrase {s = caselist "das" "das" "denem" "dessen"} ; ----
|
||||||
there_Adv = ss "da" ; --- no variants in the rgl | ss "dort" ;
|
there_Adv = ss "da" ; --- no variants in the rgl | ss "dort" ;
|
||||||
there7to_Adv = ss "dahin" ;
|
there7to_Adv = ss "dahin" ;
|
||||||
@@ -101,8 +106,8 @@ concrete StructuralGer of Structural' = CatGer **
|
|||||||
---b these_NP = {s = caselist "diese" "diese" "diesen" "dieser" ; a = agrP3 Pl} ;
|
---b these_NP = {s = caselist "diese" "diese" "diesen" "dieser" ; a = agrP3 Pl} ;
|
||||||
they_Pron = mkPronPers "sie" "sie" "ihnen" "ihrer" "ihr" Fem Pl P3 ;
|
they_Pron = mkPronPers "sie" "sie" "ihnen" "ihrer" "ihr" Fem Pl P3 ;
|
||||||
this_Quant = let
|
this_Quant = let
|
||||||
dieser : Number => Gender => PCase => Str = \\n => (detUnlikeAdj True n "dies").s in
|
dieser : Number => Gender => Case => Str = \\n => (detUnlikeAdj' True n "dies").s in
|
||||||
{s,sp = \\_ => dieser ; a,aPl = Weak} ;
|
{s,sp = \\_ => dieser ; a,aPl = Weak ; hasDefArt = False} ;
|
||||||
---b this_NP = nameNounPhrase {s = caselist "dies" "dies" "diesem" "dieses"} ; ----
|
---b this_NP = nameNounPhrase {s = caselist "dies" "dies" "diesem" "dieses"} ; ----
|
||||||
---b those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ;
|
---b those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ;
|
||||||
through_Prep = mkPrep "durch" P.accusative ;
|
through_Prep = mkPrep "durch" P.accusative ;
|
||||||
@@ -124,7 +129,7 @@ concrete StructuralGer of Structural' = CatGer **
|
|||||||
when_IAdv = ss "wann" ;
|
when_IAdv = ss "wann" ;
|
||||||
when_Subj = ss "wenn" ;
|
when_Subj = ss "wenn" ;
|
||||||
where_IAdv = ss "wo" ;
|
where_IAdv = ss "wo" ;
|
||||||
which_IQuant = {s = \\n,g,c => (detUnlikeAdj True n "welch").s ! g ! NPC c} ;
|
which_IQuant = {s = \\n,g,c => (detUnlikeAdj' True n "welch").s ! g ! c} ;
|
||||||
|
|
||||||
whoSg_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Sg} ;
|
whoSg_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Sg} ;
|
||||||
whoPl_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Sg} ; -- HL 6/2016
|
whoPl_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Sg} ; -- HL 6/2016
|
||||||
@@ -136,19 +141,19 @@ concrete StructuralGer of Structural' = CatGer **
|
|||||||
youPol_Pron = mkPronPers "Sie" "Sie" "Ihnen" "Ihrer" "Ihr" Fem Pl P3 ;
|
youPol_Pron = mkPronPers "Sie" "Sie" "Ihnen" "Ihrer" "Ihr" Fem Pl P3 ;
|
||||||
yes_Utt = ss "ja" ;
|
yes_Utt = ss "ja" ;
|
||||||
|
|
||||||
not_Predet = {s = \\_,_,_ => "nicht" ; c = noCase ; a = PAgNone} ;
|
not_Predet = {s = \\_,_,_ => "nicht" ; c = noCase' ; a = PAgNone} ;
|
||||||
no_Quant = let
|
no_Quant = let
|
||||||
keiner : Number => Gender => PCase => Str = table {
|
keiner : Number => Gender => Case => Str = table {
|
||||||
Sg => \\g,c => usePrepC c (\k -> "kein" + pronEnding ! GSg g ! k) ;
|
Sg => \\g,c => "kein" + pronEnding ! GSg g ! c ;
|
||||||
Pl => (detUnlikeAdj False Pl "kein").s
|
Pl => (detUnlikeAdj' False Pl "kein").s
|
||||||
}
|
}
|
||||||
in
|
in
|
||||||
{s,sp = \\_ => keiner ; a = Strong ; aPl = Weak} ; ---- sp
|
{s,sp = \\_ => keiner ; a = Strong ; aPl = Weak ; hasDefArt = False} ; ---- sp
|
||||||
if_then_Conj = {s1 = "wenn" ; s2 = "dann" ; n = Sg ; lock_Conj = <>} ;
|
if_then_Conj = {s1 = "wenn" ; s2 = "dann" ; n = Sg ; lock_Conj = <>} ;
|
||||||
nobody_NP =
|
nobody_NP =
|
||||||
nameNounPhrase {s = caselist "niemand" "niemanden" "niemandem" "niemands"} ;
|
nameNounPhrase' Masc {s = caselist "niemand" "niemanden" "niemandem" "niemands"} ;
|
||||||
nothing_NP =
|
nothing_NP =
|
||||||
nameNounPhrase {s = \\_ => "nichts"} ; --maybe add: nameNounPhrase {s = \\_ => "garnichts"}
|
nameNounPhrase' Neutr {s = \\_ => "nichts"} ; --maybe add: nameNounPhrase {s = \\_ => "garnichts"}
|
||||||
at_least_AdN = ss "wenigstens" ;
|
at_least_AdN = ss "wenigstens" ;
|
||||||
at_most_AdN = ss "höchstens" ;
|
at_most_AdN = ss "höchstens" ;
|
||||||
except_Prep = mkPrep "außer" P.dative ;
|
except_Prep = mkPrep "außer" P.dative ;
|
||||||
@@ -159,4 +164,11 @@ concrete StructuralGer of Structural' = CatGer **
|
|||||||
|
|
||||||
lin language_title_Utt = ss "Deutsch" ;
|
lin language_title_Utt = ss "Deutsch" ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
asQuant : (Gender => Case => Str) -> (Gender => Case => {quant,num:Str}) =
|
||||||
|
\tab -> \\g,c => {quant = tab ! g ! c; num = []} ;
|
||||||
|
asNum : (Gender => Case => Str) -> (Gender => Case => {quant,num:Str}) =
|
||||||
|
\tab -> \\g,c => {quant = []; num = tab ! g ! c} ;
|
||||||
|
pairTable : (Gender => Case => Str) -> (Gender => Case => Str) -> (Gender => Case => {quant,num:Str})
|
||||||
|
= \qt,nt -> \\g,c => {quant = qt ! g ! c; num = nt ! g ! c} ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ concrete VerbGer of Verb' = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
SlashV2A v ap =
|
SlashV2A v ap =
|
||||||
insertAdj (ap.s ! APred) ap.c ap.ext (predV v) ** {c2 = v.c2; objCtrl = False} ;
|
insertAdj (ap.s ! APred) ap.c ap.ext (predV v) ** {c2 = v.c2; objCtrl = False} ;
|
||||||
|
|
||||||
-- to save compile time, comment out:
|
-- to save (83669 - 67299 = 16370 msec) compile time, comment out:
|
||||||
ComplSlash vps np =
|
ComplSlash vps np =
|
||||||
-- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of np.
|
-- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of np.
|
||||||
-- HL 3/22 better before inserting np, using objCtrl
|
-- HL 3/22 better before inserting np, using objCtrl
|
||||||
@@ -94,10 +94,11 @@ concrete VerbGer of Verb' = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
|
|
||||||
-- SlashV2VNP v np vp = -- bitte ihn, zu kaufen | lasse ihn kaufen HL 3/22
|
-- SlashV2VNP v np vp = -- bitte ihn, zu kaufen | lasse ihn kaufen HL 3/22
|
||||||
-- insertObjNP np v.c2 (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) ;
|
-- insertObjNP np v.c2 (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) ;
|
||||||
-- to save compile time, comment out:
|
{-
|
||||||
|
-- to save (571098 = 83669 = 487429 msec) compile time (in 58% memory), comment out:
|
||||||
SlashV2VNP' v np vp = -- bitte ihn, zu kaufen | lasse ihn kaufen HL 3/22
|
SlashV2VNP' v np vp = -- bitte ihn, zu kaufen | lasse ihn kaufen HL 3/22
|
||||||
insertObjNP' np v.c2 (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) ;
|
insertObjNP' np v.c2 (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) ;
|
||||||
|
-}
|
||||||
UseComp comp =
|
UseComp comp =
|
||||||
insertExtrapos comp.ext (insertObj comp.s (predV sein_V)) ; -- agr not used
|
insertExtrapos comp.ext (insertObj comp.s (predV sein_V)) ; -- agr not used
|
||||||
-- adj slot not used here for e.g. "ich bin alt" but same behaviour as NPs?
|
-- adj slot not used here for e.g. "ich bin alt" but same behaviour as NPs?
|
||||||
@@ -106,7 +107,7 @@ concrete VerbGer of Verb' = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
UseCopula = predV sein_V ;
|
UseCopula = predV sein_V ;
|
||||||
|
|
||||||
CompAP ap = {s = \\_ => ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ; ext = ap.ext} ;
|
CompAP ap = {s = \\_ => ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ; ext = ap.ext} ;
|
||||||
CompNP np = {s = \\_ => np.s ! NPC Nom ++ np.rc ; ext = np.ext} ;
|
CompNP np = {s = \\_ => (np.s ! Nom).p1 ++ (np.s ! Nom).p2 ++ np.rc ; ext = np.ext} ;
|
||||||
CompAdv a = {s = \\_ => a.s ; ext = []} ;
|
CompAdv a = {s = \\_ => a.s ; ext = []} ;
|
||||||
|
|
||||||
CompCN cn = {s = \\a => case numberAgr a of {
|
CompCN cn = {s = \\a => case numberAgr a of {
|
||||||
|
|||||||
Reference in New Issue
Block a user