NP.s : Bool => Case => Str and NP.w = WDefArt
np.s ! False : Case => Str is the ordinary paradigm; if the np has a
definite article, np.w = WDefArt, and np.s ! True : Case => Str is the
paradigm with definite article omitted, if np.a = Ag g Sg p.
Prepositions now have type
Prep = {s : GenNum => Str ; s2 :Str ; c : Case ; isPrep : PrepType},
and |Prep| = |Case|*|isPrep| = 4 * 3 = 12, independent of |PCase| >= 18.
A preposition p with p.isPrep = isPrepDefArt has in p.s ! (GSg g) : Str
the preposition glued with definite article of a following np in singular.
The modified linearization categories for Prep, NP, Det, DAP, Quant,
Predet are no longer Prep', NP' etc., but Prep, NP etc. in CatGer.
They are now also used in gf-rgl/tests/german/TestLangGer.gf.
The previous auxiliary files abstract/Adjective'.gf etc. are removed.
BUT: for complexitiy reasons,
- the glueing is omitted in SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash,
- SlashVP : NP -> SlashVP -> ClSlash (in SentenceGer and TestLanGer)
are commented out.
SlashVP causes grammar compilation to crash due to memory limits, probably
because mkClause and its modification mkClSlash are too detailed.
are edited to allow for glued Prep+DefArt, using new categories NP',Det',Quant',
Predet',DAP'.
The previous NP.s : Case => Str*Str allows parsing
"in dem Meer" = in_Prep ++ (np.s ! Case).p1
"im Meer" = in_Prep ++ (np.s ! Case).p2,
but since only one of the strings of (np.s!Case) is used, the tree
contains a metavariable like ?2 (the grammar is "erasing"). (Similarly, if we used
NP.s : Case => Str and NP.s2 : Case => Str.)
To get rid of the metavariables, we have to choose BY A PARAMETER, say
NP.s : droppedDefArt? => Case => Str
Using np.a = Ag g n p, the preposition can select between preposition
alone or preposition with definite article (glued or not), via
Prep = {s : GenNum => Str ; s2 :Str ; c : Case ; isPrep : PrepType }
The combination is done in appPrepNP' and appPrep'. This is
independent of the number of glued Prep+DefArt. But LangGer compiles
now in 200s using 30% memory (without SlashV2VNP). Can AppPrepNP' (and
insertObjNP') be simplified?
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
- removed Control and treat control verbs with VPSlash.objCtrl:Bool
- combined VP.inf and VP.infExt to VP.inf with inplace/extracted parts
depending on Agr, to subj/obj-control reflexives in infinitival complements
- AllGer compiles from src in 250s (SlashV2VNP!), .gfo loads in 15s on x86_64
- NP: added field isLight in order to push negation behind light nps;
this had been done in gf-3.9 using field isPron, but isPron is now
used to put accusative pronoun before dative pronoun. Removed field
adv: adverbial extensions cannot be extracted (todo: also for CN).
Reduced isLight*isPron to w:Weight with 3 values: WPron, WLight, WHeavy.
- added param Control and field ctrl:Control to classify V2V-verbs into
subject- and object-contol verbs, use ctrl to make reflexives agree
with subject resp. object in VPSlash, and refine ComplSlash.
- Verb: new versions of ComplVV, SlashV2V and SlashVV to give better
(nested) infinitives (extracting infzu and correcting object order).
a) nested SlashVV doesn't work properly;
b) SlashV2VNP may have to be commented out to prevent a stack overflow
when compiling.
Intended change of SlashV2VNP in tests/german/TestLangGer could not
be tested due to size problems with the compiler.
- VP: changed field a1 : Polarity => Str to a1:Str to collect the adverbs
coming before negation, using (negation : Polarity => Str) in mkClause.
Use objCtrl:Bool instead of missingAdv to let reflexives agree with object.
- ResGer: insertObjNP reorganized, infzuVP added
- DictVerbsGer: some corrections (helft -> hilft, *sprecht -> *spricht)
- Some potential passive rules in tests/german/TestLangGer|Eng
- ExtraGer needs to be cleaned up with repect to the modified mkClause.
ParadigmsGer had two constructions of verbs v:V3 with dat- and acc-object nps,
(1) mkV3 : V -> V3 = \v -> mkV3 v accPrep datPrep ;
(2) accdatV3 : V -> V3 = \v -> mkV3 v datPrep accPrep ; -- (no prepositions)
In a previous patch, I had replaced (accdatV3 v) to (mkV3 v accPrep datPrep), as the
name suggested. (This actually was the meaning of accdatV3 in gf-3.2, which had only
a non-overloaded mkV3 : V -> Prep -> Prep -> V3.)
The reason for having two constructions for dat+acc-verbs in Ger seems to be *Eng*:
for English, ditransitive V3-verbs are defined by
(2') mkV3 : V -> V3 = \v -> mkV3 v noPrep noPrep ;
like "to give sb sth", where the indirect argument comes first (c2=indir), the direct
second (c3=dir), corresponding to c2=datPrep, c3=accPrep in Ger; apparently, this was
meant by the comment (no prepositions) in (2). Other V3-verbs in Eng are defined by
(1') mkV3 : V -> Prep -> V3 = \v,p -> mkV3 v noPrep p ;
like "to give sth to sb", so that (c2=dir), (c3=indir-with preposition),
corresponding to c2=acc,c3=dat in Ger, i.e. (1).
In order to get trees with equal meaning in Ger and Eng, the direct and indirect
arguments of corresponding verbs must match. Therefore, some V3-verbs in Ger have to
be defined using (1), others using (2), although they syntactically behave similar.
This patch therefore reinstalls (1) and (2), and changes the V3 in LexiconGer to:
give_V3 = accdatV3 Irreg.geben_V ; -- c2=datPrep, c3=accPrep, to fit
-- to Eng ditransitive: give sb(indir) sth(dir) (no preposition)
sell_V3 = mkV3 (no_geV (regV "verkaufen")) ; -- Eng: mkV3 v noPrep toPrep
send_V3 = mkV3 (regV "schicken") ; -- Ger mkV3 v = Ger: mkV3 v accPrep datPrep
The inf part of VPC is split into inf,inf2:Str to correct
hat ... wollen lesen => hat ... lesen wollen
wird ... wollen haben lesen => wird ... haben lesen wollen
(for: lesen wollen|gewollt haben)
Changed useVP and mkClause of ResGer and MkVPS of ExtraGer.
(ExtraGer.DisToCl needs to be adapted, but best by unification with mkClause.)
See also tests/german/vp-paradigm.*