forked from GitHub/gf-rgl
- 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.
56 lines
2.2 KiB
Plaintext
56 lines
2.2 KiB
Plaintext
--# -path=.:../../src/abstract:../../src/common:../../src/api:../../src/prelude:../../src/english
|
|
-- --# -path=.:../abstract:../common:../api:../prelude
|
|
|
|
concrete TestLangEng of TestLang =
|
|
GrammarEng
|
|
, TestLexiconEng
|
|
-- , ConstructionEng
|
|
** open (R=ResEng), (P=ParadigmsEng), Prelude, (E=ExtendEng)
|
|
in {
|
|
|
|
flags
|
|
startcat = Phr ; unlexer = text ; lexer = text ;
|
|
|
|
lin
|
|
SlashV2Vneg v vp =
|
|
R.insertObjc (\\a => v.c3 ++ R.infVP v.typ vp False R.Simul (R.CNeg True) a) (R.predVc v) ;
|
|
|
|
lincat
|
|
VPSlashSlash = VPSlash ** {c3 : Str} ;
|
|
lin
|
|
ReflVPSlash v3 = (R.predVc ((P.reflV (lin V v3)) ** {c2 = v3.c3 ; missingAdv = True}));
|
|
|
|
ComplSlashSlash vpss np = R.insertObjc
|
|
(appPrep vpss.c2 (lin NP np)) (vpss ** {c2 = vpss.c3 ; missingAdv = True }) ;
|
|
|
|
Slash2V4 v np = (lin VPSlash (R.insertObjc (appPrep v.c2 (lin NP np)) (R.predVc v)
|
|
** {c2 = v.c3 ; missingAdv = True})) ** { c3 = v.c4 } ;
|
|
Slash3V4 v np = (lin VPSlash (R.insertObjc (appPrep v.c3 (lin NP np)) (R.predVc v)
|
|
** {c2 = v.c2 ; missingAdv = True})) ** { c3 = v.c4 } ;
|
|
Slash4V4 v np = (lin VPSlash (R.insertObjc (appPrep v.c4 (lin NP np)) (R.predVc v)
|
|
** {c2 = v.c2 ; missingAdv = True})) ** { c3 = v.c3 } ;
|
|
|
|
oper
|
|
appPrep : Str -> NP -> (R.Agr => Str) = \p,np -> \\_ => p ++ np.s ! R.NPAcc ;
|
|
|
|
-- Passive
|
|
lin
|
|
Pass2V3 v np =
|
|
let vps = R.insertObj (\\_ => v.s ! R.VPPart ++ v.p) (R.predAux R.auxBe) ** {c2 = v.c3}
|
|
in R.insertObj (\\_ => vps.c2 ++ np.s ! R.NPAcc) vps ;
|
|
|
|
Pass3V3 v np =
|
|
let vps = R.insertObj (\\_ => v.s ! R.VPPart ++ v.p) (R.predAux R.auxBe) ** {c2 = v.c2}
|
|
in R.insertObj (\\_ => vps.c2 ++ np.s ! R.NPAcc) vps ;
|
|
|
|
PastPartAP = E.PastPartAP ;
|
|
PassVPSlash = E.PassVPSlash ;
|
|
|
|
Pass2V4 v np =
|
|
let vpss = R.insertObj (\\_ => v.s ! R.VPPart ++ v.p) (R.predAux R.auxBe) ** {c2 = v.c3 ; c3 = v.c4}
|
|
in R.insertObj (\\_ => vpss.c3 ++ np.s ! R.NPAcc) vpss ** {c2 = vpss.c2 ;
|
|
missingAdv = True ;
|
|
gapInMiddle = False } ;
|
|
|
|
} ;
|