Files
gf-core/lib/resource-0.6/doc/ParadigmsSwe.html
2004-08-10 13:15:08 +00:00

218 lines
6.7 KiB
HTML

<html>
<body>
<i> Produced by
gfdoc - a rudimentary GF document generator.
(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.
</i>
<p>
<h1></h1>
# -path=.:../abstract:../../prelude
<h1> Swedish Lexical Paradigms</h1>
<p>
Aarne Ranta 2003
<p>
This is an API to the user of the resource grammar
for adding lexical items. It give shortcuts for forming
expressions of basic categories: nouns, adjectives, verbs.
Closed categories (determiners, pronouns, conjunctions) are
accessed through the resource syntax API, <tt>Structural.gf</tt>.
<p>
The main difference with <tt>MorphoSwe.gf</tt> is that the types
referred to are compiled resource grammar types. We have moreover
had the design principle of always having existing forms, not stems, as string
arguments of the paradigms.
<p>
The following modules are presupposed:
<pre>
resource ParadigmsSwe = open (Predef=Predef), Prelude, SyntaxSwe, ResourceSwe in {
</pre>
<h2> Parameters </h2>
<p>
To abstract over gender names, we define the following identifiers.
<pre>
oper
utrum : Gender ;
neutrum : Gender ;
masculine : Sex ;
nonmasculine : Sex ;
</pre>
To abstract over case names, we define the following.
<pre>
nominative : Case ;
genitive : Case ;
</pre>
To abstract over number names, we define the following.
<pre>
singular : Number ;
plural : Number ;
</pre>
<h2> Nouns</h2>
Worst case: give all nominative forms and the gender.
The genitive is formed automatically, even when the nominative
ends with an <i>s</i>.
<pre>
mkN : (_,_,_,_ : Str) -> Gender -> Sex -> N ;
-- man, mannen, män, männen
</pre>
Here are some common patterns, corresponding to school-gramamr declensions.
Except <tt>nPojke</tt>, <tt>nKarl</tt>, and <tt>nMurare</tt>,
they are defined to be <tt>nonmasculine</tt>, which means that they don't create
the definite adjective form with <i>e</i> but with <i>a</i>.
<pre>
nApa : Str -> N ; -- apa (apan, apor, aporna) ; utrum
nBil : Str -> N ; -- bil (bilen, bilar, bilarna) ; utrum
nKarl : Str -> N ; -- karl (karlen, karlar, karlarna) ; utrum ; masculine
nPojke : Str -> N ; -- pojke (pojken, pojkar, pojkarna) ; utrum ; masculine
nNyckel : Str -> N ; -- nyckel (nyckeln, nycklar, nycklarna) ; utrum
nRisk : Str -> N ; -- risk (risken, risker, riskerna) ; utrum
nDike : Str -> N ; -- dike (diket, diken, dikena) ; neutrum
nRep : Str -> N ; -- rep (repet, rep, repen) ; neutrum
nPapper : Str -> N ; -- papper (pappret, papper, pappren) ; neutrum
nMurare : Str -> N ; -- murare (muraren, murare, murarna) ; utrum ; masculine
nKikare : Str -> N ; -- kikare (kikaren, kikare, kikarna) ; utrum
</pre>
Nouns used as functions need a preposition. The most common ones are <i>av</i>,
<i></i>, and <i>till</i>. A preposition is a string.
<pre>
mkFun : N -> Str -> Fun ;
funAv : N -> Fun ;
funPaa : N -> Fun ;
funTill : N -> Fun ;
</pre>
Proper names, with their possibly
irregular genitive. The regular genitive is <i>s</i>, omitted after <i>s</i>.
<pre>
mkPN : (_,_ : Str) -> Gender -> Sex -> PN ; -- Karolus, Karoli
pnReg : Str -> Gender -> Sex -> PN ; -- Johan,Johans ; Johannes, Johannes
pnS : Str -> Gender -> Sex -> PN ; -- "Burger King(s)"
</pre>
On the top level, it is maybe <tt>CN</tt> that is used rather than <tt>N</tt>, and
<tt>NP</tt> rather than <tt>PN</tt>.
<pre>
mkCN : N -> CN ;
mkNP : (Karolus, Karoli : Str) -> Gender -> NP ;
npReg : Str -> Gender -> NP ; -- Johann, Johanns
</pre>
<h2> Adjectives</h2>
Non-comparison one-place adjectives need four forms in the worst case:
strong singular, weak singular, plural.
<pre>
mkAdj1 : (_,_,_,_ : Str) -> Adj1 ; -- liten, litet, lilla, små
</pre>
Special cases needing one form each are: regular adjectives,
adjectives with unstressed <i>e</i> in the last syllable, those
ending with <i>n</i> as a further special case, and invariable
adjectives.
<pre>
adjReg : Str -> Adj1 ; -- billig (billigt, billiga, billiga)
adjNykter : Str -> Adj1 ; -- nykter (nyktert, nyktra, nyktra)
adjGalen : Str -> Adj1 ; -- galen (galet, galna, galna)
adjInvar : Str -> Adj1 ; -- bra
</pre>
Two-place adjectives need a preposition and a case as extra arguments.
<pre>
mkAdj2 : Adj1 -> Str -> Adj2 ; -- delbar, med
mkAdj2Reg : Str -> Str -> Adj2 ; --
</pre>
Comparison adjectives may need the three four forms for the positive case, plus
three more forms for the comparison cases.
<pre>
mkAdjDeg : (liten, litet, lilla, sma, mindre, minst, minsta : Str) -> AdjDeg ;
</pre>
Some comparison adjectives are completely regular.
<pre>
aReg : Str -> AdjDeg ;
</pre>
On top level, there are adjectival phrases. The most common case is
just to use a one-place adjective. The variation in <tt>adjGen</tt> is taken
into account.
<pre>
apReg : Str -> AP ;
</pre>
<h2> Adverbs</h2>
Adverbs are not inflected. Most lexical ones have position not
before the verb. Some can be preverbal (e.g. <i>alltid</i>).
<pre>
mkAdv : Str -> AdV ;
mkAdvPre : Str -> AdV ;
</pre>
Adverbs modifying adjectives and sentences can also be formed.
<pre>
mkAdA : Str -> AdA ;
mkAdS : Str -> AdS ;
</pre>
Prepositional phrases are another productive form of adverbials.
<pre>
mkPP : Str -> NP -> AdV ;
</pre>
<h2> Verbs</h2>
<p>
The fragment only has present tense so far.
The worst case needs three forms: the infinitive, the indicative, and the
imperative.
<pre>
mkV : (_,_,_ : Str) -> V ; -- vara, är, var; trivas, trivs, trivs
</pre>
The main conjugations need one string each.
<pre>
vKoka : Str -> V ; -- tala (talar, tala)
vSteka : Str -> V ; -- leka (leker, lek)
vBo : Str -> V ; -- bo (bor, bo)
vAndas : Str -> V ; -- andas [all forms the same: also "slåss"]
vTrivas : Str -> V ; -- trivas (trivs, trivs)
</pre>
The verbs 'be' and 'have' are special.
<pre>
vVara : V ;
vHa : V ;
</pre>
Particle verbs are formed by putting together a verb and a particle.
If the verb already has a particle, it is replaced by the new one.
<pre>
mkPartV : V -> Str -> V ; -- stänga av ;
</pre>
Two-place verbs, and the special case with direct object.
<pre>
mkTV : V -> Str -> TV ; -- tycka, om
tvDir : V -> TV ; -- gilla
</pre>
Ditransitive verbs.
<pre>
mkV3 : V -> Str -> Str -> V3 ; -- prata, med, om
v3Dir : V -> Str -> V3 ; -- ge,_,till
v3DirDir : V -> V3 ; -- ge,_,_
</pre>
The definitions should not bother the user of the API. So they are
hidden from the document.
</body>
</html>