mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-29 04:46:30 -06:00
Ger: improved infinitives (and passives); tests with more verbs in testing/german
- 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.
This commit is contained in:
+48
-33
@@ -2,39 +2,46 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
-- Remark: np.isLight makes ResGer.insertObjNP expensive, for ComplSlash, SlashVP
|
||||
|
||||
lin
|
||||
DetCN det cn = {
|
||||
s = \\c => det.s ! cn.g ! c ++
|
||||
(let k = (prepC c).c in cn.s ! adjfCase det.a k ! det.n ! k) ;
|
||||
(let k = (prepC c).c in cn.s ! adjfCase det.a k ! det.n ! k ++ cn.adv) ;
|
||||
a = agrgP3 cn.g det.n ;
|
||||
-- isPron = 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
|
||||
rc = cn.rc ! det.n ; -- don't see a|no man = sehe keinen Mann
|
||||
adv = cn.adv ;
|
||||
-- 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 } ;
|
||||
rc = cn.rc ! det.n ;
|
||||
ext = cn.ext
|
||||
} ;
|
||||
|
||||
DetNP det = {
|
||||
s = \\c => det.sp ! Neutr ! c ; -- more genders in ExtraGer -- HL: der+er,den+en ; der drei,den drei+en
|
||||
a = agrP3 det.n ;
|
||||
-- isPron = det.isDef ;
|
||||
isPron = False ; -- HL 6/2019: don't apply pronoun switch: ich gebe ihr das vs. ich gebe es ihr
|
||||
rc, adv, ext = []
|
||||
-- isLight = det.isDef ;
|
||||
-- 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 } ;
|
||||
rc, ext = []
|
||||
} ;
|
||||
|
||||
UsePN pn = {
|
||||
s = \\c => usePrepC c (\k -> pn.s ! k) ;
|
||||
a = agrgP3 pn.g Sg ;
|
||||
-- isPron = True ; --- means: this is not a heavy NP, but comes before negation
|
||||
isPron = False ; -- HL 6/2019: to regulate Pron/NonPronNP order
|
||||
rc, adv, ext = []
|
||||
-- isLight = True ; -- means: this is not a heavy NP, but comes before negation
|
||||
-- isPron = False ; -- HL 6/2019: to regulate Pron/NonPronNP order
|
||||
w = WLight ;
|
||||
rc, ext = []
|
||||
} ;
|
||||
|
||||
UsePron pron = {
|
||||
s = \\c => usePrepC c (\k -> pron.s ! NPCase k) ;
|
||||
a = pron.a ;
|
||||
isPron = True ;
|
||||
rc, adv, ext = []
|
||||
-- isLight = True ;
|
||||
-- isPron = True ;
|
||||
w = WPron ;
|
||||
rc, ext = []
|
||||
} ;
|
||||
|
||||
PredetNP pred np =
|
||||
@@ -43,25 +50,32 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude 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 ;
|
||||
a = ag ;
|
||||
isPron = False
|
||||
-- isLight = False ;
|
||||
-- isPron = False
|
||||
w = WHeavy
|
||||
} ;
|
||||
|
||||
PPartNP np v2 = np ** {
|
||||
s = \\c => np.s ! c ++ v2.s ! VPastPart APred ; --- invar part
|
||||
isPron = False
|
||||
s = \\c => np.s ! c ++ embedInCommas (v2.s ! VPastPart APred) ; --- invar part
|
||||
-- isPron = False
|
||||
w = WHeavy
|
||||
} ;
|
||||
{- possibly structures such as
|
||||
"sie ist 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,"
|
||||
-}
|
||||
|
||||
AdvNP np adv = np ** {
|
||||
adv = np.adv ++ adv.s ;
|
||||
isPron = False
|
||||
s = \\c => np.s ! c ++ adv.s ;
|
||||
-- isLight = False ;
|
||||
-- isPron = False
|
||||
w = WHeavy
|
||||
} ;
|
||||
|
||||
ExtAdvNP np adv = np ** {
|
||||
adv = np.adv ++ embedInCommas adv.s ;
|
||||
isPron = False
|
||||
s = \\c => np.s ! c ++ embedInCommas adv.s ;
|
||||
-- isLight = False ;
|
||||
-- isPron = False
|
||||
w = WHeavy
|
||||
} ;
|
||||
|
||||
DetQuantOrd quant num ord =
|
||||
@@ -151,19 +165,20 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
||||
} ;
|
||||
|
||||
MassNP cn = {
|
||||
s = \\c => usePrepC c (\k -> cn.s ! Strong ! Sg ! k) ;
|
||||
s = \\c => usePrepC c (\k -> cn.s ! Strong ! Sg ! k) ++ cn.adv ;
|
||||
a = agrgP3 cn.g Sg ;
|
||||
isPron = False ;
|
||||
rc = cn.rc ! Sg ;
|
||||
adv = cn.adv ;
|
||||
ext = cn.ext
|
||||
-- isLight = True ; -- ich trinke Bier nicht vs. ich trinke kein Bier
|
||||
-- isPron = False ;
|
||||
w = WLight ;
|
||||
rc = cn.rc ! Sg ;
|
||||
ext = cn.ext
|
||||
} ;
|
||||
|
||||
UseN, UseN2 = \n -> {
|
||||
s = \\_ => n.s ;
|
||||
g = n.g ;
|
||||
rc = \\_ => [] ;
|
||||
ext,adv = []
|
||||
rc = \\_ => [] ;
|
||||
ext,adv = []
|
||||
} ;
|
||||
|
||||
ComplN2 f x = {
|
||||
@@ -182,8 +197,6 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
||||
} ;
|
||||
g = f.g ;
|
||||
c2 = f.c3 ;
|
||||
rc = \\_ => [] ;
|
||||
ext,adv = []
|
||||
} ;
|
||||
|
||||
Use2N3 f = f ;
|
||||
@@ -209,7 +222,9 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
||||
|
||||
RelNP np rs = np ** {
|
||||
rc = (np.rc ++ embedInCommas (rs.s ! RGenNum (gennum (genderAgr np.a) (numberAgr np.a)))) ;
|
||||
isPron = False } ;
|
||||
-- isPron = False
|
||||
w = case isPron np of { True => WLight ; _ => np.w }
|
||||
} ;
|
||||
|
||||
SentCN cn s = cn ** {ext = cn.ext ++ embedInCommas s.s} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user