Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.
Aarne Ranta & Harald Hammarström 2003--2006
This is an API to the user of the resource grammar for adding lexical items. It gives functions for forming expressions of open categories: nouns, adjectives, verbs.
Closed categories (determiners, pronouns, conjunctions) are
accessed through the resource syntax API, Structural.gf.
The main difference with MorphoGer.gf is that the types
referred to are compiled resource grammar types. We have moreover
had the design principle of always having existing forms, rather
than stems, as string arguments of the paradigms.
The structure of functions for each word class C is the following:
first we give a handful of patterns that aim to cover all
regular cases. Then we give a worst-case function mkC, which serves as an
escape to construct the most irregular words of type C.
However, this function should only seldom be needed: we have a
separate module IrregularGer, which covers all irregularly inflected
words.
resource ParadigmsGer = open
(Predef=Predef),
Prelude,
MorphoGer,
CatGer
in {
To abstract over gender names, we define the following identifiers.
oper
Gender : Type ;
masculine : Gender ;
feminine : Gender ;
neuter : Gender ;
To abstract over case names, we define the following.
Case : Type ;
nominative : Case ;
accusative : Case ;
dative : Case ;
genitive : Case ;
To abstract over number names, we define the following.
Number : Type ;
singular : Number ;
plural : Number ;
Worst case: give all four singular forms, two plural forms (others + dative), and the gender.
mkN : (x1,_,_,_,_,x6 : Str) -> Gender -> N ;
-- mann, mann, manne, mannes, männer, männern
The regular heuristics recognizes some suffixes, from which it guesses the gender and the declension: e, ung, ion give the feminine with plural ending -n, -en, and the rest are masculines with the plural -e (without Umlaut).
regN : Str -> N ;
The 'almost regular' case is much like the information given in an ordinary dictionary. It takes the singular and plural nominative and the gender, and infers the other forms from these.
reg2N : (x1,x2 : Str) -> Gender -> N ;
Relational nouns need a preposition. The most common is von with the dative. Some prepositions are constructed in StructuralGer.
mkN2 : N -> Prep -> N2 ;
vonN2 : N -> N2 ;
Use the function mkPrep or see the section on prepositions below to
form other prepositions.
Three-place relational nouns (die Verbindung von x nach y) need two prepositions.
mkN3 : N -> Prep -> Prep -> N3 ;
Proper names, with a regular genitive, are formed as follows The regular genitive is s, omitted after s.
mkPN : (karolus, karoli : Str) -> PN ; -- karolus, karoli
regPN : (Johann : Str) -> PN ; -- Johann, Johanns ; Johannes, Johannes
Adjectives need three forms, one for each degree.
mkA : (x1,_,x3 : Str) -> A ; -- gut,besser,beste
The regular adjective formation works for most cases, and includes variations such as teuer - teurer, böse - böser.
regA : Str -> A ;
Invariable adjective are a special case.
invarA : Str -> A ; -- prima
Two-place adjectives are formed by adding a preposition to an adjective.
mkA2 : A -> Prep -> A2 ;
Adverbs are just strings.
mkAdv : Str -> Adv ;
A preposition is formed from a string and a case.
mkPrep : Str -> Case -> Prep ;
Often just a case with the empty string is enough.
accPrep : Prep ;
datPrep : Prep ;
genPrep : Prep ;
A couple of common prepositions (always with the dative).
von_Prep : Prep ;
zu_Prep : Prep ;
The worst-case constructor needs six forms:
mkV : (x1,_,_,_,_,x6 : Str) -> V ; -- geben, gibt, gib, gab, gäbe, gegeben
Weak verbs are sometimes called regular verbs.
regV : Str -> V ; -- führen
Irregular verbs use Ablaut and, in the worst cases, also Umlaut.
irregV : (x1,_,_,_,x5 : Str) -> V ; -- sehen, sieht, sah, sähe, gesehen
To remove the past participle prefix ge, e.g. for the verbs prefixed by be-, ver-.
no_geV : V -> V ;
To add a movable suffix e.g. auf(fassen).
prefixV : Str -> V -> V ;
To change the auxiliary from haben (default) to sein and vice-versa.
seinV : V -> V ;
habenV : V -> V ;
Reflexive verbs can take reflexive pronouns of different cases.
reflV : V -> Case -> V ;
Two-place verbs need a preposition, except the special case with direct object (accusative, transitive verbs). There is also a case for dative objects.
mkV2 : V -> Prep -> V2 ;
dirV2 : V -> V2 ;
datV2 : V -> V2 ;
Three-place (ditransitive) verbs need two prepositions, of which the first one or both can be absent.
mkV3 : V -> Prep -> Prep -> V3 ; -- speak, with, about
dirV3 : V -> Prep -> V3 ; -- give,_,to
accdatV3 : V -> V3 ; -- give,_,_
Verbs and adjectives can take complements such as sentences, questions, verb phrases, and adjectives.
mkV0 : V -> V0 ;
mkVS : V -> VS ;
mkV2S : V -> Prep -> V2S ;
mkVV : V -> VV ;
mkV2V : V -> Prep -> V2V ;
mkVA : V -> VA ;
mkV2A : V -> Prep -> V2A ;
mkVQ : V -> VQ ;
mkV2Q : V -> Prep -> V2Q ;
mkAS : A -> AS ;
mkA2S : A -> Prep -> A2S ;
mkAV : A -> AV ;
mkA2V : A -> Prep -> A2V ;
Notice: categories V2S, V2V, V2A, V2Q are in v 1.0 treated
just as synonyms of V2, and the second argument is given
as an adverb. Likewise AS, A2S, AV, A2V are just A.
V0 is just V.
V0, V2S, V2V, V2A, V2Q : Type ;
AS, A2S, AV, A2V : Type ;