1
0
forked from GitHub/gf-rgl
Commit Graph

260 Commits

Author SHA1 Message Date
Krasimir Angelov
7d9d2a2b5c support plural PNs 2022-10-21 21:48:51 +02:00
Krasimir Angelov
b066fb4d35 extended Numerals API. moved from the WordNet grammar 2022-10-21 20:50:49 +02:00
Hans Leiss
1cad178ec8 The glueing of preposition with definite article is now implemented using
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.
2022-08-23 15:32:17 +02:00
Hans Leiss
787f9d10e8 The files for GrammarGer and AllGer (but not Construction, Documentation, Markup)
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?
2022-08-11 21:07:03 +02:00
Hans Leiss
ec41af609d 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
2022-07-22 11:49:19 +02:00
Hans Leiss
8eee3df739 Modifications of Prep\', Predet\', Quant\', Det\', NP\' to remove PCase and use NP.s : Agr => Str * Str instead 2022-07-19 18:27:56 +02:00
Hans Leiss
1379ba6c77 (Ger) reflexive RNP in ExtraGer completed ;
improved Slash-rules in tests/german/TestLangGer
2022-07-16 12:18:13 +02:00
Hans Leiss
0e8ac21976 (Ger) small fix to make reimplementation of infinitives compile for 'present'
new SlashVP, RelSlash in tests/german/TestLangGer to control reflexives in relative clauses
2022-04-11 15:33:36 +02:00
Hans Leiss
b8ddf4304b (Ger) Small fix to get 'present' installed
new SlashVP, RelSlash in tests/german/TestLangGer.gf to control reflexives in relative clauses
2022-04-11 12:27:39 +02:00
Hans Leiss
7778e6138c (Ger) reimplementation of infinitives to improve compilation
- 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
2022-04-06 12:55:48 +02:00
aarneranta
e552ceb71d corrected number of whatPl_IP 2021-11-19 14:59:18 +01:00
aarneranta
bd8550b652 Extend.CardCNCard for 5 million, 5 dozen, etc 2021-07-30 10:11:21 +02:00
aarneranta
cb502488d1 some ParadigmsEng,Fin,Ger additions 2021-07-30 09:29:19 +02:00
aarneranta
a3701d1a48 bug fix in VerbGer: added fields of CN to CompCN 2021-06-09 18:25:06 +02:00
krangelov
9d657a6f24 move UseDAP, UseDAPMasc, UseDAPFem to the RGL and implement it for several new languages 2021-04-27 18:00:54 +02:00
aarneranta
ce08eaf14b VPS,VPI in ExtendGer 2021-04-26 08:20:03 +02:00
krangelov
88b3974bee extend the documentation API 2021-03-12 22:24:40 +01:00
aarneranta
da1767b18a including Markup in LangGer,Ita which was missing 2021-01-20 08:32:59 +01:00
aarneranta
94341f57f9 removed the rest of variants from german/ except from LexiconGer 2021-01-19 17:48:14 +01:00
aarneranta
f59a706d45 commented out variants in StructuralGer: they do not belong to the RGL but to extensions 2021-01-18 14:16:38 +01:00
Aarne Ranta
c55592cea6 Added ExtendGer as almost dummy to start with 2021-01-13 16:01:50 +01:00
aarneranta
1f030252a1 fixed genitive es/en in German adjectives and determiners 2020-04-14 16:32:17 +02:00
Hans Leiss
8fb8ddd808 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.
2019-09-18 15:16:42 +02:00
Inari Listenmaa
844755b666 Merge pull request #258 from hleiss/accdatV3
(Ger) Readjusting accdatV3 in ParadigmsGer and modifying V3-examples …
2019-07-18 19:55:25 +02:00
Hans Leiss
d9928919e3 (Ger) Readjusting accdatV3 in ParadigmsGer and modifying V3-examples in LexiconGer instead
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
2019-07-08 16:09:17 +02:00
Hans Leiss
45e6bfdec5 (Ger) Correction of VP paradigm with modal verbs
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.*
2019-07-06 15:29:23 +02:00
Inari Listenmaa
932c72c36b Merge pull request #255 from hleiss/pron-ordering
Pron ordering
2019-07-04 17:06:50 +02:00
Hans Leiss
2a1c22c5ca fixed the syntax error with --# notpresent in ResGer 2019-07-04 14:15:50 +02:00
Hans Leiss
d3c6dddf2c removed comment from ResGer 2019-07-01 17:39:42 +02:00
Hans Leiss
03e404e518 Improving pronoun-switch and partial ordering of objects in Ger 2019-06-29 20:40:46 +02:00
jfschaefer
5ef182f4be (Ger) fix old spellings of irregular verbs 2018-12-07 17:46:27 +01:00
Aarne Ranta
994e0482bc added Construction for 'five inch nail' in Eng,Ger,Fin from the Dresden team at the summer school 2018-12-03 17:27:59 +02:00
Aarne Ranta
3949424a78 fixed Ger SentCN and AdvCN, which erased their earlier modifiers 2018-06-05 18:19:09 +02:00
Inari Listenmaa
3089155590 (Ger) Agreement with ReflVP + ComplSlash
ComplSlash ( … ReflVP … ) X:    reflexive should agree with X
ReflVP ... ( … ComplSlash … X): reflexive should agree with subject
2018-05-01 16:38:17 +02:00
Aarne Ranta
38dac3de60 restored c field in Ger.UttAP - yet another suppression previously undetected 2018-02-08 21:16:43 +01:00
Aarne Ranta
95ca88bf02 some paradigm extensions 2018-01-21 12:18:15 +01:00
Aarne Ranta
3703b76856 new cases to Ger.mkN 2018-01-14 22:19:19 +01:00
Aarne Ranta
485b095462 fixed a bug in German infinitives where some fields were left out 2017-12-19 14:16:14 +01:00
Aarne Ranta
4da5677697 some fixes in German 2017-10-25 11:09:13 +02:00
Aarne Ranta
9ec92096c6 added MarkupGer 2017-10-25 11:08:49 +02:00
Aarne Ranta
e913404f3a Ger.ConjCN 2017-10-24 19:38:22 +02:00
Krasimir Angelov
7a3ebdc5ea added linref AP in German 2017-08-21 20:42:18 +02:00
Inari Listenmaa
a742d54515 Fix punctuation to use SOFT_BIND and BIND in the whole RGL 2017-06-30 15:28:27 +02:00
aarne
df39e466bb some new functionalities in Ger 2017-06-05 12:46:53 +00:00
aarne
e9bf0d0966 qualified ambiguous NP in ExtraGer 2017-01-30 13:48:46 +00:00
aarne
d37d00b6db extrapos field added in German UseComp 2016-11-06 18:11:31 +00:00
krasimir
52e9076641 add ready_VP in Constructions 2016-07-05 09:49:30 +00:00
krasimir
c0ed747ba6 added scared_VP & ill_VP. fixed scared_A and ill_A in the general dictionaries of some languages 2016-07-05 06:22:06 +00:00
krasimir
54cf5ce0c8 added tired_VP in Constructions 2016-07-04 21:15:00 +00:00
aarne
b761120645 fixed some functions in IdiomGer where the discontinuous parts had been omitted 2016-06-14 06:53:58 +00:00