mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-21 17:12:50 -06:00
cleaned up API comments for document
This commit is contained in:
@@ -4,12 +4,13 @@
|
||||
--
|
||||
-- Aarne Ranta 2003
|
||||
--
|
||||
-- This is an API to the user of the resource grammar
|
||||
-- This is an API for the user of the resource grammar
|
||||
-- for adding lexical items. It gives functions for forming
|
||||
-- expressions of open categories: nouns, adjectives, verbs.
|
||||
--
|
||||
-- It covers the "bokmål" variant of Norwegian.
|
||||
--
|
||||
-- Closed categories (determiners, pronouns, conjunctions) are
|
||||
-- accessed through the resource syntax API, $Structural.gf$.
|
||||
-- accessed through the resource syntax API, $Structural$.
|
||||
--
|
||||
-- The main difference with $MorphoNor.gf$ is that the types
|
||||
-- referred to are compiled resource grammar types. We have moreover
|
||||
@@ -21,8 +22,8 @@
|
||||
-- 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 $IrregularEng$, which covers all irregularly inflected
|
||||
-- words.
|
||||
-- separate module [``IrregNor`` ../../norwegian/IrregNor],
|
||||
-- which covers irregularly inflected verbs.
|
||||
|
||||
resource ParadigmsNor =
|
||||
open
|
||||
@@ -96,7 +97,7 @@ oper
|
||||
|
||||
--3 Relational nouns
|
||||
--
|
||||
-- Relational nouns ("daughter of x") need a preposition.
|
||||
-- Relational nouns ("datter til x") need a preposition.
|
||||
|
||||
mkN2 : N -> Prep -> N2 ;
|
||||
|
||||
@@ -108,7 +109,8 @@ oper
|
||||
-- Use the function $mkPrep$ or see the section on prepositions below to
|
||||
-- form other prepositions.
|
||||
--
|
||||
-- Three-place relational nouns ("the connection from x to y") need two prepositions.
|
||||
-- Three-place relational nouns ("forbindelse fra x til y")
|
||||
-- need two prepositions.
|
||||
|
||||
mkN3 : N -> Prep -> Prep -> N3 ;
|
||||
|
||||
@@ -116,7 +118,7 @@ oper
|
||||
--3 Relational common noun phrases
|
||||
--
|
||||
-- In some cases, you may want to make a complex $CN$ into a
|
||||
-- relational noun (e.g. "the old town hall of"). However, $N2$ and
|
||||
-- relational noun (e.g. "den gamle kongen av"). However, $N2$ and
|
||||
-- $N3$ are purely lexical categories. But you can use the $AdvCN$
|
||||
-- and $PrepNP$ constructions to build phrases like this.
|
||||
|
||||
@@ -172,10 +174,10 @@ oper
|
||||
|
||||
-- Sometimes just the positive forms are irregular.
|
||||
|
||||
mk3ADeg : (galen,galet,galna : Str) -> A ;
|
||||
mk3ADeg : (galen,galet,galne : Str) -> A ;
|
||||
mk2ADeg : (bred,bredt : Str) -> A ;
|
||||
|
||||
-- If comparison is formed by "mer, "mest", as in general for
|
||||
-- If comparison is formed by "mer", "mest", as in general for
|
||||
-- long adjective, the following pattern is used:
|
||||
|
||||
compoundA : A -> A ; -- -/mer/mest norsk
|
||||
@@ -184,10 +186,10 @@ oper
|
||||
--2 Adverbs
|
||||
|
||||
-- Adverbs are not inflected. Most lexical ones have position
|
||||
-- after the verb. Some can be preverbal (e.g. "always").
|
||||
-- after the verb. Some follow the verb (e.g. "altid").
|
||||
|
||||
mkAdv : Str -> Adv ;
|
||||
mkAdV : Str -> AdV ;
|
||||
mkAdv : Str -> Adv ; -- e.g. her
|
||||
mkAdV : Str -> AdV ; -- e.g. altid
|
||||
|
||||
-- Adverbs modifying adjectives and sentences can also be formed.
|
||||
|
||||
@@ -214,7 +216,7 @@ oper
|
||||
irregV : (drikke, drakk, drukket : Str) -> V ;
|
||||
|
||||
|
||||
--3 Verbs with "være" as auxiliary
|
||||
--3 Verbs with 'være' as auxiliary
|
||||
--
|
||||
-- By default, the auxiliary is "have". This function changes it to "være".
|
||||
|
||||
@@ -223,14 +225,14 @@ oper
|
||||
|
||||
--3 Verbs with a particle.
|
||||
--
|
||||
-- The particle, such as in "switch on", is given as a string.
|
||||
-- The particle, such as in "lukke opp", is given as a string.
|
||||
|
||||
partV : V -> Str -> V ;
|
||||
|
||||
--3 Deponent verbs.
|
||||
--
|
||||
-- Some words are used in passive forms only, e.g. "hoppas", some as
|
||||
-- reflexive e.g. "ångra sig".
|
||||
-- Some words are used in passive forms only, e.g. "trives", some as
|
||||
-- reflexive e.g. "forestille seg".
|
||||
|
||||
depV : V -> V ;
|
||||
reflV : V -> V ;
|
||||
@@ -249,9 +251,9 @@ oper
|
||||
-- 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
|
||||
dirdirV3 : V -> V3 ; -- give,_,_
|
||||
mkV3 : V -> Prep -> Prep -> V3 ; -- snakke, med, om
|
||||
dirV3 : V -> Prep -> V3 ; -- gi,_,til
|
||||
dirdirV3 : V -> V3 ; -- gi,_,_
|
||||
|
||||
--3 Other complement patterns
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user