mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
API documentation and slight change in Det syntax
This commit is contained in:
5
lib/resource-1.0/Makefile
Normal file
5
lib/resource-1.0/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
gfdoc:
|
||||
gfdoc -txthtml abstract/*.gf
|
||||
gfdoc -txthtml */Paradigms*.gf
|
||||
mv abstract/*.html doc/gfdoc
|
||||
mv */Paradigms*.html doc/gfdoc
|
||||
@@ -1,96 +1,130 @@
|
||||
--1 The category system
|
||||
|
||||
abstract Cat = {
|
||||
|
||||
cat
|
||||
|
||||
-- Top-level units constructed in $Phrase$.
|
||||
--2 Top-level units
|
||||
|
||||
-- Constructed in [Phrase Phrase.html].
|
||||
|
||||
Text ; -- text consisting of several phrases
|
||||
Phr ; -- phrase in a text e.g. "But be quiet my darling."
|
||||
Utt ; -- sentence, question, "one-word utterance"... e.g. "be quiet"
|
||||
Voc ; -- vocative or "please" e.g. "my darling"
|
||||
Phr ; -- phrase in a text e.g. "But be quiet my darling."
|
||||
Utt ; -- sentence, question, word... e.g. "be quiet"
|
||||
Voc ; -- vocative or "please" e.g. "my darling"
|
||||
|
||||
-- Tensed sentences constructed in $Tensed$ and, with just present forms, in $Untensed$.
|
||||
--2 Tensed sentences
|
||||
|
||||
S ; -- declarative sentence e.g. "she lived here"
|
||||
QS ; -- question e.g. "where did she live"
|
||||
RS ; -- relative e.g. "in which she lived"
|
||||
-- Constructed in [Tensed Tensed.html].
|
||||
-- A simplified variant, with just present forms, is [Untensed Untensed.html].
|
||||
|
||||
-- Clauses constructed in $Sentence$.
|
||||
S ; -- declarative sentence e.g. "she lived here"
|
||||
QS ; -- question e.g. "where did she live"
|
||||
RS ; -- relative e.g. "in which she lived"
|
||||
|
||||
Cl ; -- declarative clause, with all tense forms e.g. "she looks at this"
|
||||
Slash ; -- clause lacking object (S/NP in GPSG) e.g. "she looks at"
|
||||
Imp ; -- imperative e.g. "look at this"
|
||||
--2 Clauses
|
||||
|
||||
-- Questions and interrogatives, constructed in $Question$.
|
||||
-- Constructed in [Sentence Sentence.html].
|
||||
|
||||
QCl ; -- question clause, with all tense forms e.g. "why does she walk"
|
||||
IP ; -- interrogative pronoun e.g. "who"
|
||||
IAdv ; -- interrogative adverb e.g. "why"
|
||||
IDet ; -- interrogative determiner e.g. "which"
|
||||
Cl ; -- declarative clause, with all tenses e.g. "she looks at this"
|
||||
Slash ; -- clause missing NP (S/NP in GPSG) e.g. "she looks at"
|
||||
Imp ; -- imperative e.g. "look at this"
|
||||
|
||||
-- Relatives, constructed in $Relative$.
|
||||
--2 Questions and interrogatives
|
||||
|
||||
RCl ; -- relative clause, with all tense forms e.g. "in which she lives"
|
||||
RP ; -- relative pronoun e.g. "in which"
|
||||
-- Constructed in [Question Question.html].
|
||||
|
||||
-- Verb phrases, constructed in $Verb$.
|
||||
QCl ; -- question clause, with all tenses e.g. "why does she walk"
|
||||
IP ; -- interrogative pronoun e.g. "who"
|
||||
IAdv ; -- interrogative adverb e.g. "why"
|
||||
IDet ; -- interrogative determiner e.g. "which"
|
||||
|
||||
VP ; -- verb phrase e.g. "is very warm"
|
||||
Comp ; -- complement of copula, e.g. AP, NP e.g. "very warm"
|
||||
SC ; -- sentential noun phrase: e.g. 'that' clause e.g. "that it rains"
|
||||
--2 Relative clauses and pronouns
|
||||
|
||||
-- Adjectival phrases, constructed in $Adjective$.
|
||||
-- Constructed in [Relative Relative.html].
|
||||
|
||||
AP ; -- adjectival phrase e.g. "very warm"
|
||||
RCl ; -- relative clause, with all tenses e.g. "in which she lives"
|
||||
RP ; -- relative pronoun e.g. "in which"
|
||||
|
||||
-- Nouns and noun phrases, constructed in $Noun$ (many also in $Structural$).
|
||||
--2 Verb phrases
|
||||
|
||||
CN ; -- common noun (needs determiner to make NP) e.g. "red house"
|
||||
NP ; -- noun phrase (usable as subject or object) e.g. "the red house"
|
||||
Pron ; -- personal pronoun e.g. "she"
|
||||
Det ; -- determiner phrase e.g. "all the seven"
|
||||
Predet; -- predeterminer (prefixed to a quantifier) e.g. "all"
|
||||
Quant ; -- quantifier (the 'kernel' of a determiner) e.g. "the"
|
||||
Num ; -- cardinal number (used in a determiner) e.g. "seven"
|
||||
Ord ; -- ordinal number (used in a determiner) e.g. "first"
|
||||
-- Constructed in [Verb Verb.html].
|
||||
|
||||
-- Adverbs, constructed in $Adverb$ (many also in $Structural$).
|
||||
VP ; -- verb phrase e.g. "is very warm"
|
||||
Comp ; -- complement of copula, such as AP e.g. "very warm"
|
||||
SC ; -- embedded sentence or question e.g. "that it rains"
|
||||
|
||||
Adv ; -- verb-phrase-modifying adverb, e.g. "in the house"
|
||||
AdV ; -- sentential adverb, typically close to verb e.g. "always"
|
||||
AdA ; -- adjective-modifying adverb, e.g. "very"
|
||||
AdN ; -- numeral-modifying adverb, e.g. "more than"
|
||||
--2 Adjectival phrases
|
||||
|
||||
-- Numeral with cardinal and ordinal forms, constructed in $Numeral$.
|
||||
-- Constructed in [Adjective Adjective.html].
|
||||
|
||||
Numeral;-- cardinal or ordinal, e.g. "five/fifth"
|
||||
AP ; -- adjectival phrase e.g. "very warm"
|
||||
|
||||
-- Structural words, constructed in $Structural$.
|
||||
--2 Nouns and noun phrases
|
||||
|
||||
Conj ; -- conjunction, e.g. "and"
|
||||
DConj ; -- distributed conj. e.g. "both - and"
|
||||
PConj ; -- phrase-beginning conj. e.g. "therefore"
|
||||
CAdv ; -- comparative adverb e.g. "more"
|
||||
Subj ; -- subjunction, e.g. "if"
|
||||
Prep ; -- preposition, or just a case in some langs e.g. "in"
|
||||
-- Constructed in [Noun Noun.html].
|
||||
-- Many atomic noun phrases e.g. "everybody"
|
||||
-- are constructed in [Structural Structural.html].
|
||||
-- The determiner structure is
|
||||
-- ``` Predet (QuantSg | QuantPl Num) Ord
|
||||
-- as defined in [Noun Noun.html].
|
||||
|
||||
-- Words of open classes, constructed in $Basic$ and in additional lexicon modules.
|
||||
CN ; -- common noun (without determiner) e.g. "red house"
|
||||
NP ; -- noun phrase (subject or object) e.g. "the red house"
|
||||
Pron ; -- personal pronoun e.g. "she"
|
||||
Det ; -- determiner phrase e.g. "all the seven"
|
||||
Predet; -- predeterminer (prefixed Quant) e.g. "all"
|
||||
QuantSg;-- quantifier ('nucleus' of sing. Det) e.g. "this"
|
||||
QuantPl;-- quantifier ('nucleus' of plur. Det) e.g. "these"
|
||||
Num ; -- cardinal number (used with QuantPl) e.g. "seven"
|
||||
Ord ; -- ordinal number (used in Det) e.g. "seventh"
|
||||
|
||||
V ; -- one-place verb e.g. "sleep"
|
||||
V2 ; -- two-place verb e.g. "love"
|
||||
V3 ; -- three-place verb e.g. "show"
|
||||
VV ; -- verb-phrase-complement verb e.g. "want"
|
||||
VS ; -- sentence-complement verb e.g. "claim"
|
||||
VQ ; -- question-complement verb e.g. "ask"
|
||||
VA ; -- adjective-complement verb e.g. "look"
|
||||
V2A ; -- verb with NP and AP complement e.g. "paint"
|
||||
--2 Adverbs
|
||||
|
||||
A ; -- one-place adjective e.g. "warm"
|
||||
A2 ; -- two-place adjective e.g. "divisible"
|
||||
-- Constructed in [Adverb Adverb.html].
|
||||
-- Many adverbs are constructed in [Structural Structural.html].
|
||||
|
||||
N ; -- common noun e.g. "house"
|
||||
N2 ; -- relational noun e.g. "son"
|
||||
N3 ; -- three-place relational noun e.g. "connection"
|
||||
PN ; -- proper name e.g. "Paris"
|
||||
Adv ; -- verb-phrase-modifying adverb, e.g. "in the house"
|
||||
AdV ; -- adverb directly attached to verb e.g. "always"
|
||||
AdA ; -- adjective-modifying adverb, e.g. "very"
|
||||
AdN ; -- numeral-modifying adverb, e.g. "more than"
|
||||
|
||||
--2 Numerals
|
||||
|
||||
-- Constructed in [Numeral Numeral.html].
|
||||
|
||||
Numeral;-- cardinal or ordinal, e.g. "five/fifth"
|
||||
|
||||
--2 Structural words
|
||||
|
||||
-- Constructed in [Structural Structural.html].
|
||||
|
||||
Conj ; -- conjunction, e.g. "and"
|
||||
DConj ; -- distributed conj. e.g. "both - and"
|
||||
PConj ; -- phrase-beginning conj. e.g. "therefore"
|
||||
CAdv ; -- comparative adverb e.g. "more"
|
||||
Subj ; -- subjunction, e.g. "if"
|
||||
Prep ; -- preposition, or just case e.g. "in"
|
||||
|
||||
--2 Words of open classes
|
||||
|
||||
-- These are constructed in [Basic Basic.html] and in additional lexicon modules.
|
||||
|
||||
V ; -- one-place verb e.g. "sleep"
|
||||
V2 ; -- two-place verb e.g. "love"
|
||||
V3 ; -- three-place verb e.g. "show"
|
||||
VV ; -- verb-phrase-complement verb e.g. "want"
|
||||
VS ; -- sentence-complement verb e.g. "claim"
|
||||
VQ ; -- question-complement verb e.g. "ask"
|
||||
VA ; -- adjective-complement verb e.g. "look"
|
||||
V2A ; -- verb with NP and AP complement e.g. "paint"
|
||||
|
||||
A ; -- one-place adjective e.g. "warm"
|
||||
A2 ; -- two-place adjective e.g. "divisible"
|
||||
|
||||
N ; -- common noun e.g. "house"
|
||||
N2 ; -- relational noun e.g. "son"
|
||||
N3 ; -- three-place relational noun e.g. "connection"
|
||||
PN ; -- proper name e.g. "Paris"
|
||||
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ abstract Lex = Cat ** {
|
||||
|
||||
only_Predet, all_Predet : Predet ;
|
||||
|
||||
this_Quant, these_Quant : Quant ;
|
||||
|
||||
this_Quant : QuantSg ;
|
||||
these_Quant : QuantPl ;
|
||||
|
||||
i_Pron, he_Pron, we_Pron : Pron ;
|
||||
|
||||
|
||||
@@ -3,42 +3,115 @@
|
||||
abstract Noun = Cat ** {
|
||||
|
||||
fun
|
||||
DetCN : Det -> CN -> NP ;
|
||||
UsePN : PN -> NP ;
|
||||
UsePron : Pron -> NP ;
|
||||
|
||||
-- Determiner structure à la CLE; we further divide $Num$ into cardinal
|
||||
-- and ordinal/superlative. So we get e.g. "my first forty books".
|
||||
--2 Noun phrases
|
||||
|
||||
MkDet : Predet -> Quant -> Num -> Ord -> Det ;
|
||||
|
||||
PossPronSg, PossPronPl : Pron -> Quant ; --- PossNP not in romance
|
||||
-- The three main types of noun phrases are
|
||||
-- - common nouns with determiners
|
||||
-- - proper names
|
||||
-- - pronouns
|
||||
--
|
||||
--
|
||||
DetCN : Det -> CN -> NP ; -- the man
|
||||
UsePN : PN -> NP ; -- John
|
||||
UsePron : Pron -> NP ; -- he
|
||||
|
||||
NoNum : Num ;
|
||||
NumInt : Int -> Num ;
|
||||
NumNumeral : Numeral -> Num ;
|
||||
-- Pronouns are given in the module [Structural Structural.html].
|
||||
|
||||
AdNum : AdN -> Num -> Num ;
|
||||
|
||||
OrdNumeral : Numeral -> Ord ;
|
||||
|
||||
NoOrd : Ord ;
|
||||
OrdSuperl : A -> Ord ;
|
||||
--2 Determiners
|
||||
|
||||
-- The determiner has a fine-grained structure, in which four
|
||||
-- different optional parts can be discerned. The noun phrase
|
||||
-- "all my first forty books" shows each of these parts.
|
||||
-- The cardinal numeral is only available for plural determiners.
|
||||
-- (This is modified from CLE by further dividing their $Num$ into
|
||||
-- cardinal and ordinal.)
|
||||
|
||||
DetSg : Predet -> QuantSg -> Ord -> Det ;
|
||||
DetPl : Predet -> QuantPl -> Num -> Ord -> Det ;
|
||||
|
||||
-- Pronouns have possessive forms. Genitives of other kinds
|
||||
-- of noun phrases are not given here, since they are not possible
|
||||
-- in e.g. Romance languages.
|
||||
|
||||
PossSg : Pron -> QuantSg ; -- my (house)
|
||||
PossPl : Pron -> QuantPl ; -- my (houses)
|
||||
|
||||
-- All parts of the determiner can be empty, except $Quant$, which is
|
||||
-- the "kernel" of a determiner.
|
||||
|
||||
NoPredet : Predet ;
|
||||
NoNum : Num ;
|
||||
NoOrd : Ord ;
|
||||
|
||||
DefSg, DefPl : Quant ;
|
||||
IndefSg, IndefPl : Quant ;
|
||||
-- $Num$ consists of either digits or numeral words.
|
||||
|
||||
ComplN2 : N2 -> NP -> CN ;
|
||||
ComplN3 : N3 -> NP -> N2 ;
|
||||
NumInt : Int -> Num ; -- 51
|
||||
NumNumeral : Numeral -> Num ; -- fifty-one
|
||||
|
||||
AdjCN : AP -> CN -> CN ;
|
||||
RelCN : CN -> RS -> CN ;
|
||||
-- The construction of numerals is defined in [Numeral Numeral.html].
|
||||
|
||||
SentCN : CN -> S -> CN ;
|
||||
QuestCN : CN -> QS -> CN ;
|
||||
-- $Num$ can be modified by certain adverbs.
|
||||
|
||||
UseN : N -> CN ;
|
||||
AdNum : AdN -> Num -> Num ; -- almost 51
|
||||
|
||||
-- $Ord$ consists of either digits or numeral words.
|
||||
|
||||
OrdInt : Int -> Ord ; -- 51st
|
||||
OrdNumeral : Numeral -> Ord ; -- fifty-first
|
||||
|
||||
-- Superlative forms of adjectives behave syntactically in the same way as
|
||||
-- ordinals.
|
||||
|
||||
OrdSuperl : A -> Ord ; -- largest
|
||||
|
||||
-- Definite and indefinite constructions are sometimes realized as
|
||||
-- neatly distinct words (Spanish "un, unos ; el, los") but also without
|
||||
-- any particular word (Finnish; Swedish definites).
|
||||
|
||||
DefSg : QuantSg ; -- the (house)
|
||||
DefPl : QuantPl ; -- the (houses)
|
||||
IndefSg : QuantSg ; -- a (house)
|
||||
IndefPl : QuantPl ; -- (houses)
|
||||
|
||||
-- Nouns can be used without an article as mass nouns. The resource does
|
||||
-- not distinguish mass nouns from other common nouns, which can result
|
||||
-- in semantically odd expressions.
|
||||
|
||||
MassDet : QuantSg ; -- (beer)
|
||||
|
||||
-- Other determiners are defined in [Structural Structural.html].
|
||||
|
||||
|
||||
|
||||
--2 Common nouns
|
||||
|
||||
-- Simple nouns can be used as nouns outright.
|
||||
|
||||
UseN : N -> CN ; -- house
|
||||
|
||||
-- Relational nouns take one or two arguments.
|
||||
|
||||
ComplN2 : N2 -> NP -> CN ; -- son of the king
|
||||
ComplN3 : N3 -> NP -> N2 ; -- flight from Moscow (to Paris)
|
||||
|
||||
-- Relational nouns can also be used without their arguments.
|
||||
-- The semantics is typically derivative of the relational meaning.
|
||||
|
||||
UseN2 : N2 -> CN ; -- son
|
||||
UseN3 : N3 -> CN ; -- flight
|
||||
|
||||
-- Nouns can be modified by adjectives and relative clauses.
|
||||
|
||||
AdjCN : AP -> CN -> CN ; -- big house
|
||||
RelCN : CN -> RS -> CN ; -- house that John owns
|
||||
|
||||
-- Nouns can also be modified by embedded sentences and questions.
|
||||
-- For some nouns this makes little sense, but we leave this for applications
|
||||
-- to decide.
|
||||
|
||||
SentCN : CN -> S -> CN ; -- fact that John smokes
|
||||
QuestCN : CN -> QS -> CN ; -- question whether John smokes
|
||||
|
||||
} ;
|
||||
|
||||
@@ -74,20 +74,20 @@ abstract Structural = Cat ** {
|
||||
somebody_NP : NP ;
|
||||
something_NP : NP ;
|
||||
somewhere_Adv : Adv ;
|
||||
that_Quant : Quant ; -- Det
|
||||
that_Quant : QuantSg ; -- Det
|
||||
that_NP : NP ;
|
||||
there_Adv : Adv ; --
|
||||
there7to_Adv : Adv ; --
|
||||
there7from_Adv : Adv ; --
|
||||
therefore_PConj : PConj ; -- AdC
|
||||
these_NP : NP ; --
|
||||
these_Quant : Quant ; -- NDet
|
||||
these_Quant : QuantPl ; -- NDet
|
||||
-- they8fem_NP : NP ;
|
||||
they_Pron : Pron ; -- NP
|
||||
this_Quant : Quant ; -- NDet
|
||||
this_Quant : QuantSg ; -- NDet
|
||||
this_NP : NP ;
|
||||
those_NP : NP ; --
|
||||
those_Quant : Quant ; -- NDet
|
||||
those_Quant : QuantPl ; -- NDet
|
||||
thou_Pron : Pron ; -- NP
|
||||
through_Prep : Prep ;
|
||||
to_Prep : Prep ;
|
||||
|
||||
63
lib/resource-1.0/doc/gfdoc/Adjective.html
Normal file
63
lib/resource-1.0/doc/gfdoc/Adjective.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:50 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Adjective = Cat ** {
|
||||
|
||||
fun
|
||||
|
||||
PositA : A -> AP ;
|
||||
ComparA : A -> NP -> AP ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
<CODE>SuperlA</CODE> belongs to determiner syntax in <CODE>Noun</CODE>.
|
||||
</P>
|
||||
<PRE>
|
||||
ComplA2 : A2 -> NP -> AP ;
|
||||
|
||||
ReflA2 : A2 -> AP ;
|
||||
|
||||
SentAP : AP -> S -> AP ;
|
||||
QuestAP : AP -> QS -> AP ;
|
||||
|
||||
AdAP : AdA -> AP -> AP ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
<CODE>AdvA</CODE> that forms adverbs belongs to <CODE>Adverb</CODE>.
|
||||
Elliptic constructions as usual.
|
||||
</P>
|
||||
<PRE>
|
||||
UseA2 : A2 -> A ;
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Adjective.txt -->
|
||||
</BODY></HTML>
|
||||
51
lib/resource-1.0/doc/gfdoc/Adverb.html
Normal file
51
lib/resource-1.0/doc/gfdoc/Adverb.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:50 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Adverb = Cat ** {
|
||||
|
||||
fun
|
||||
|
||||
PositAdvAdj : A -> Adv ;
|
||||
ComparAdvAdj : CAdv -> A -> NP -> Adv ;
|
||||
ComparAdvAdjS : CAdv -> A -> S -> Adv ;
|
||||
|
||||
PrepNP : Prep -> NP -> Adv ;
|
||||
|
||||
AdAdv : AdA -> Adv -> Adv ;
|
||||
|
||||
SubjS : Subj -> S -> Adv ;
|
||||
AdvSC : SC -> Adv ;
|
||||
|
||||
AdnCAdv : CAdv -> AdN ;
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Adverb.txt -->
|
||||
</BODY></HTML>
|
||||
256
lib/resource-1.0/doc/gfdoc/Basic.html
Normal file
256
lib/resource-1.0/doc/gfdoc/Basic.html
Normal file
@@ -0,0 +1,256 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:50 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Basic = Cat ** {
|
||||
fun
|
||||
airplane_N : N ;
|
||||
answer_V2S : V2 ;
|
||||
apartment_N : N ;
|
||||
apple_N : N ;
|
||||
art_N : N ;
|
||||
ask_V2Q : V2 ;
|
||||
baby_N : N ;
|
||||
bad_A : A ;
|
||||
bank_N : N ;
|
||||
beautiful_A : A ;
|
||||
become_VA : VA ;
|
||||
beer_N : N ;
|
||||
beg_V2V : V2 ;
|
||||
big_A : A ;
|
||||
bike_N : N ;
|
||||
bird_N : N ;
|
||||
black_A : A ;
|
||||
blue_A : A ;
|
||||
boat_N : N ;
|
||||
book_N : N ;
|
||||
boot_N : N ;
|
||||
boss_N : N ;
|
||||
boy_N : N ;
|
||||
bread_N : N ;
|
||||
break_V2 : V2 ;
|
||||
broad_A : A ;
|
||||
brother_N2 : N2 ;
|
||||
brown_A : A ;
|
||||
butter_N : N ;
|
||||
buy_V2 : V2 ;
|
||||
camera_N : N ;
|
||||
cap_N : N ;
|
||||
car_N : N ;
|
||||
carpet_N : N ;
|
||||
cat_N : N ;
|
||||
ceiling_N : N ;
|
||||
chair_N : N ;
|
||||
cheese_N : N ;
|
||||
child_N : N ;
|
||||
church_N : N ;
|
||||
city_N : N ;
|
||||
clean_A : A ;
|
||||
clever_A : A ;
|
||||
close_V2 : V2 ;
|
||||
coat_N : N ;
|
||||
cold_A : A ;
|
||||
come_V : V ;
|
||||
computer_N : N ;
|
||||
country_N : N ;
|
||||
cousin_N : N ;
|
||||
cow_N : N ;
|
||||
die_V : V ;
|
||||
dirty_A : A ;
|
||||
distance_N3 : N3 ;
|
||||
doctor_N : N ;
|
||||
dog_N : N ;
|
||||
door_N : N ;
|
||||
drink_V2 : V2 ;
|
||||
easy_A2V : A2 ;
|
||||
eat_V2 : V2 ;
|
||||
enemy_N : N ;
|
||||
empty_A : A ;
|
||||
factory_N : N ;
|
||||
father_N2 : N2 ;
|
||||
fear_VS : VS ;
|
||||
find_V2 : V2 ;
|
||||
fish_N : N ;
|
||||
floor_N : N ;
|
||||
forget_V2 : V2 ;
|
||||
fridge_N : N ;
|
||||
friend_N : N ;
|
||||
fruit_N : N ;
|
||||
fun_AV : A ;
|
||||
garden_N : N ;
|
||||
girl_N : N ;
|
||||
glove_N : N ;
|
||||
gold_N : N ;
|
||||
good_A : A ;
|
||||
go_V : V ;
|
||||
green_A : A ;
|
||||
harbour_N : N ;
|
||||
hate_V2 : V2 ;
|
||||
hat_N : N ;
|
||||
have_V2 : V2 ;
|
||||
hear_V2 : V2 ;
|
||||
hill_N : N ;
|
||||
hope_VS : VS ;
|
||||
horse_N : N ;
|
||||
hot_A : A ;
|
||||
house_N : N ;
|
||||
important_A : A ;
|
||||
industry_N : N ;
|
||||
iron_N : N ;
|
||||
king_N : N ;
|
||||
know_V2 : V2 ;
|
||||
lake_N : N ;
|
||||
lamp_N : N ;
|
||||
learn_V2 : V2 ;
|
||||
leather_N : N ;
|
||||
leave_V2 : V2 ;
|
||||
like_V2 : V2 ;
|
||||
listen_V2 : V2 ;
|
||||
live_V : V ;
|
||||
long_A : A ;
|
||||
lose_V2 : V2 ;
|
||||
love_N : N ;
|
||||
love_V2 : V2 ;
|
||||
man_N : N ;
|
||||
married_A2 : A2 ;
|
||||
meat_N : N ;
|
||||
milk_N : N ;
|
||||
moon_N : N ;
|
||||
mother_N2 : N2 ;
|
||||
mountain_N : N ;
|
||||
music_N : N ;
|
||||
narrow_A : A ;
|
||||
new_A : A ;
|
||||
newspaper_N : N ;
|
||||
oil_N : N ;
|
||||
old_A : A ;
|
||||
open_V2 : V2 ;
|
||||
paint_V2A : V2A ;
|
||||
paper_N : N ;
|
||||
peace_N : N ;
|
||||
pen_N : N ;
|
||||
planet_N : N ;
|
||||
plastic_N : N ;
|
||||
play_V2 : V2 ;
|
||||
policeman_N : N ;
|
||||
priest_N : N ;
|
||||
probable_AS : A ;
|
||||
queen_N : N ;
|
||||
radio_N : N ;
|
||||
rain_V0 : V ;
|
||||
read_V2 : V2 ;
|
||||
red_A : A ;
|
||||
religion_N : N ;
|
||||
restaurant_N : N ;
|
||||
river_N : N ;
|
||||
rock_N : N ;
|
||||
roof_N : N ;
|
||||
rubber_N : N ;
|
||||
run_V : V ;
|
||||
say_VS : VS ;
|
||||
school_N : N ;
|
||||
science_N : N ;
|
||||
sea_N : N ;
|
||||
seek_V2 : V2 ;
|
||||
see_V2 : V2 ;
|
||||
sell_V3 : V3 ;
|
||||
send_V3 : V3 ;
|
||||
sheep_N : N ;
|
||||
ship_N : N ;
|
||||
shirt_N : N ;
|
||||
shoe_N : N ;
|
||||
shop_N : N ;
|
||||
short_A : A ;
|
||||
silver_N : N ;
|
||||
sister_N : N ;
|
||||
sleep_V : V ;
|
||||
small_A : A ;
|
||||
snake_N : N ;
|
||||
sock_N : N ;
|
||||
speak_V2 : V2 ;
|
||||
star_N : N ;
|
||||
steel_N : N ;
|
||||
stone_N : N ;
|
||||
stove_N : N ;
|
||||
student_N : N ;
|
||||
stupid_A : A ;
|
||||
sun_N : N ;
|
||||
switch8off_V2 : V2 ;
|
||||
switch8on_V2 : V2 ;
|
||||
table_N : N ;
|
||||
talk_V3 : V3 ;
|
||||
teacher_N : N ;
|
||||
teach_V2 : V2 ;
|
||||
television_N : N ;
|
||||
thick_A : A ;
|
||||
thin_A : A ;
|
||||
train_N : N ;
|
||||
travel_V : V ;
|
||||
tree_N : N ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
-- trousers_N : N ;
|
||||
</P>
|
||||
<PRE>
|
||||
ugly_A : A ;
|
||||
understand_V2 : V2 ;
|
||||
university_N : N ;
|
||||
village_N : N ;
|
||||
wait_V2 : V2 ;
|
||||
walk_V : V ;
|
||||
warm_A : A ;
|
||||
war_N : N ;
|
||||
watch_V2 : V2 ;
|
||||
water_N : N ;
|
||||
white_A : A ;
|
||||
window_N : N ;
|
||||
wine_N : N ;
|
||||
win_V2 : V2 ;
|
||||
woman_N : N ;
|
||||
wonder_VQ : VQ ;
|
||||
wood_N : N ;
|
||||
write_V2 : V2 ;
|
||||
yellow_A : A ;
|
||||
young_A : A ;
|
||||
|
||||
do_V2 : V2 ;
|
||||
now_Adv : Adv ;
|
||||
already_Adv : Adv ;
|
||||
song_N : N ;
|
||||
add_V3 : V3 ;
|
||||
number_N : N ;
|
||||
put_V2 : V2 ;
|
||||
stop_V : V ;
|
||||
jump_V : V ;
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Basic.txt -->
|
||||
</BODY></HTML>
|
||||
218
lib/resource-1.0/doc/gfdoc/Cat.html
Normal file
218
lib/resource-1.0/doc/gfdoc/Cat.html
Normal file
@@ -0,0 +1,218 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
<TITLE> The category system</TITLE>
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<P ALIGN="center"><CENTER><H1> The category system</H1>
|
||||
<FONT SIZE="4">
|
||||
<I>Author: </I><BR>
|
||||
Last update: Tue Jan 10 16:38:50 2006
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<UL>
|
||||
<LI><A HREF="#toc1">The category system</A>
|
||||
<UL>
|
||||
<LI><A HREF="#toc2">Top-level units</A>
|
||||
<LI><A HREF="#toc3">Tensed sentences</A>
|
||||
<LI><A HREF="#toc4">Clauses</A>
|
||||
<LI><A HREF="#toc5">Questions and interrogatives</A>
|
||||
<LI><A HREF="#toc6">Relative clauses and pronouns</A>
|
||||
<LI><A HREF="#toc7">Verb phrases</A>
|
||||
<LI><A HREF="#toc8">Adjectival phrases</A>
|
||||
<LI><A HREF="#toc9">Nouns and noun phrases</A>
|
||||
<LI><A HREF="#toc10">Adverbs</A>
|
||||
<LI><A HREF="#toc11">Numerals</A>
|
||||
<LI><A HREF="#toc12">Structural words</A>
|
||||
<LI><A HREF="#toc13">Words of open classes</A>
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<A NAME="toc1"></A>
|
||||
<H1>The category system</H1>
|
||||
<PRE>
|
||||
abstract Cat = {
|
||||
|
||||
cat
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc2"></A>
|
||||
<H2>Top-level units</H2>
|
||||
<P>
|
||||
Constructed in <A HREF="Phrase.html">Phrase</A>.
|
||||
</P>
|
||||
<PRE>
|
||||
Text ; -- text consisting of several phrases
|
||||
Phr ; -- phrase in a text e.g. "But be quiet my darling."
|
||||
Utt ; -- sentence, question, word... e.g. "be quiet"
|
||||
Voc ; -- vocative or "please" e.g. "my darling"
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc3"></A>
|
||||
<H2>Tensed sentences</H2>
|
||||
<P>
|
||||
Constructed in <A HREF="Tensed.html">Tensed</A>.
|
||||
A simplified variant, with just present forms, is <A HREF="Untensed.html">Untensed</A>.
|
||||
</P>
|
||||
<PRE>
|
||||
S ; -- declarative sentence e.g. "she lived here"
|
||||
QS ; -- question e.g. "where did she live"
|
||||
RS ; -- relative e.g. "in which she lived"
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc4"></A>
|
||||
<H2>Clauses</H2>
|
||||
<P>
|
||||
Constructed in <A HREF="Sentence.html">Sentence</A>.
|
||||
</P>
|
||||
<PRE>
|
||||
Cl ; -- declarative clause, with all tenses e.g. "she looks at this"
|
||||
Slash ; -- clause missing NP (S/NP in GPSG) e.g. "she looks at"
|
||||
Imp ; -- imperative e.g. "look at this"
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc5"></A>
|
||||
<H2>Questions and interrogatives</H2>
|
||||
<P>
|
||||
Constructed in <A HREF="Question.html">Question</A>.
|
||||
</P>
|
||||
<PRE>
|
||||
QCl ; -- question clause, with all tenses e.g. "why does she walk"
|
||||
IP ; -- interrogative pronoun e.g. "who"
|
||||
IAdv ; -- interrogative adverb e.g. "why"
|
||||
IDet ; -- interrogative determiner e.g. "which"
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc6"></A>
|
||||
<H2>Relative clauses and pronouns</H2>
|
||||
<P>
|
||||
Constructed in <A HREF="Relative.html">Relative</A>.
|
||||
</P>
|
||||
<PRE>
|
||||
RCl ; -- relative clause, with all tenses e.g. "in which she lives"
|
||||
RP ; -- relative pronoun e.g. "in which"
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc7"></A>
|
||||
<H2>Verb phrases</H2>
|
||||
<P>
|
||||
Constructed in <A HREF="Verb.html">Verb</A>.
|
||||
</P>
|
||||
<PRE>
|
||||
VP ; -- verb phrase e.g. "is very warm"
|
||||
Comp ; -- complement of copula, such as AP e.g. "very warm"
|
||||
SC ; -- embedded sentence or question e.g. "that it rains"
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc8"></A>
|
||||
<H2>Adjectival phrases</H2>
|
||||
<P>
|
||||
Constructed in <A HREF="Adjective.html">Adjective</A>.
|
||||
</P>
|
||||
<PRE>
|
||||
AP ; -- adjectival phrase e.g. "very warm"
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc9"></A>
|
||||
<H2>Nouns and noun phrases</H2>
|
||||
<P>
|
||||
Constructed in <A HREF="Noun.html">Noun</A>.
|
||||
Many atomic noun phrases e.g. <I>everybody</I>
|
||||
are constructed in <A HREF="Structural.html">Structural</A>.
|
||||
The determiner structure is
|
||||
</P>
|
||||
<PRE>
|
||||
Predet (QuantSg | QuantPl Num) Ord
|
||||
</PRE>
|
||||
<P>
|
||||
as defined in <A HREF="Noun.html">Noun</A>.
|
||||
</P>
|
||||
<PRE>
|
||||
CN ; -- common noun (without determiner) e.g. "red house"
|
||||
NP ; -- noun phrase (subject or object) e.g. "the red house"
|
||||
Pron ; -- personal pronoun e.g. "she"
|
||||
Det ; -- determiner phrase e.g. "all the seven"
|
||||
Predet; -- predeterminer (prefixed Quant) e.g. "all"
|
||||
QuantSg;-- quantifier ('nucleus' of sing. Det) e.g. "this"
|
||||
QuantPl;-- quantifier ('nucleus' of plur. Det) e.g. "these"
|
||||
Num ; -- cardinal number (used with QuantPl) e.g. "seven"
|
||||
Ord ; -- ordinal number (used in Det) e.g. "seventh"
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc10"></A>
|
||||
<H2>Adverbs</H2>
|
||||
<P>
|
||||
Constructed in <A HREF="Adverb.html">Adverb</A>.
|
||||
Many adverbs are constructed in <A HREF="Structural.html">Structural</A>.
|
||||
</P>
|
||||
<PRE>
|
||||
Adv ; -- verb-phrase-modifying adverb, e.g. "in the house"
|
||||
AdV ; -- adverb directly attached to verb e.g. "always"
|
||||
AdA ; -- adjective-modifying adverb, e.g. "very"
|
||||
AdN ; -- numeral-modifying adverb, e.g. "more than"
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc11"></A>
|
||||
<H2>Numerals</H2>
|
||||
<P>
|
||||
Constructed in <A HREF="Numeral.html">Numeral</A>.
|
||||
</P>
|
||||
<PRE>
|
||||
Numeral;-- cardinal or ordinal, e.g. "five/fifth"
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc12"></A>
|
||||
<H2>Structural words</H2>
|
||||
<P>
|
||||
Constructed in <A HREF="Structural.html">Structural</A>.
|
||||
</P>
|
||||
<PRE>
|
||||
Conj ; -- conjunction, e.g. "and"
|
||||
DConj ; -- distributed conj. e.g. "both - and"
|
||||
PConj ; -- phrase-beginning conj. e.g. "therefore"
|
||||
CAdv ; -- comparative adverb e.g. "more"
|
||||
Subj ; -- subjunction, e.g. "if"
|
||||
Prep ; -- preposition, or just case e.g. "in"
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc13"></A>
|
||||
<H2>Words of open classes</H2>
|
||||
<P>
|
||||
These are constructed in <A HREF="Basic.html">Basic</A> and in additional lexicon modules.
|
||||
</P>
|
||||
<PRE>
|
||||
V ; -- one-place verb e.g. "sleep"
|
||||
V2 ; -- two-place verb e.g. "love"
|
||||
V3 ; -- three-place verb e.g. "show"
|
||||
VV ; -- verb-phrase-complement verb e.g. "want"
|
||||
VS ; -- sentence-complement verb e.g. "claim"
|
||||
VQ ; -- question-complement verb e.g. "ask"
|
||||
VA ; -- adjective-complement verb e.g. "look"
|
||||
V2A ; -- verb with NP and AP complement e.g. "paint"
|
||||
|
||||
A ; -- one-place adjective e.g. "warm"
|
||||
A2 ; -- two-place adjective e.g. "divisible"
|
||||
|
||||
N ; -- common noun e.g. "house"
|
||||
N2 ; -- relational noun e.g. "son"
|
||||
N3 ; -- three-place relational noun e.g. "connection"
|
||||
PN ; -- proper name e.g. "Paris"
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Cat.txt -->
|
||||
</BODY></HTML>
|
||||
59
lib/resource-1.0/doc/gfdoc/Conjunction.html
Normal file
59
lib/resource-1.0/doc/gfdoc/Conjunction.html
Normal file
@@ -0,0 +1,59 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:50 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Conjunction = Cat ** {
|
||||
|
||||
fun
|
||||
|
||||
ConjS : Conj -> [S] -> S ; -- "John walks and Mary runs"
|
||||
ConjAP : Conj -> [AP] -> AP ; -- "even and prime"
|
||||
ConjNP : Conj -> [NP] -> NP ; -- "John or Mary"
|
||||
ConjAdv : Conj -> [Adv] -> Adv ; -- "quickly or slowly"
|
||||
|
||||
DConjS : DConj -> [S] -> S ; -- "either John walks or Mary runs"
|
||||
DConjAP : DConj -> [AP] -> AP ; -- "both even and prime"
|
||||
DConjNP : DConj -> [NP] -> NP ; -- "either John or Mary"
|
||||
DConjAdv : DConj -> [Adv] -> Adv ; -- "both badly and slowly"
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
These categories are internal to this module.
|
||||
</P>
|
||||
<PRE>
|
||||
cat
|
||||
[S]{2} ;
|
||||
[Adv]{2} ;
|
||||
[NP]{2} ;
|
||||
[AP]{2} ;
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Conjunction.txt -->
|
||||
</BODY></HTML>
|
||||
48
lib/resource-1.0/doc/gfdoc/Lang.html
Normal file
48
lib/resource-1.0/doc/gfdoc/Lang.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:50 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Lang =
|
||||
Noun,
|
||||
Verb,
|
||||
Adjective,
|
||||
Adverb,
|
||||
Numeral,
|
||||
Sentence,
|
||||
Question,
|
||||
Relative,
|
||||
Conjunction,
|
||||
Phrase,
|
||||
Tensed,
|
||||
Structural,
|
||||
Basic
|
||||
** {} ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Lang.txt -->
|
||||
</BODY></HTML>
|
||||
89
lib/resource-1.0/doc/gfdoc/Lex.html
Normal file
89
lib/resource-1.0/doc/gfdoc/Lex.html
Normal file
@@ -0,0 +1,89 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:50 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Lex = Cat ** {
|
||||
|
||||
fun
|
||||
walk_V : V ;
|
||||
help_V2 : V2 ;
|
||||
show_V3 : V3 ;
|
||||
want_VV : VV ;
|
||||
claim_VS : VS ;
|
||||
ask_VQ : VQ ;
|
||||
|
||||
dog_N : N ;
|
||||
son_N2 : N2 ;
|
||||
way_N3 : N3 ;
|
||||
|
||||
warm_A : A ;
|
||||
close_A2 : A2 ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
structural
|
||||
</P>
|
||||
<PRE>
|
||||
only_Predet, all_Predet : Predet ;
|
||||
|
||||
this_Quant : QuantSg ;
|
||||
these_Quant : QuantPl ;
|
||||
|
||||
i_Pron, he_Pron, we_Pron : Pron ;
|
||||
|
||||
whoSg_IP, whoPl_IP : IP ;
|
||||
|
||||
when_IAdv, where_IAdv, why_IAdv : IAdv ;
|
||||
|
||||
whichSg_IDet, whichPl_IDet : IDet ;
|
||||
|
||||
here_Adv : Adv ;
|
||||
|
||||
very_AdA : AdA ;
|
||||
|
||||
always_AdV : AdV ;
|
||||
|
||||
one_Numeral, forty_Numeral : Numeral ;
|
||||
|
||||
in_Prep, of_Prep : Prep ;
|
||||
|
||||
and_Conj : Conj ;
|
||||
either7or_DConj : DConj ;
|
||||
|
||||
but_PConj : PConj ;
|
||||
|
||||
if_Subj, because_Subj : Subj ;
|
||||
|
||||
please_Voc : Voc ;
|
||||
|
||||
more_CAdv, less_CAdv : CAdv ;
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Lex.txt -->
|
||||
</BODY></HTML>
|
||||
59
lib/resource-1.0/doc/gfdoc/ListConjunction.html
Normal file
59
lib/resource-1.0/doc/gfdoc/ListConjunction.html
Normal file
@@ -0,0 +1,59 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:51 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract ListConjunction = Cat ** {
|
||||
|
||||
fun
|
||||
|
||||
ConjS : Conj -> [S] -> S ; -- "John walks and Mary runs"
|
||||
ConjAP : Conj -> [AP] -> AP ; -- "even and prime"
|
||||
ConjNP : Conj -> [NP] -> NP ; -- "John or Mary"
|
||||
ConjAdv : Conj -> [Adv] -> Adv ; -- "quickly or slowly"
|
||||
|
||||
DConjS : DConj -> [S] -> S ; -- "either John walks or Mary runs"
|
||||
DConjAP : DConj -> [AP] -> AP ; -- "both even and prime"
|
||||
DConjNP : DConj -> [NP] -> NP ; -- "either John or Mary"
|
||||
DConjAdv : DConj -> [Adv] -> Adv ; -- "both badly and slowly"
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
These categories are internal to this module.
|
||||
</P>
|
||||
<PRE>
|
||||
cat
|
||||
[S]{2} ;
|
||||
[Adv]{2} ;
|
||||
[NP]{2} ;
|
||||
[AP]{2} ;
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/ListConjunction.txt -->
|
||||
</BODY></HTML>
|
||||
68
lib/resource-1.0/doc/gfdoc/Math.html
Normal file
68
lib/resource-1.0/doc/gfdoc/Math.html
Normal file
@@ -0,0 +1,68 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<UL>
|
||||
<LI><A HREF="#toc1">Noun phrases with symbols</A>
|
||||
<LI><A HREF="#toc2">Symbol lists</A>
|
||||
</UL>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:51 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Math = Cat ** {
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc1"></A>
|
||||
<H3>Noun phrases with symbols</H3>
|
||||
<PRE>
|
||||
fun
|
||||
|
||||
SymbPN : Symb -> PN ; -- "x"
|
||||
IntPN : Int -> PN ; -- "27"
|
||||
CNIntNP : CN -> Int -> NP ; -- "level 53"
|
||||
CNSymbNP : Det -> CN -> [Symb] -> NP ; -- "(the) (2) numbers x and y"
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc2"></A>
|
||||
<H3>Symbol lists</H3>
|
||||
<P>
|
||||
A symbol list has at least two elements. The last two are separated
|
||||
by a conjunction (<I>and</I> in English), the others by commas.
|
||||
This produces <I>x, y and z</I>, in English.
|
||||
</P>
|
||||
<PRE>
|
||||
cat
|
||||
Symb ;
|
||||
[Symb]{2} ;
|
||||
|
||||
fun
|
||||
MkSymb : String -> Symb ;
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Math.txt -->
|
||||
</BODY></HTML>
|
||||
201
lib/resource-1.0/doc/gfdoc/Noun.html
Normal file
201
lib/resource-1.0/doc/gfdoc/Noun.html
Normal file
@@ -0,0 +1,201 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
<TITLE> The construction of nouns, noun phrases, and determiners</TITLE>
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<P ALIGN="center"><CENTER><H1> The construction of nouns, noun phrases, and determiners</H1>
|
||||
<FONT SIZE="4">
|
||||
<I>Author: </I><BR>
|
||||
Last update: Tue Jan 10 16:38:51 2006
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<UL>
|
||||
<LI><A HREF="#toc1">The construction of nouns, noun phrases, and determiners</A>
|
||||
<UL>
|
||||
<LI><A HREF="#toc2">Noun phrases</A>
|
||||
<LI><A HREF="#toc3">Determiners</A>
|
||||
<LI><A HREF="#toc4">Common nouns</A>
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<A NAME="toc1"></A>
|
||||
<H1>The construction of nouns, noun phrases, and determiners</H1>
|
||||
<PRE>
|
||||
abstract Noun = Cat ** {
|
||||
|
||||
fun
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc2"></A>
|
||||
<H2>Noun phrases</H2>
|
||||
<P>
|
||||
The three main types of noun phrases are
|
||||
</P>
|
||||
<UL>
|
||||
<LI>common nouns with determiners
|
||||
<LI>proper names
|
||||
<LI>pronouns
|
||||
</UL>
|
||||
|
||||
<PRE>
|
||||
DetCN : Det -> CN -> NP ; -- the man
|
||||
UsePN : PN -> NP ; -- John
|
||||
UsePron : Pron -> NP ; -- he
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Pronouns are given in the module <A HREF="Structural.html">Structural</A>.
|
||||
</P>
|
||||
<A NAME="toc3"></A>
|
||||
<H2>Determiners</H2>
|
||||
<P>
|
||||
The determiner has a fine-grained structure, in which four
|
||||
different optional parts can be discerned. The noun phrase
|
||||
<I>all my first forty books</I> shows each of these parts.
|
||||
The cardinal numeral is only available for plural determiners.
|
||||
(This is modified from CLE by further dividing their <CODE>Num</CODE> into
|
||||
cardinal and ordinal.)
|
||||
</P>
|
||||
<PRE>
|
||||
DetSg : Predet -> QuantSg -> Ord -> Det ;
|
||||
DetPl : Predet -> QuantPl -> Num -> Ord -> Det ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Pronouns have possessive forms. Genitives of other kinds
|
||||
of noun phrases are not given here, since they are not possible
|
||||
in e.g. Romance languages.
|
||||
</P>
|
||||
<PRE>
|
||||
PossSg : Pron -> QuantSg ; -- my (house)
|
||||
PossPl : Pron -> QuantPl ; -- my (houses)
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
All parts of the determiner can be empty, except <CODE>Quant</CODE>, which is
|
||||
the <I>kernel</I> of a determiner.
|
||||
</P>
|
||||
<PRE>
|
||||
NoPredet : Predet ;
|
||||
NoNum : Num ;
|
||||
NoOrd : Ord ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
<CODE>Num</CODE> consists of either digits or numeral words.
|
||||
</P>
|
||||
<PRE>
|
||||
NumInt : Int -> Num ; -- 51
|
||||
NumNumeral : Numeral -> Num ; -- fifty-one
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
The construction of numerals is defined in <A HREF="Numeral.html">Numeral</A>.
|
||||
<CODE>Num</CODE> can be modified by certain adverbs.
|
||||
</P>
|
||||
<PRE>
|
||||
AdNum : AdN -> Num -> Num ; -- almost 51
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
<CODE>Ord</CODE> consists of either digits or numeral words.
|
||||
</P>
|
||||
<PRE>
|
||||
OrdInt : Int -> Ord ; -- 51st
|
||||
OrdNumeral : Numeral -> Ord ; -- fifty-first
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Superlative forms of adjectives behave syntactically in the same way as
|
||||
ordinals.
|
||||
</P>
|
||||
<PRE>
|
||||
OrdSuperl : A -> Ord ; -- largest
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Definite and indefinite constructions are sometimes realized as
|
||||
neatly distinct words (Spanish <I>un, unos ; el, los</I>) but also without
|
||||
any particular word (Finnish; Swedish definites).
|
||||
</P>
|
||||
<PRE>
|
||||
DefSg : QuantSg ; -- the (house)
|
||||
DefPl : QuantPl ; -- the (houses)
|
||||
IndefSg : QuantSg ; -- a (house)
|
||||
IndefPl : QuantPl ; -- (houses)
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Nouns can be used without an article as mass nouns. The resource does
|
||||
not distinguish mass nouns from other common nouns, which can result
|
||||
in semantically odd expressions.
|
||||
</P>
|
||||
<PRE>
|
||||
MassDet : QuantSg ; -- (beer)
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Other determiners are defined in <A HREF="Structural.html">Structural</A>.
|
||||
</P>
|
||||
<A NAME="toc4"></A>
|
||||
<H2>Common nouns</H2>
|
||||
<P>
|
||||
Simple nouns can be used as nouns outright.
|
||||
</P>
|
||||
<PRE>
|
||||
UseN : N -> CN ; -- house
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Relational nouns take one or two arguments.
|
||||
</P>
|
||||
<PRE>
|
||||
ComplN2 : N2 -> NP -> CN ; -- son of the king
|
||||
ComplN3 : N3 -> NP -> N2 ; -- flight from Moscow (to Paris)
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Relational nouns can also be used without their arguments.
|
||||
The semantics is typically derivative of the relational meaning.
|
||||
</P>
|
||||
<PRE>
|
||||
UseN2 : N2 -> CN ; -- son
|
||||
UseN3 : N3 -> CN ; -- flight
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Nouns can be modified by adjectives and relative clauses.
|
||||
</P>
|
||||
<PRE>
|
||||
AdjCN : AP -> CN -> CN ; -- big house
|
||||
RelCN : CN -> RS -> CN ; -- house that John owns
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Nouns can also be modified by embedded sentences and questions.
|
||||
For some nouns this makes little sense, but we leave this for applications
|
||||
to decide.
|
||||
</P>
|
||||
<PRE>
|
||||
SentCN : CN -> S -> CN ; -- fact that John smokes
|
||||
QuestCN : CN -> QS -> CN ; -- question whether John smokes
|
||||
|
||||
} ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Noun.txt -->
|
||||
</BODY></HTML>
|
||||
65
lib/resource-1.0/doc/gfdoc/Numeral.html
Normal file
65
lib/resource-1.0/doc/gfdoc/Numeral.html
Normal file
@@ -0,0 +1,65 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:51 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<P>
|
||||
numerals from 1 to 999999 in decimal notation
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Numeral = Cat ** {
|
||||
|
||||
cat
|
||||
Digit ; -- 2..9
|
||||
Sub10 ; -- 1..9
|
||||
Sub100 ; -- 1..99
|
||||
Sub1000 ; -- 1..999
|
||||
Sub1000000 ; -- 1..999999
|
||||
|
||||
fun
|
||||
num : Sub1000000 -> Numeral ;
|
||||
|
||||
n2, n3, n4, n5, n6, n7, n8, n9 : Digit ;
|
||||
|
||||
pot01 : Sub10 ; -- 1
|
||||
pot0 : Digit -> Sub10 ; -- d * 1
|
||||
pot110 : Sub100 ; -- 10
|
||||
pot111 : Sub100 ; -- 11
|
||||
pot1to19 : Digit -> Sub100 ; -- 10 + d
|
||||
pot0as1 : Sub10 -> Sub100 ; -- coercion of 1..9
|
||||
pot1 : Digit -> Sub100 ; -- d * 10
|
||||
pot1plus : Digit -> Sub10 -> Sub100 ; -- d * 10 + n
|
||||
pot1as2 : Sub100 -> Sub1000 ; -- coercion of 1..99
|
||||
pot2 : Sub10 -> Sub1000 ; -- m * 100
|
||||
pot2plus : Sub10 -> Sub100 -> Sub1000 ; -- m * 100 + n
|
||||
pot2as3 : Sub1000 -> Sub1000000 ; -- coercion of 1..999
|
||||
pot3 : Sub1000 -> Sub1000000 ; -- m * 1000
|
||||
pot3plus : Sub1000 -> Sub1000 -> Sub1000000 ; -- m * 1000 + n
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Numeral.txt -->
|
||||
</BODY></HTML>
|
||||
595
lib/resource-1.0/doc/gfdoc/ParadigmsDut.html
Normal file
595
lib/resource-1.0/doc/gfdoc/ParadigmsDut.html
Normal file
@@ -0,0 +1,595 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:53 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<P>
|
||||
--# -path=.:../abstract:../../prelude
|
||||
</P>
|
||||
<P>
|
||||
--1 Dutlish Lexical Paradigms
|
||||
--
|
||||
-- Aarne Ranta 2003--2005
|
||||
--
|
||||
-- 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, <CODE>Structural.gf</CODE>.
|
||||
--
|
||||
-- The main difference with <CODE>MorphoDut.gf</CODE> 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 <CODE>C</CODE> is the following:
|
||||
-- first we give a handful of patterns that aim to cover all
|
||||
-- regular cases. Then we give a worst-case function <CODE>mkC</CODE>, which serves as an
|
||||
-- escape to construct the most irregular words of type <CODE>C</CODE>.
|
||||
-- However, this function should only seldom be needed: we have a
|
||||
-- separate module <CODE>IrregularDut</CODE>, which covers all irregularly inflected
|
||||
-- words.
|
||||
--
|
||||
-- The following modules are presupposed:
|
||||
</P>
|
||||
<P>
|
||||
resource ParadigmsDut = open
|
||||
(Predef=Predef),
|
||||
Prelude,
|
||||
MorphoDut,
|
||||
CatDut
|
||||
in {
|
||||
--2 Parameters
|
||||
--
|
||||
-- To abstract over gender names, we define the following identifiers.
|
||||
</P>
|
||||
<P>
|
||||
oper
|
||||
Gender : Type ;
|
||||
</P>
|
||||
<P>
|
||||
human : Gender ;
|
||||
nonhuman : Gender ;
|
||||
masculine : Gender ;
|
||||
feminite : Gender ;
|
||||
</P>
|
||||
<P>
|
||||
-- To abstract over number names, we define the following.
|
||||
</P>
|
||||
<P>
|
||||
Number : Type ;
|
||||
</P>
|
||||
<P>
|
||||
singular : Number ;
|
||||
plural : Number ;
|
||||
</P>
|
||||
<P>
|
||||
-- To abstract over case names, we define the following.
|
||||
</P>
|
||||
<P>
|
||||
Case : Type ;
|
||||
</P>
|
||||
<P>
|
||||
nominative : Case ;
|
||||
genitive : Case ;
|
||||
</P>
|
||||
<P>
|
||||
-- Prepositions are used in many-argument functions for rection.
|
||||
</P>
|
||||
<P>
|
||||
Preposition : Type ;
|
||||
</P>
|
||||
<P>
|
||||
--2 Nouns
|
||||
</P>
|
||||
<P>
|
||||
-- Worst case: give all four forms and the semantic gender.
|
||||
</P>
|
||||
<P>
|
||||
mkN : (man,men,man's,men's : Str) -> N ;
|
||||
</P>
|
||||
<P>
|
||||
-- The regular function captures the variants for nouns ending with
|
||||
-- <I>s</I>,<I>sh</I>,<I>x</I>,<I>z</I> or <I>y</I>: <I>kiss - kisses</I>, <I>flash - flashes</I>;
|
||||
-- <I>fly - flies</I> (but <I>toy - toys</I>),
|
||||
</P>
|
||||
<P>
|
||||
regN : Str -> N ;
|
||||
</P>
|
||||
<P>
|
||||
-- In practice the worst case is just: give singular and plural nominative.
|
||||
</P>
|
||||
<P>
|
||||
mk2N : (man,men : Str) -> N ;
|
||||
</P>
|
||||
<P>
|
||||
-- All nouns created by the previous functions are marked as
|
||||
-- <CODE>nonhuman</CODE>. If you want a <CODE>human</CODE> noun, wrap it with the following
|
||||
-- function:
|
||||
</P>
|
||||
<P>
|
||||
genderN : Gender -> N -> N ;
|
||||
</P>
|
||||
<P>
|
||||
--3 Compound nouns
|
||||
--
|
||||
-- All the functions above work quite as well to form compound nouns,
|
||||
-- such as <I>baby boom</I>.
|
||||
</P>
|
||||
<P>
|
||||
--3 Relational nouns
|
||||
--
|
||||
-- Relational nouns (<I>daughter of x</I>) need a preposition.
|
||||
</P>
|
||||
<P>
|
||||
mkN2 : N -> Preposition -> N2 ;
|
||||
</P>
|
||||
<P>
|
||||
-- The most common preposition is <I>of</I>, and the following is a
|
||||
-- shortcut for regular, <CODE>nonhuman</CODE> relational nouns with <I>of</I>.
|
||||
</P>
|
||||
<P>
|
||||
regN2 : Str -> N2 ;
|
||||
</P>
|
||||
<P>
|
||||
-- Use the function <CODE>mkPreposition</CODE> or see the section on prepositions below to
|
||||
-- form other prepositions.
|
||||
--
|
||||
-- Three-place relational nouns (<I>the connection from x to y</I>) need two prepositions.
|
||||
</P>
|
||||
<P>
|
||||
mkN3 : N -> Preposition -> Preposition -> N3 ;
|
||||
</P>
|
||||
<P>
|
||||
--3 Relational common noun phrases
|
||||
--
|
||||
-- In some cases, you may want to make a complex <CODE>CN</CODE> into a
|
||||
-- relational noun (e.g. <I>the old town hall of</I>).
|
||||
</P>
|
||||
<P>
|
||||
cnN2 : CN -> Preposition -> N2 ;
|
||||
cnN3 : CN -> Preposition -> Preposition -> N3 ;
|
||||
</P>
|
||||
<P>
|
||||
--
|
||||
--3 Proper names and noun phrases
|
||||
--
|
||||
-- Proper names, with a regular genitive, are formed as follows
|
||||
</P>
|
||||
<P>
|
||||
regPN : Str -> Gender -> PN ; -- John, John's
|
||||
</P>
|
||||
<P>
|
||||
-- Sometimes you can reuse a common noun as a proper name, e.g. <I>Bank</I>.
|
||||
</P>
|
||||
<P>
|
||||
nounPN : N -> PN ;
|
||||
</P>
|
||||
<P>
|
||||
-- To form a noun phrase that can also be plural and have an irregular
|
||||
-- genitive, you can use the worst-case function.
|
||||
</P>
|
||||
<P>
|
||||
mkNP : Str -> Str -> Number -> Gender -> NP ;
|
||||
</P>
|
||||
<P>
|
||||
--2 Adjectives
|
||||
</P>
|
||||
<P>
|
||||
-- Non-comparison one-place adjectives need two forms: one for
|
||||
-- the adjectival and one for the adverbial form (<I>free - freely</I>)
|
||||
</P>
|
||||
<P>
|
||||
mkA : (free,freely : Str) -> A ;
|
||||
</P>
|
||||
<P>
|
||||
-- For regular adjectives, the adverbial form is derived. This holds
|
||||
-- even for cases with the variation <I>happy - happily</I>.
|
||||
</P>
|
||||
<P>
|
||||
regA : Str -> A ;
|
||||
</P>
|
||||
<P>
|
||||
--3 Two-place adjectives
|
||||
--
|
||||
-- Two-place adjectives need a preposition for their second argument.
|
||||
</P>
|
||||
<P>
|
||||
mkA2 : A -> Preposition -> A2 ;
|
||||
</P>
|
||||
<P>
|
||||
-- Comparison adjectives may two more forms.
|
||||
</P>
|
||||
<P>
|
||||
ADeg : Type ;
|
||||
</P>
|
||||
<P>
|
||||
mkADeg : (good,better,best,well : Str) -> ADeg ;
|
||||
</P>
|
||||
<P>
|
||||
-- The regular pattern recognizes two common variations:
|
||||
-- <I>-e</I> (<I>rude</I> - <I>ruder</I> - <I>rudest</I>) and
|
||||
-- <I>-y</I> (<I>happy - happier - happiest - happily</I>)
|
||||
</P>
|
||||
<P>
|
||||
regADeg : Str -> ADeg ; -- long, longer, longest
|
||||
</P>
|
||||
<P>
|
||||
-- However, the duplication of the final consonant is nor predicted,
|
||||
-- but a separate pattern is used:
|
||||
</P>
|
||||
<P>
|
||||
duplADeg : Str -> ADeg ; -- fat, fatter, fattest
|
||||
</P>
|
||||
<P>
|
||||
-- If comparison is formed by <I>more, //most</I>, as in general for//
|
||||
-- long adjective, the following pattern is used:
|
||||
</P>
|
||||
<P>
|
||||
compoundADeg : A -> ADeg ; -- -/more/most ridiculous
|
||||
</P>
|
||||
<P>
|
||||
-- From a given <CODE>ADeg</CODE>, it is possible to get back to <CODE>A</CODE>.
|
||||
</P>
|
||||
<P>
|
||||
adegA : ADeg -> A ;
|
||||
</P>
|
||||
<P>
|
||||
--2 Adverbs
|
||||
</P>
|
||||
<P>
|
||||
-- Adverbs are not inflected. Most lexical ones have position
|
||||
-- after the verb. Some can be preverbal (e.g. <I>always</I>).
|
||||
</P>
|
||||
<P>
|
||||
mkAdv : Str -> Adv ;
|
||||
mkAdV : Str -> AdV ;
|
||||
</P>
|
||||
<P>
|
||||
-- Adverbs modifying adjectives and sentences can also be formed.
|
||||
</P>
|
||||
<P>
|
||||
mkAdA : Str -> AdA ;
|
||||
</P>
|
||||
<P>
|
||||
--2 Prepositions
|
||||
--
|
||||
-- A preposition as used for rection in the lexicon, as well as to
|
||||
-- build <CODE>PP</CODE>s in the resource API, just requires a string.
|
||||
</P>
|
||||
<P>
|
||||
mkPreposition : Str -> Preposition ;
|
||||
mkPrep : Str -> Prep ;
|
||||
</P>
|
||||
<P>
|
||||
-- (These two functions are synonyms.)
|
||||
</P>
|
||||
<P>
|
||||
--2 Verbs
|
||||
--
|
||||
-- Except for <I>be</I>, the worst case needs five forms: the infinitive and
|
||||
-- the third person singular present, the past indicative, and the
|
||||
-- past and present participles.
|
||||
</P>
|
||||
<P>
|
||||
mkV : (go, goes, went, gone, going : Str) -> V ;
|
||||
</P>
|
||||
<P>
|
||||
-- The regular verb function recognizes the special cases where the last
|
||||
-- character is <I>y</I> (<I>cry - cries</I> but <I>buy - buys</I>) or <I>s</I>, <I>sh</I>, <I>x</I>, <I>z</I>
|
||||
-- (<I>fix - fixes</I>, etc).
|
||||
</P>
|
||||
<P>
|
||||
regV : Str -> V ;
|
||||
</P>
|
||||
<P>
|
||||
-- The following variant duplicates the last letter in the forms like
|
||||
-- <I>rip - ripped - ripping</I>.
|
||||
</P>
|
||||
<P>
|
||||
regDuplV : Str -> V ;
|
||||
</P>
|
||||
<P>
|
||||
-- There is an extensive list of irregular verbs in the module <CODE>IrregularDut</CODE>.
|
||||
-- In practice, it is enough to give three forms,
|
||||
-- e.g. <I>drink - drank - drunk</I>, with a variant indicating consonant
|
||||
-- duplication in the present participle.
|
||||
</P>
|
||||
<P>
|
||||
irregV : (drink, drank, drunk : Str) -> V ;
|
||||
irregDuplV : (get, got, gotten : Str) -> V ;
|
||||
</P>
|
||||
<P>
|
||||
--3 Verbs with a particle.
|
||||
--
|
||||
-- The particle, such as in <I>switch on</I>, is given as a string.
|
||||
</P>
|
||||
<P>
|
||||
partV : V -> Str -> V ;
|
||||
</P>
|
||||
<P>
|
||||
--3 Two-place verbs
|
||||
--
|
||||
-- Two-place verbs need a preposition, except the special case with direct object.
|
||||
-- (transitive verbs). Notice that a particle comes from the <CODE>V</CODE>.
|
||||
</P>
|
||||
<P>
|
||||
mkV2 : V -> Preposition -> V2 ;
|
||||
</P>
|
||||
<P>
|
||||
dirV2 : V -> V2 ;
|
||||
</P>
|
||||
<P>
|
||||
--3 Three-place verbs
|
||||
--
|
||||
-- Three-place (ditransitive) verbs need two prepositions, of which
|
||||
-- the first one or both can be absent.
|
||||
</P>
|
||||
<P>
|
||||
mkV3 : V -> Str -> Str -> V3 ; -- speak, with, about
|
||||
dirV3 : V -> Str -> V3 ; -- give,_,to
|
||||
dirdirV3 : V -> V3 ; -- give,_,_
|
||||
</P>
|
||||
<P>
|
||||
--3 Other complement patterns
|
||||
--
|
||||
-- Verbs and adjectives can take complements such as sentences,
|
||||
-- questions, verb phrases, and adjectives.
|
||||
</P>
|
||||
<P>
|
||||
mkV0 : V -> V0 ;
|
||||
mkVS : V -> VS ;
|
||||
mkV2S : V -> Str -> V2S ;
|
||||
mkVV : V -> VV ;
|
||||
mkV2V : V -> Str -> Str -> V2V ;
|
||||
mkVA : V -> VA ;
|
||||
mkV2A : V -> Str -> V2A ;
|
||||
mkVQ : V -> VQ ;
|
||||
mkV2Q : V -> Str -> V2Q ;
|
||||
</P>
|
||||
<P>
|
||||
mkAS : A -> AS ;
|
||||
mkA2S : A -> Str -> A2S ;
|
||||
mkAV : A -> AV ;
|
||||
mkA2V : A -> Str -> A2V ;
|
||||
</P>
|
||||
<P>
|
||||
-- Notice: categories <CODE>V2S, V2V, V2A, V2Q</CODE> are in v 1.0 treated
|
||||
-- just as synonyms of <CODE>V2</CODE>, and the second argument is given
|
||||
-- as an adverb. Likewise <CODE>AS, A2S, AV, A2V</CODE> are just <CODE>A</CODE>.
|
||||
-- <CODE>V0</CODE> is just <CODE>V</CODE>.
|
||||
</P>
|
||||
<P>
|
||||
V0, V2S, V2V, V2A, V2Q : Type ;
|
||||
AS, A2S, AV, A2V : Type ;
|
||||
</P>
|
||||
<P>
|
||||
--2 Definitions of paradigms
|
||||
--
|
||||
-- The definitions should not bother the user of the API. So they are
|
||||
-- hidden from the document.
|
||||
--.
|
||||
</P>
|
||||
<P>
|
||||
Gender = MorphoDut.Gender ;
|
||||
Number = MorphoDut.Number ;
|
||||
Case = MorphoDut.Case ;
|
||||
human = Masc ;
|
||||
nonhuman = Neutr ;
|
||||
masculine = Masc ;
|
||||
feminine = Fem ;
|
||||
singular = Sg ;
|
||||
plural = Pl ;
|
||||
nominative = Nom ;
|
||||
genitive = Gen ;
|
||||
</P>
|
||||
<P>
|
||||
Preposition = Str ;
|
||||
</P>
|
||||
<P>
|
||||
regN = \ray ->
|
||||
let
|
||||
ra = Predef.tk 1 ray ;
|
||||
y = Predef.dp 1 ray ;
|
||||
r = Predef.tk 2 ray ;
|
||||
ay = Predef.dp 2 ray ;
|
||||
rays =
|
||||
case y of {
|
||||
<I>y</I> => y2ie ray <I>s</I> ;
|
||||
<I>s</I> => ray + <I>es</I> ;
|
||||
<I>z</I> => ray + <I>es</I> ;
|
||||
<I>x</I> => ray + <I>es</I> ;
|
||||
_ => case ay of {
|
||||
<I>sh</I> => ray + <I>es</I> ;
|
||||
<I>ch</I> => ray + <I>es</I> ;
|
||||
_ => ray + <I>s</I>
|
||||
}
|
||||
}
|
||||
in
|
||||
mk2N ray rays ;
|
||||
</P>
|
||||
<P>
|
||||
mk2N = \man,men ->
|
||||
let mens = case last men of {
|
||||
<I>s</I> => men + <I>'</I> ;
|
||||
_ => men + <I>'s</I>
|
||||
}
|
||||
in
|
||||
mkN man men (man + <I>'s</I>) mens ;
|
||||
</P>
|
||||
<P>
|
||||
mkN = \man,men,man's,men's ->
|
||||
mkNoun man men man's men's **** {g = Neutr ; lock_N = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
genderN g man = {s = man.s ; g = g ; lock_N = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
mkN2 = \n,p -> n **** {lock_N2 = <> ; c2 = p} ;
|
||||
regN2 n = mkN2 (regN n) (mkPreposition <I>of</I>) ;
|
||||
mkN3 = \n,p,q -> n **** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
||||
cnN2 = \n,p -> n **** {lock_N2 = <> ; c2 = p} ;
|
||||
cnN3 = \n,p,q -> n **** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
||||
</P>
|
||||
<P>
|
||||
regPN n g = nameReg n g **** {lock_PN = <>} ;
|
||||
nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = <>} ;
|
||||
mkNP x y n g = {s = table {Gen => x ; _ => y} ; a = (agrP3 n).a ;
|
||||
lock_NP = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
mkA a b = mkAdjective a a a b **** {lock_A = <>} ;
|
||||
regA a = regAdjective a **** {lock_A = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
mkA2 a p = a **** {c2 = p ; lock_A2 = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
ADeg = A ; ----
|
||||
</P>
|
||||
<P>
|
||||
mkADeg a b c d = mkAdjective a b c d **** {lock_A = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
regADeg happy =
|
||||
let
|
||||
happ = init happy ;
|
||||
y = last happy ;
|
||||
happie = case y of {
|
||||
<I>y</I> => happ + <I>ie</I> ;
|
||||
<I>e</I> => happy ;
|
||||
_ => happy + <I>e</I>
|
||||
} ;
|
||||
happily = case y of {
|
||||
<I>y</I> => happ + <I>ily</I> ;
|
||||
_ => happy + <I>ly</I>
|
||||
} ;
|
||||
in mkADeg happy (happie + <I>r</I>) (happie + <I>st</I>) happily ;
|
||||
</P>
|
||||
<P>
|
||||
duplADeg fat =
|
||||
mkADeg fat
|
||||
(fat + last fat + <I>er</I>) (fat + last fat + <I>est</I>) (fat + <I>ly</I>) ;
|
||||
</P>
|
||||
<P>
|
||||
compoundADeg a =
|
||||
let ad = (a.s ! AAdj Posit)
|
||||
in mkADeg ad (<I>more</I> ++ ad) (<I>most</I> ++ ad) (a.s ! AAdv) ;
|
||||
</P>
|
||||
<P>
|
||||
adegA a = a ;
|
||||
</P>
|
||||
<P>
|
||||
mkAdv x = ss x **** {lock_Adv = <>} ;
|
||||
mkAdV x = ss x **** {lock_AdV = <>} ;
|
||||
mkAdA x = ss x **** {lock_AdA = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
mkPreposition p = p ;
|
||||
mkPrep p = ss p **** {lock_Prep = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
mkV a b c d e = mkVerbWorst a b c d e **** {s1 = [] ; lock_V = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
regV cry =
|
||||
let
|
||||
cr = init cry ;
|
||||
y = last cry ;
|
||||
cries = (regN cry).s ! Pl ! Nom ; -- !
|
||||
crie = init cries ;
|
||||
cried = case last crie of {
|
||||
<I>e</I> => crie + <I>d</I> ;
|
||||
_ => crie + <I>ed</I>
|
||||
} ;
|
||||
crying = case y of {
|
||||
<I>e</I> => case last cr of {
|
||||
<I>e</I> => cry + <I>ing</I> ;
|
||||
_ => cr + <I>ing</I>
|
||||
} ;
|
||||
_ => cry + <I>ing</I>
|
||||
}
|
||||
in mkV cry cries cried cried crying ;
|
||||
</P>
|
||||
<P>
|
||||
regDuplV fit =
|
||||
let fitt = fit + last fit in
|
||||
mkV fit (fit + <I>s</I>) (fitt + <I>ed</I>) (fitt + <I>ed</I>) (fitt + <I>ing</I>) ;
|
||||
</P>
|
||||
<P>
|
||||
irregV x y z = let reg = (regV x).s in
|
||||
mkV x (reg ! VPres) y z (reg ! VPresPart) **** {s1 = [] ; lock_V = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
irregDuplV fit y z =
|
||||
let
|
||||
fitting = (regDuplV fit).s ! VPresPart
|
||||
in
|
||||
mkV fit (fit + <I>s</I>) y z fitting ;
|
||||
</P>
|
||||
<P>
|
||||
partV v p = verbPart v p **** {lock_V = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
mkV2 v p = v **** {s = v.s ; s1 = v.s1 ; c2 = p ; lock_V2 = <>} ;
|
||||
dirV2 v = mkV2 v [] ;
|
||||
</P>
|
||||
<P>
|
||||
mkV3 v p q = v **** {s = v.s ; s1 = v.s1 ; c2 = p ; c3 = q ; lock_V3 = <>} ;
|
||||
dirV3 v p = mkV3 v [] p ;
|
||||
dirdirV3 v = dirV3 v [] ;
|
||||
</P>
|
||||
<P>
|
||||
mkVS v = v **** {lock_VS = <>} ;
|
||||
mkVV v = v **** {c2 = <I>to</I> ; lock_VV = <>} ;
|
||||
mkVQ v = v **** {lock_VQ = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
V0 : Type = V ;
|
||||
V2S, V2V, V2Q, V2A : Type = V2 ;
|
||||
AS, A2S, AV : Type = A ;
|
||||
A2V : Type = A2 ;
|
||||
</P>
|
||||
<P>
|
||||
mkV0 v = v **** {lock_V = <>} ;
|
||||
mkV2S v p = mkV2 v p **** {lock_V2 = <>} ;
|
||||
mkV2V v p t = mkV2 v p **** {s4 = t ; lock_V2 = <>} ;
|
||||
mkVA v = v **** {lock_VA = <>} ;
|
||||
mkV2A v p = mkV2 v p **** {lock_V2A = <>} ;
|
||||
mkV2Q v p = mkV2 v p **** {lock_V2 = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
mkAS v = v **** {lock_A = <>} ;
|
||||
mkA2S v p = mkA2 v p **** {lock_A = <>} ;
|
||||
mkAV v = v **** {lock_A = <>} ;
|
||||
mkA2V v p = mkA2 v p **** {lock_A2 = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
} ;
|
||||
</P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc dutch/ParadigmsDut.txt -->
|
||||
</BODY></HTML>
|
||||
459
lib/resource-1.0/doc/gfdoc/ParadigmsEng.html
Normal file
459
lib/resource-1.0/doc/gfdoc/ParadigmsEng.html
Normal file
@@ -0,0 +1,459 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<UL>
|
||||
<LI><A HREF="#toc1">English Lexical Paradigms</A>
|
||||
<UL>
|
||||
<LI><A HREF="#toc2">Parameters</A>
|
||||
<LI><A HREF="#toc3">Nouns</A>
|
||||
<UL>
|
||||
<LI><A HREF="#toc4">Compound nouns</A>
|
||||
<LI><A HREF="#toc5">Relational nouns</A>
|
||||
<LI><A HREF="#toc6">Relational common noun phrases</A>
|
||||
<LI><A HREF="#toc7">Proper names and noun phrases</A>
|
||||
</UL>
|
||||
<LI><A HREF="#toc8">Adjectives</A>
|
||||
<UL>
|
||||
<LI><A HREF="#toc9">Two-place adjectives</A>
|
||||
</UL>
|
||||
<LI><A HREF="#toc10">Adverbs</A>
|
||||
<LI><A HREF="#toc11">Prepositions</A>
|
||||
<LI><A HREF="#toc12">Verbs</A>
|
||||
<UL>
|
||||
<LI><A HREF="#toc13">Verbs with a particle.</A>
|
||||
<LI><A HREF="#toc14">Two-place verbs</A>
|
||||
<LI><A HREF="#toc15">Three-place verbs</A>
|
||||
<LI><A HREF="#toc16">Other complement patterns</A>
|
||||
</UL>
|
||||
<LI><A HREF="#toc17">Definitions of paradigms</A>
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:53 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<P>
|
||||
# -path=.:../abstract:../../prelude
|
||||
</P>
|
||||
<A NAME="toc1"></A>
|
||||
<H1>English Lexical Paradigms</H1>
|
||||
<P>
|
||||
Aarne Ranta 2003--2005
|
||||
</P>
|
||||
<P>
|
||||
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.
|
||||
</P>
|
||||
<P>
|
||||
Closed categories (determiners, pronouns, conjunctions) are
|
||||
accessed through the resource syntax API, <CODE>Structural.gf</CODE>.
|
||||
</P>
|
||||
<P>
|
||||
The main difference with <CODE>MorphoEng.gf</CODE> 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.
|
||||
</P>
|
||||
<P>
|
||||
The structure of functions for each word class <CODE>C</CODE> is the following:
|
||||
first we give a handful of patterns that aim to cover all
|
||||
regular cases. Then we give a worst-case function <CODE>mkC</CODE>, which serves as an
|
||||
escape to construct the most irregular words of type <CODE>C</CODE>.
|
||||
However, this function should only seldom be needed: we have a
|
||||
separate module <CODE>IrregularEng</CODE>, which covers all irregularly inflected
|
||||
words.
|
||||
</P>
|
||||
<P>
|
||||
The following modules are presupposed:
|
||||
</P>
|
||||
<PRE>
|
||||
resource ParadigmsEng = open
|
||||
(Predef=Predef),
|
||||
Prelude,
|
||||
MorphoEng,
|
||||
CatEng
|
||||
in {
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc2"></A>
|
||||
<H2>Parameters</H2>
|
||||
<P>
|
||||
To abstract over gender names, we define the following identifiers.
|
||||
</P>
|
||||
<PRE>
|
||||
oper
|
||||
Gender : Type ;
|
||||
|
||||
human : Gender ;
|
||||
nonhuman : Gender ;
|
||||
masculine : Gender ;
|
||||
feminite : Gender ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
To abstract over number names, we define the following.
|
||||
</P>
|
||||
<PRE>
|
||||
Number : Type ;
|
||||
|
||||
singular : Number ;
|
||||
plural : Number ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
To abstract over case names, we define the following.
|
||||
</P>
|
||||
<PRE>
|
||||
Case : Type ;
|
||||
|
||||
nominative : Case ;
|
||||
genitive : Case ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Prepositions are used in many-argument functions for rection.
|
||||
</P>
|
||||
<PRE>
|
||||
Preposition : Type ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc3"></A>
|
||||
<H2>Nouns</H2>
|
||||
<P>
|
||||
Worst case: give all four forms and the semantic gender.
|
||||
</P>
|
||||
<PRE>
|
||||
mkN : (man,men,man's,men's : Str) -> N ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
The regular function captures the variants for nouns ending with
|
||||
<I>s</I>,<I>sh</I>,<I>x</I>,<I>z</I> or <I>y</I>: <I>kiss - kisses</I>, <I>flash - flashes</I>;
|
||||
<I>fly - flies</I> (but <I>toy - toys</I>),
|
||||
</P>
|
||||
<PRE>
|
||||
regN : Str -> N ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
In practice the worst case is just: give singular and plural nominative.
|
||||
</P>
|
||||
<PRE>
|
||||
mk2N : (man,men : Str) -> N ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
All nouns created by the previous functions are marked as
|
||||
<CODE>nonhuman</CODE>. If you want a <CODE>human</CODE> noun, wrap it with the following
|
||||
function:
|
||||
</P>
|
||||
<PRE>
|
||||
genderN : Gender -> N -> N ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc4"></A>
|
||||
<H3>Compound nouns</H3>
|
||||
<P>
|
||||
All the functions above work quite as well to form compound nouns,
|
||||
such as <I>baby boom</I>.
|
||||
</P>
|
||||
<A NAME="toc5"></A>
|
||||
<H3>Relational nouns</H3>
|
||||
<P>
|
||||
Relational nouns (<I>daughter of x</I>) need a preposition.
|
||||
</P>
|
||||
<PRE>
|
||||
mkN2 : N -> Preposition -> N2 ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
The most common preposition is <I>of</I>, and the following is a
|
||||
shortcut for regular, <CODE>nonhuman</CODE> relational nouns with <I>of</I>.
|
||||
</P>
|
||||
<PRE>
|
||||
regN2 : Str -> N2 ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Use the function <CODE>mkPreposition</CODE> or see the section on prepositions below to
|
||||
form other prepositions.
|
||||
</P>
|
||||
<P>
|
||||
Three-place relational nouns (<I>the connection from x to y</I>) need two prepositions.
|
||||
</P>
|
||||
<PRE>
|
||||
mkN3 : N -> Preposition -> Preposition -> N3 ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc6"></A>
|
||||
<H3>Relational common noun phrases</H3>
|
||||
<P>
|
||||
In some cases, you may want to make a complex <CODE>CN</CODE> into a
|
||||
relational noun (e.g. <I>the old town hall of</I>).
|
||||
</P>
|
||||
<PRE>
|
||||
cnN2 : CN -> Preposition -> N2 ;
|
||||
cnN3 : CN -> Preposition -> Preposition -> N3 ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc7"></A>
|
||||
<H3>Proper names and noun phrases</H3>
|
||||
<P>
|
||||
Proper names, with a regular genitive, are formed as follows
|
||||
</P>
|
||||
<PRE>
|
||||
regPN : Str -> Gender -> PN ; -- John, John's
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Sometimes you can reuse a common noun as a proper name, e.g. <I>Bank</I>.
|
||||
</P>
|
||||
<PRE>
|
||||
nounPN : N -> PN ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
To form a noun phrase that can also be plural and have an irregular
|
||||
genitive, you can use the worst-case function.
|
||||
</P>
|
||||
<PRE>
|
||||
mkNP : Str -> Str -> Number -> Gender -> NP ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc8"></A>
|
||||
<H2>Adjectives</H2>
|
||||
<P>
|
||||
Non-comparison one-place adjectives need two forms: one for
|
||||
the adjectival and one for the adverbial form (<I>free - freely</I>)
|
||||
</P>
|
||||
<PRE>
|
||||
mkA : (free,freely : Str) -> A ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
For regular adjectives, the adverbial form is derived. This holds
|
||||
even for cases with the variation <I>happy - happily</I>.
|
||||
</P>
|
||||
<PRE>
|
||||
regA : Str -> A ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc9"></A>
|
||||
<H3>Two-place adjectives</H3>
|
||||
<P>
|
||||
Two-place adjectives need a preposition for their second argument.
|
||||
</P>
|
||||
<PRE>
|
||||
mkA2 : A -> Preposition -> A2 ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Comparison adjectives may two more forms.
|
||||
</P>
|
||||
<PRE>
|
||||
ADeg : Type ;
|
||||
|
||||
mkADeg : (good,better,best,well : Str) -> ADeg ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
The regular pattern recognizes two common variations:
|
||||
<I>-e</I> (<I>rude</I> - <I>ruder</I> - <I>rudest</I>) and
|
||||
<I>-y</I> (<I>happy - happier - happiest - happily</I>)
|
||||
</P>
|
||||
<PRE>
|
||||
regADeg : Str -> ADeg ; -- long, longer, longest
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
However, the duplication of the final consonant is nor predicted,
|
||||
but a separate pattern is used:
|
||||
</P>
|
||||
<PRE>
|
||||
duplADeg : Str -> ADeg ; -- fat, fatter, fattest
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
If comparison is formed by <I>more, //most</I>, as in general for//
|
||||
long adjective, the following pattern is used:
|
||||
</P>
|
||||
<PRE>
|
||||
compoundADeg : A -> ADeg ; -- -/more/most ridiculous
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
From a given <CODE>ADeg</CODE>, it is possible to get back to <CODE>A</CODE>.
|
||||
</P>
|
||||
<PRE>
|
||||
adegA : ADeg -> A ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc10"></A>
|
||||
<H2>Adverbs</H2>
|
||||
<P>
|
||||
Adverbs are not inflected. Most lexical ones have position
|
||||
after the verb. Some can be preverbal (e.g. <I>always</I>).
|
||||
</P>
|
||||
<PRE>
|
||||
mkAdv : Str -> Adv ;
|
||||
mkAdV : Str -> AdV ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Adverbs modifying adjectives and sentences can also be formed.
|
||||
</P>
|
||||
<PRE>
|
||||
mkAdA : Str -> AdA ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc11"></A>
|
||||
<H2>Prepositions</H2>
|
||||
<P>
|
||||
A preposition as used for rection in the lexicon, as well as to
|
||||
build <CODE>PP</CODE>s in the resource API, just requires a string.
|
||||
</P>
|
||||
<PRE>
|
||||
mkPreposition : Str -> Preposition ;
|
||||
mkPrep : Str -> Prep ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
(These two functions are synonyms.)
|
||||
</P>
|
||||
<A NAME="toc12"></A>
|
||||
<H2>Verbs</H2>
|
||||
<P>
|
||||
Except for <I>be</I>, the worst case needs five forms: the infinitive and
|
||||
the third person singular present, the past indicative, and the
|
||||
past and present participles.
|
||||
</P>
|
||||
<PRE>
|
||||
mkV : (go, goes, went, gone, going : Str) -> V ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
The regular verb function recognizes the special cases where the last
|
||||
character is <I>y</I> (<I>cry - cries</I> but <I>buy - buys</I>) or <I>s</I>, <I>sh</I>, <I>x</I>, <I>z</I>
|
||||
(<I>fix - fixes</I>, etc).
|
||||
</P>
|
||||
<PRE>
|
||||
regV : Str -> V ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
The following variant duplicates the last letter in the forms like
|
||||
<I>rip - ripped - ripping</I>.
|
||||
</P>
|
||||
<PRE>
|
||||
regDuplV : Str -> V ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
There is an extensive list of irregular verbs in the module <CODE>IrregularEng</CODE>.
|
||||
In practice, it is enough to give three forms,
|
||||
e.g. <I>drink - drank - drunk</I>, with a variant indicating consonant
|
||||
duplication in the present participle.
|
||||
</P>
|
||||
<PRE>
|
||||
irregV : (drink, drank, drunk : Str) -> V ;
|
||||
irregDuplV : (get, got, gotten : Str) -> V ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc13"></A>
|
||||
<H3>Verbs with a particle.</H3>
|
||||
<P>
|
||||
The particle, such as in <I>switch on</I>, is given as a string.
|
||||
</P>
|
||||
<PRE>
|
||||
partV : V -> Str -> V ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc14"></A>
|
||||
<H3>Two-place verbs</H3>
|
||||
<P>
|
||||
Two-place verbs need a preposition, except the special case with direct object.
|
||||
(transitive verbs). Notice that a particle comes from the <CODE>V</CODE>.
|
||||
</P>
|
||||
<PRE>
|
||||
mkV2 : V -> Preposition -> V2 ;
|
||||
|
||||
dirV2 : V -> V2 ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc15"></A>
|
||||
<H3>Three-place verbs</H3>
|
||||
<P>
|
||||
Three-place (ditransitive) verbs need two prepositions, of which
|
||||
the first one or both can be absent.
|
||||
</P>
|
||||
<PRE>
|
||||
mkV3 : V -> Preposition -> Preposition -> V3 ; -- speak, with, about
|
||||
dirV3 : V -> Preposition -> V3 ; -- give,_,to
|
||||
dirdirV3 : V -> V3 ; -- give,_,_
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc16"></A>
|
||||
<H3>Other complement patterns</H3>
|
||||
<P>
|
||||
Verbs and adjectives can take complements such as sentences,
|
||||
questions, verb phrases, and adjectives.
|
||||
</P>
|
||||
<PRE>
|
||||
mkV0 : V -> V0 ;
|
||||
mkVS : V -> VS ;
|
||||
mkV2S : V -> Str -> V2S ;
|
||||
mkVV : V -> VV ;
|
||||
mkV2V : V -> Str -> Str -> V2V ;
|
||||
mkVA : V -> VA ;
|
||||
mkV2A : V -> Str -> V2A ;
|
||||
mkVQ : V -> VQ ;
|
||||
mkV2Q : V -> Str -> V2Q ;
|
||||
|
||||
mkAS : A -> AS ;
|
||||
mkA2S : A -> Str -> A2S ;
|
||||
mkAV : A -> AV ;
|
||||
mkA2V : A -> Str -> A2V ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Notice: categories <CODE>V2S, V2V, V2A, V2Q</CODE> are in v 1.0 treated
|
||||
just as synonyms of <CODE>V2</CODE>, and the second argument is given
|
||||
as an adverb. Likewise <CODE>AS, A2S, AV, A2V</CODE> are just <CODE>A</CODE>.
|
||||
<CODE>V0</CODE> is just <CODE>V</CODE>.
|
||||
</P>
|
||||
<PRE>
|
||||
V0, V2S, V2V, V2A, V2Q : Type ;
|
||||
AS, A2S, AV, A2V : Type ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc17"></A>
|
||||
<H2>Definitions of paradigms</H2>
|
||||
<P>
|
||||
The definitions should not bother the user of the API. So they are
|
||||
hidden from the document.
|
||||
</P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc english/ParadigmsEng.txt -->
|
||||
</BODY></HTML>
|
||||
595
lib/resource-1.0/doc/gfdoc/ParadigmsGer.html
Normal file
595
lib/resource-1.0/doc/gfdoc/ParadigmsGer.html
Normal file
@@ -0,0 +1,595 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:53 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<P>
|
||||
--# -path=.:../abstract:../../prelude
|
||||
</P>
|
||||
<P>
|
||||
--1 German Lexical Paradigms
|
||||
--
|
||||
-- Aarne Ranta 2003--2005
|
||||
--
|
||||
-- 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, <CODE>Structural.gf</CODE>.
|
||||
--
|
||||
-- The main difference with <CODE>MorphoGer.gf</CODE> 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 <CODE>C</CODE> is the following:
|
||||
-- first we give a handful of patterns that aim to cover all
|
||||
-- regular cases. Then we give a worst-case function <CODE>mkC</CODE>, which serves as an
|
||||
-- escape to construct the most irregular words of type <CODE>C</CODE>.
|
||||
-- However, this function should only seldom be needed: we have a
|
||||
-- separate module <CODE>IrregularGer</CODE>, which covers all irregularly inflected
|
||||
-- words.
|
||||
--
|
||||
-- The following modules are presupposed:
|
||||
</P>
|
||||
<P>
|
||||
resource ParadigmsGer = open
|
||||
(Predef=Predef),
|
||||
Prelude,
|
||||
MorphoGer,
|
||||
CatGer
|
||||
in {
|
||||
--2 Parameters
|
||||
--
|
||||
-- To abstract over gender names, we define the following identifiers.
|
||||
</P>
|
||||
<P>
|
||||
oper
|
||||
Gender : Type ;
|
||||
</P>
|
||||
<P>
|
||||
human : Gender ;
|
||||
nonhuman : Gender ;
|
||||
masculine : Gender ;
|
||||
feminite : Gender ;
|
||||
</P>
|
||||
<P>
|
||||
-- To abstract over number names, we define the following.
|
||||
</P>
|
||||
<P>
|
||||
Number : Type ;
|
||||
</P>
|
||||
<P>
|
||||
singular : Number ;
|
||||
plural : Number ;
|
||||
</P>
|
||||
<P>
|
||||
-- To abstract over case names, we define the following.
|
||||
</P>
|
||||
<P>
|
||||
Case : Type ;
|
||||
</P>
|
||||
<P>
|
||||
nominative : Case ;
|
||||
genitive : Case ;
|
||||
</P>
|
||||
<P>
|
||||
-- Prepositions are used in many-argument functions for rection.
|
||||
</P>
|
||||
<P>
|
||||
Preposition : Type ;
|
||||
</P>
|
||||
<P>
|
||||
--2 Nouns
|
||||
</P>
|
||||
<P>
|
||||
-- Worst case: give all four forms and the semantic gender.
|
||||
</P>
|
||||
<P>
|
||||
mkN : (man,men,man's,men's : Str) -> N ;
|
||||
</P>
|
||||
<P>
|
||||
-- The regular function captures the variants for nouns ending with
|
||||
-- <I>s</I>,<I>sh</I>,<I>x</I>,<I>z</I> or <I>y</I>: <I>kiss - kisses</I>, <I>flash - flashes</I>;
|
||||
-- <I>fly - flies</I> (but <I>toy - toys</I>),
|
||||
</P>
|
||||
<P>
|
||||
regN : Str -> N ;
|
||||
</P>
|
||||
<P>
|
||||
-- In practice the worst case is just: give singular and plural nominative.
|
||||
</P>
|
||||
<P>
|
||||
mk2N : (man,men : Str) -> N ;
|
||||
</P>
|
||||
<P>
|
||||
-- All nouns created by the previous functions are marked as
|
||||
-- <CODE>nonhuman</CODE>. If you want a <CODE>human</CODE> noun, wrap it with the following
|
||||
-- function:
|
||||
</P>
|
||||
<P>
|
||||
genderN : Gender -> N -> N ;
|
||||
</P>
|
||||
<P>
|
||||
--3 Compound nouns
|
||||
--
|
||||
-- All the functions above work quite as well to form compound nouns,
|
||||
-- such as <I>baby boom</I>.
|
||||
</P>
|
||||
<P>
|
||||
--3 Relational nouns
|
||||
--
|
||||
-- Relational nouns (<I>daughter of x</I>) need a preposition.
|
||||
</P>
|
||||
<P>
|
||||
mkN2 : N -> Preposition -> N2 ;
|
||||
</P>
|
||||
<P>
|
||||
-- The most common preposition is <I>of</I>, and the following is a
|
||||
-- shortcut for regular, <CODE>nonhuman</CODE> relational nouns with <I>of</I>.
|
||||
</P>
|
||||
<P>
|
||||
regN2 : Str -> N2 ;
|
||||
</P>
|
||||
<P>
|
||||
-- Use the function <CODE>mkPreposition</CODE> or see the section on prepositions below to
|
||||
-- form other prepositions.
|
||||
--
|
||||
-- Three-place relational nouns (<I>the connection from x to y</I>) need two prepositions.
|
||||
</P>
|
||||
<P>
|
||||
mkN3 : N -> Preposition -> Preposition -> N3 ;
|
||||
</P>
|
||||
<P>
|
||||
--3 Relational common noun phrases
|
||||
--
|
||||
-- In some cases, you may want to make a complex <CODE>CN</CODE> into a
|
||||
-- relational noun (e.g. <I>the old town hall of</I>).
|
||||
</P>
|
||||
<P>
|
||||
cnN2 : CN -> Preposition -> N2 ;
|
||||
cnN3 : CN -> Preposition -> Preposition -> N3 ;
|
||||
</P>
|
||||
<P>
|
||||
--
|
||||
--3 Proper names and noun phrases
|
||||
--
|
||||
-- Proper names, with a regular genitive, are formed as follows
|
||||
</P>
|
||||
<P>
|
||||
regPN : Str -> Gender -> PN ; -- John, John's
|
||||
</P>
|
||||
<P>
|
||||
-- Sometimes you can reuse a common noun as a proper name, e.g. <I>Bank</I>.
|
||||
</P>
|
||||
<P>
|
||||
nounPN : N -> PN ;
|
||||
</P>
|
||||
<P>
|
||||
-- To form a noun phrase that can also be plural and have an irregular
|
||||
-- genitive, you can use the worst-case function.
|
||||
</P>
|
||||
<P>
|
||||
mkNP : Str -> Str -> Number -> Gender -> NP ;
|
||||
</P>
|
||||
<P>
|
||||
--2 Adjectives
|
||||
</P>
|
||||
<P>
|
||||
-- Non-comparison one-place adjectives need two forms: one for
|
||||
-- the adjectival and one for the adverbial form (<I>free - freely</I>)
|
||||
</P>
|
||||
<P>
|
||||
mkA : (free,freely : Str) -> A ;
|
||||
</P>
|
||||
<P>
|
||||
-- For regular adjectives, the adverbial form is derived. This holds
|
||||
-- even for cases with the variation <I>happy - happily</I>.
|
||||
</P>
|
||||
<P>
|
||||
regA : Str -> A ;
|
||||
</P>
|
||||
<P>
|
||||
--3 Two-place adjectives
|
||||
--
|
||||
-- Two-place adjectives need a preposition for their second argument.
|
||||
</P>
|
||||
<P>
|
||||
mkA2 : A -> Preposition -> A2 ;
|
||||
</P>
|
||||
<P>
|
||||
-- Comparison adjectives may two more forms.
|
||||
</P>
|
||||
<P>
|
||||
ADeg : Type ;
|
||||
</P>
|
||||
<P>
|
||||
mkADeg : (good,better,best,well : Str) -> ADeg ;
|
||||
</P>
|
||||
<P>
|
||||
-- The regular pattern recognizes two common variations:
|
||||
-- <I>-e</I> (<I>rude</I> - <I>ruder</I> - <I>rudest</I>) and
|
||||
-- <I>-y</I> (<I>happy - happier - happiest - happily</I>)
|
||||
</P>
|
||||
<P>
|
||||
regADeg : Str -> ADeg ; -- long, longer, longest
|
||||
</P>
|
||||
<P>
|
||||
-- However, the duplication of the final consonant is nor predicted,
|
||||
-- but a separate pattern is used:
|
||||
</P>
|
||||
<P>
|
||||
duplADeg : Str -> ADeg ; -- fat, fatter, fattest
|
||||
</P>
|
||||
<P>
|
||||
-- If comparison is formed by <I>more, //most</I>, as in general for//
|
||||
-- long adjective, the following pattern is used:
|
||||
</P>
|
||||
<P>
|
||||
compoundADeg : A -> ADeg ; -- -/more/most ridiculous
|
||||
</P>
|
||||
<P>
|
||||
-- From a given <CODE>ADeg</CODE>, it is possible to get back to <CODE>A</CODE>.
|
||||
</P>
|
||||
<P>
|
||||
adegA : ADeg -> A ;
|
||||
</P>
|
||||
<P>
|
||||
--2 Adverbs
|
||||
</P>
|
||||
<P>
|
||||
-- Adverbs are not inflected. Most lexical ones have position
|
||||
-- after the verb. Some can be preverbal (e.g. <I>always</I>).
|
||||
</P>
|
||||
<P>
|
||||
mkAdv : Str -> Adv ;
|
||||
mkAdV : Str -> AdV ;
|
||||
</P>
|
||||
<P>
|
||||
-- Adverbs modifying adjectives and sentences can also be formed.
|
||||
</P>
|
||||
<P>
|
||||
mkAdA : Str -> AdA ;
|
||||
</P>
|
||||
<P>
|
||||
--2 Prepositions
|
||||
--
|
||||
-- A preposition as used for rection in the lexicon, as well as to
|
||||
-- build <CODE>PP</CODE>s in the resource API, just requires a string.
|
||||
</P>
|
||||
<P>
|
||||
mkPreposition : Str -> Preposition ;
|
||||
mkPrep : Str -> Prep ;
|
||||
</P>
|
||||
<P>
|
||||
-- (These two functions are synonyms.)
|
||||
</P>
|
||||
<P>
|
||||
--2 Verbs
|
||||
--
|
||||
-- Except for <I>be</I>, the worst case needs five forms: the infinitive and
|
||||
-- the third person singular present, the past indicative, and the
|
||||
-- past and present participles.
|
||||
</P>
|
||||
<P>
|
||||
mkV : (go, goes, went, gone, going : Str) -> V ;
|
||||
</P>
|
||||
<P>
|
||||
-- The regular verb function recognizes the special cases where the last
|
||||
-- character is <I>y</I> (<I>cry - cries</I> but <I>buy - buys</I>) or <I>s</I>, <I>sh</I>, <I>x</I>, <I>z</I>
|
||||
-- (<I>fix - fixes</I>, etc).
|
||||
</P>
|
||||
<P>
|
||||
regV : Str -> V ;
|
||||
</P>
|
||||
<P>
|
||||
-- The following variant duplicates the last letter in the forms like
|
||||
-- <I>rip - ripped - ripping</I>.
|
||||
</P>
|
||||
<P>
|
||||
regDuplV : Str -> V ;
|
||||
</P>
|
||||
<P>
|
||||
-- There is an extensive list of irregular verbs in the module <CODE>IrregularGer</CODE>.
|
||||
-- In practice, it is enough to give three forms,
|
||||
-- e.g. <I>drink - drank - drunk</I>, with a variant indicating consonant
|
||||
-- duplication in the present participle.
|
||||
</P>
|
||||
<P>
|
||||
irregV : (drink, drank, drunk : Str) -> V ;
|
||||
irregDuplV : (get, got, gotten : Str) -> V ;
|
||||
</P>
|
||||
<P>
|
||||
--3 Verbs with a particle.
|
||||
--
|
||||
-- The particle, such as in <I>switch on</I>, is given as a string.
|
||||
</P>
|
||||
<P>
|
||||
partV : V -> Str -> V ;
|
||||
</P>
|
||||
<P>
|
||||
--3 Two-place verbs
|
||||
--
|
||||
-- Two-place verbs need a preposition, except the special case with direct object.
|
||||
-- (transitive verbs). Notice that a particle comes from the <CODE>V</CODE>.
|
||||
</P>
|
||||
<P>
|
||||
mkV2 : V -> Preposition -> V2 ;
|
||||
</P>
|
||||
<P>
|
||||
dirV2 : V -> V2 ;
|
||||
</P>
|
||||
<P>
|
||||
--3 Three-place verbs
|
||||
--
|
||||
-- Three-place (ditransitive) verbs need two prepositions, of which
|
||||
-- the first one or both can be absent.
|
||||
</P>
|
||||
<P>
|
||||
mkV3 : V -> Preposition -> Preposition -> V3 ; -- speak, with, about
|
||||
dirV3 : V -> Preposition -> V3 ; -- give,_,to
|
||||
dirdirV3 : V -> V3 ; -- give,_,_
|
||||
</P>
|
||||
<P>
|
||||
--3 Other complement patterns
|
||||
--
|
||||
-- Verbs and adjectives can take complements such as sentences,
|
||||
-- questions, verb phrases, and adjectives.
|
||||
</P>
|
||||
<P>
|
||||
mkV0 : V -> V0 ;
|
||||
mkVS : V -> VS ;
|
||||
mkV2S : V -> Str -> V2S ;
|
||||
mkVV : V -> VV ;
|
||||
mkV2V : V -> Str -> Str -> V2V ;
|
||||
mkVA : V -> VA ;
|
||||
mkV2A : V -> Str -> V2A ;
|
||||
mkVQ : V -> VQ ;
|
||||
mkV2Q : V -> Str -> V2Q ;
|
||||
</P>
|
||||
<P>
|
||||
mkAS : A -> AS ;
|
||||
mkA2S : A -> Str -> A2S ;
|
||||
mkAV : A -> AV ;
|
||||
mkA2V : A -> Str -> A2V ;
|
||||
</P>
|
||||
<P>
|
||||
-- Notice: categories <CODE>V2S, V2V, V2A, V2Q</CODE> are in v 1.0 treated
|
||||
-- just as synonyms of <CODE>V2</CODE>, and the second argument is given
|
||||
-- as an adverb. Likewise <CODE>AS, A2S, AV, A2V</CODE> are just <CODE>A</CODE>.
|
||||
-- <CODE>V0</CODE> is just <CODE>V</CODE>.
|
||||
</P>
|
||||
<P>
|
||||
V0, V2S, V2V, V2A, V2Q : Type ;
|
||||
AS, A2S, AV, A2V : Type ;
|
||||
</P>
|
||||
<P>
|
||||
--2 Definitions of paradigms
|
||||
--
|
||||
-- The definitions should not bother the user of the API. So they are
|
||||
-- hidden from the document.
|
||||
--.
|
||||
</P>
|
||||
<P>
|
||||
Gender = MorphoGer.Gender ;
|
||||
Number = MorphoGer.Number ;
|
||||
Case = MorphoGer.Case ;
|
||||
human = Masc ;
|
||||
nonhuman = Neutr ;
|
||||
masculine = Masc ;
|
||||
feminine = Fem ;
|
||||
singular = Sg ;
|
||||
plural = Pl ;
|
||||
nominative = Nom ;
|
||||
genitive = Gen ;
|
||||
</P>
|
||||
<P>
|
||||
Preposition = Str ;
|
||||
</P>
|
||||
<P>
|
||||
regN = \ray ->
|
||||
let
|
||||
ra = Predef.tk 1 ray ;
|
||||
y = Predef.dp 1 ray ;
|
||||
r = Predef.tk 2 ray ;
|
||||
ay = Predef.dp 2 ray ;
|
||||
rays =
|
||||
case y of {
|
||||
<I>y</I> => y2ie ray <I>s</I> ;
|
||||
<I>s</I> => ray + <I>es</I> ;
|
||||
<I>z</I> => ray + <I>es</I> ;
|
||||
<I>x</I> => ray + <I>es</I> ;
|
||||
_ => case ay of {
|
||||
<I>sh</I> => ray + <I>es</I> ;
|
||||
<I>ch</I> => ray + <I>es</I> ;
|
||||
_ => ray + <I>s</I>
|
||||
}
|
||||
}
|
||||
in
|
||||
mk2N ray rays ;
|
||||
</P>
|
||||
<P>
|
||||
mk2N = \man,men ->
|
||||
let mens = case last men of {
|
||||
<I>s</I> => men + <I>'</I> ;
|
||||
_ => men + <I>'s</I>
|
||||
}
|
||||
in
|
||||
mkN man men (man + <I>'s</I>) mens ;
|
||||
</P>
|
||||
<P>
|
||||
mkN = \man,men,man's,men's ->
|
||||
mkNoun man man's men men's **** {g = Neutr ; lock_N = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
genderN g man = {s = man.s ; g = g ; lock_N = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
mkN2 = \n,p -> n **** {lock_N2 = <> ; c2 = p} ;
|
||||
regN2 n = mkN2 (regN n) (mkPreposition <I>of</I>) ;
|
||||
mkN3 = \n,p,q -> n **** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
||||
cnN2 = \n,p -> n **** {lock_N2 = <> ; c2 = p} ;
|
||||
cnN3 = \n,p,q -> n **** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
||||
</P>
|
||||
<P>
|
||||
regPN n g = nameReg n g **** {lock_PN = <>} ;
|
||||
nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = <>} ;
|
||||
mkNP x y n g = {s = table {Gen => x ; _ => y} ; a = agrP3 n ;
|
||||
lock_NP = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
mkA a b = mkAdjective a a a b **** {lock_A = <>} ;
|
||||
regA a = regAdjective a **** {lock_A = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
mkA2 a p = a **** {c2 = p ; lock_A2 = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
ADeg = A ; ----
|
||||
</P>
|
||||
<P>
|
||||
mkADeg a b c d = mkAdjective a b c d **** {lock_A = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
regADeg happy =
|
||||
let
|
||||
happ = init happy ;
|
||||
y = last happy ;
|
||||
happie = case y of {
|
||||
<I>y</I> => happ + <I>ie</I> ;
|
||||
<I>e</I> => happy ;
|
||||
_ => happy + <I>e</I>
|
||||
} ;
|
||||
happily = case y of {
|
||||
<I>y</I> => happ + <I>ily</I> ;
|
||||
_ => happy + <I>ly</I>
|
||||
} ;
|
||||
in mkADeg happy (happie + <I>r</I>) (happie + <I>st</I>) happily ;
|
||||
</P>
|
||||
<P>
|
||||
duplADeg fat =
|
||||
mkADeg fat
|
||||
(fat + last fat + <I>er</I>) (fat + last fat + <I>est</I>) (fat + <I>ly</I>) ;
|
||||
</P>
|
||||
<P>
|
||||
compoundADeg a =
|
||||
let ad = (a.s ! AAdj Posit)
|
||||
in mkADeg ad (<I>more</I> ++ ad) (<I>most</I> ++ ad) (a.s ! AAdv) ;
|
||||
</P>
|
||||
<P>
|
||||
adegA a = a ;
|
||||
</P>
|
||||
<P>
|
||||
mkAdv x = ss x **** {lock_Adv = <>} ;
|
||||
mkAdV x = ss x **** {lock_AdV = <>} ;
|
||||
mkAdA x = ss x **** {lock_AdA = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
mkPreposition p = p ;
|
||||
mkPrep p = ss p **** {lock_Prep = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
mkV a b c d e = mkVerb a b c d e **** {s1 = [] ; lock_V = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
regV cry =
|
||||
let
|
||||
cr = init cry ;
|
||||
y = last cry ;
|
||||
cries = (regN cry).s ! Pl ! Nom ; -- !
|
||||
crie = init cries ;
|
||||
cried = case last crie of {
|
||||
<I>e</I> => crie + <I>d</I> ;
|
||||
_ => crie + <I>ed</I>
|
||||
} ;
|
||||
crying = case y of {
|
||||
<I>e</I> => case last cr of {
|
||||
<I>e</I> => cry + <I>ing</I> ;
|
||||
_ => cr + <I>ing</I>
|
||||
} ;
|
||||
_ => cry + <I>ing</I>
|
||||
}
|
||||
in mkV cry cries cried cried crying ;
|
||||
</P>
|
||||
<P>
|
||||
regDuplV fit =
|
||||
let fitt = fit + last fit in
|
||||
mkV fit (fit + <I>s</I>) (fitt + <I>ed</I>) (fitt + <I>ed</I>) (fitt + <I>ing</I>) ;
|
||||
</P>
|
||||
<P>
|
||||
irregV x y z = let reg = (regV x).s in
|
||||
mkV x (reg ! VPres) y z (reg ! VPresPart) **** {s1 = [] ; lock_V = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
irregDuplV fit y z =
|
||||
let
|
||||
fitting = (regDuplV fit).s ! VPresPart
|
||||
in
|
||||
mkV fit (fit + <I>s</I>) y z fitting ;
|
||||
</P>
|
||||
<P>
|
||||
partV v p = verbPart v p **** {lock_V = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
mkV2 v p = v **** {s = v.s ; s1 = v.s1 ; c2 = p ; lock_V2 = <>} ;
|
||||
dirV2 v = mkV2 v [] ;
|
||||
</P>
|
||||
<P>
|
||||
mkV3 v p q = v **** {s = v.s ; s1 = v.s1 ; c2 = p ; c3 = q ; lock_V3 = <>} ;
|
||||
dirV3 v p = mkV3 v [] p ;
|
||||
dirdirV3 v = dirV3 v [] ;
|
||||
</P>
|
||||
<P>
|
||||
mkVS v = v **** {lock_VS = <>} ;
|
||||
mkVV v = v **** {c2 = <I>to</I> ; lock_VV = <>} ;
|
||||
mkVQ v = v **** {lock_VQ = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
V0 : Type = V ;
|
||||
V2S, V2V, V2Q, V2A : Type = V2 ;
|
||||
AS, A2S, AV : Type = A ;
|
||||
A2V : Type = A2 ;
|
||||
</P>
|
||||
<P>
|
||||
mkV0 v = v **** {lock_V = <>} ;
|
||||
mkV2S v p = mkV2 v p **** {lock_V2 = <>} ;
|
||||
mkV2V v p t = mkV2 v p **** {s4 = t ; lock_V2 = <>} ;
|
||||
mkVA v = v **** {lock_VA = <>} ;
|
||||
mkV2A v p = mkV2 v p **** {lock_V2A = <>} ;
|
||||
mkV2Q v p = mkV2 v p **** {lock_V2 = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
mkAS v = v **** {lock_A = <>} ;
|
||||
mkA2S v p = mkA2 v p **** {lock_A = <>} ;
|
||||
mkAV v = v **** {lock_A = <>} ;
|
||||
mkA2V v p = mkA2 v p **** {lock_A2 = <>} ;
|
||||
</P>
|
||||
<P>
|
||||
} ;
|
||||
</P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc german/ParadigmsGer.txt -->
|
||||
</BODY></HTML>
|
||||
459
lib/resource-1.0/doc/gfdoc/ParadigmsSwe.html
Normal file
459
lib/resource-1.0/doc/gfdoc/ParadigmsSwe.html
Normal file
@@ -0,0 +1,459 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<UL>
|
||||
<LI><A HREF="#toc1">Swedish Lexical Paradigms</A>
|
||||
<UL>
|
||||
<LI><A HREF="#toc2">Parameters</A>
|
||||
<LI><A HREF="#toc3">Nouns</A>
|
||||
<UL>
|
||||
<LI><A HREF="#toc4">Compound nouns</A>
|
||||
<LI><A HREF="#toc5">Relational nouns</A>
|
||||
<LI><A HREF="#toc6">Relational common noun phrases</A>
|
||||
<LI><A HREF="#toc7">Proper names and noun phrases</A>
|
||||
</UL>
|
||||
<LI><A HREF="#toc8">Adjectives</A>
|
||||
<UL>
|
||||
<LI><A HREF="#toc9">Two-place adjectives</A>
|
||||
</UL>
|
||||
<LI><A HREF="#toc10">Adverbs</A>
|
||||
<LI><A HREF="#toc11">Prepositions</A>
|
||||
<LI><A HREF="#toc12">Verbs</A>
|
||||
<UL>
|
||||
<LI><A HREF="#toc13">Verbs with a particle.</A>
|
||||
<LI><A HREF="#toc14">Deponent verbs.</A>
|
||||
<LI><A HREF="#toc15">Two-place verbs</A>
|
||||
<LI><A HREF="#toc16">Three-place verbs</A>
|
||||
<LI><A HREF="#toc17">Other complement patterns</A>
|
||||
</UL>
|
||||
<LI><A HREF="#toc18">Definitions of the paradigms</A>
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:53 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<P>
|
||||
# -path=.:../scandinavian:../common:../abstract:../../prelude
|
||||
</P>
|
||||
<A NAME="toc1"></A>
|
||||
<H1>Swedish Lexical Paradigms</H1>
|
||||
<P>
|
||||
Aarne Ranta 2003
|
||||
</P>
|
||||
<P>
|
||||
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.
|
||||
</P>
|
||||
<P>
|
||||
Closed categories (determiners, pronouns, conjunctions) are
|
||||
accessed through the resource syntax API, <CODE>Structural.gf</CODE>.
|
||||
</P>
|
||||
<P>
|
||||
The main difference with <CODE>MorphoSwe.gf</CODE> 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.
|
||||
</P>
|
||||
<P>
|
||||
The structure of functions for each word class <CODE>C</CODE> is the following:
|
||||
first we give a handful of patterns that aim to cover all
|
||||
regular cases. Then we give a worst-case function <CODE>mkC</CODE>, which serves as an
|
||||
escape to construct the most irregular words of type <CODE>C</CODE>.
|
||||
However, this function should only seldom be needed: we have a
|
||||
separate module <CODE>IrregularEng</CODE>, which covers all irregularly inflected
|
||||
words.
|
||||
</P>
|
||||
<PRE>
|
||||
resource ParadigmsSwe =
|
||||
open
|
||||
(Predef=Predef),
|
||||
Prelude,
|
||||
ResScand,
|
||||
DiffSwe,
|
||||
MorphoSwe,
|
||||
CatSwe in {
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc2"></A>
|
||||
<H2>Parameters</H2>
|
||||
<P>
|
||||
To abstract over gender names, we define the following identifiers.
|
||||
</P>
|
||||
<PRE>
|
||||
oper
|
||||
Gender : Type ;
|
||||
|
||||
utrum : Gender ;
|
||||
neutrum : Gender ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
To abstract over number names, we define the following.
|
||||
</P>
|
||||
<PRE>
|
||||
Number : Type ;
|
||||
|
||||
singular : Number ;
|
||||
plural : Number ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
To abstract over case names, we define the following.
|
||||
</P>
|
||||
<PRE>
|
||||
Case : Type ;
|
||||
|
||||
nominative : Case ;
|
||||
genitive : Case ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Prepositions used in many-argument functions are just strings.
|
||||
</P>
|
||||
<PRE>
|
||||
Preposition : Type = Str ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc3"></A>
|
||||
<H2>Nouns</H2>
|
||||
<P>
|
||||
Worst case: give all four forms. The gender is computed from the
|
||||
last letter of the second form (if <I>n</I>, then <CODE>utrum</CODE>, otherwise <CODE>neutrum</CODE>).
|
||||
</P>
|
||||
<PRE>
|
||||
mkN : (apa,apan,apor,aporna : Str) -> N ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
The regular function takes the singular indefinite form and the gender,
|
||||
and computes the other forms by a heuristic.
|
||||
If in doubt, use the <CODE>cc</CODE> command to test!
|
||||
</P>
|
||||
<PRE>
|
||||
regN : Str -> Gender -> N ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
In practice the worst case is often just: give singular and plural indefinite.
|
||||
</P>
|
||||
<PRE>
|
||||
mk2N : (nyckel,nycklar : Str) -> N ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc4"></A>
|
||||
<H3>Compound nouns</H3>
|
||||
<P>
|
||||
All the functions above work quite as well to form compound nouns,
|
||||
such as <I>fotboll</I>.
|
||||
</P>
|
||||
<A NAME="toc5"></A>
|
||||
<H3>Relational nouns</H3>
|
||||
<P>
|
||||
Relational nouns (<I>daughter of x</I>) need a preposition.
|
||||
</P>
|
||||
<PRE>
|
||||
mkN2 : N -> Preposition -> N2 ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
The most common preposition is <I>av</I>, and the following is a
|
||||
shortcut for regular, <CODE>nonhuman</CODE> relational nouns with <I>av</I>.
|
||||
</P>
|
||||
<PRE>
|
||||
regN2 : Str -> Gender -> N2 ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Use the function <CODE>mkPreposition</CODE> or see the section on prepositions below to
|
||||
form other prepositions.
|
||||
</P>
|
||||
<P>
|
||||
Three-place relational nouns (<I>the connection from x to y</I>) need two prepositions.
|
||||
</P>
|
||||
<PRE>
|
||||
mkN3 : N -> Preposition -> Preposition -> N3 ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc6"></A>
|
||||
<H3>Relational common noun phrases</H3>
|
||||
<P>
|
||||
In some cases, you may want to make a complex <CODE>CN</CODE> into a
|
||||
relational noun (e.g. <I>the old town hall of</I>). However, <CODE>N2</CODE> and
|
||||
<CODE>N3</CODE> are purely lexical categories. But you can use the <CODE>AdvCN</CODE>
|
||||
and <CODE>PrepNP</CODE> constructions to build phrases like this.
|
||||
</P>
|
||||
<A NAME="toc7"></A>
|
||||
<H3>Proper names and noun phrases</H3>
|
||||
<P>
|
||||
Proper names, with a regular genitive, are formed as follows
|
||||
</P>
|
||||
<PRE>
|
||||
regPN : Str -> Gender -> PN ; -- John, John's
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Sometimes you can reuse a common noun as a proper name, e.g. <I>Bank</I>.
|
||||
</P>
|
||||
<PRE>
|
||||
nounPN : N -> PN ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
To form a noun phrase that can also be plural and have an irregular
|
||||
genitive, you can use the worst-case function.
|
||||
</P>
|
||||
<PRE>
|
||||
mkNP : Str -> Str -> Number -> Gender -> NP ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc8"></A>
|
||||
<H2>Adjectives</H2>
|
||||
<P>
|
||||
Non-comparison one-place adjectives need for forms:
|
||||
</P>
|
||||
<PRE>
|
||||
mkA : (galen,galet,galna : Str) -> A ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
For regular adjectives, the other forms are derived.
|
||||
</P>
|
||||
<PRE>
|
||||
regA : Str -> A ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
In practice, two forms are enough.
|
||||
</P>
|
||||
<PRE>
|
||||
mk2A : (bred,brett : Str) -> A ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc9"></A>
|
||||
<H3>Two-place adjectives</H3>
|
||||
<P>
|
||||
Two-place adjectives need a preposition for their second argument.
|
||||
</P>
|
||||
<PRE>
|
||||
mkA2 : A -> Preposition -> A2 ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Comparison adjectives may need as many as seven forms.
|
||||
</P>
|
||||
<PRE>
|
||||
ADeg : Type ;
|
||||
|
||||
mkADeg : (liten, litet, lilla, sma, mindre, minst, minsta : Str) -> ADeg ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
The regular pattern works for many adjectives, e.g. those ending
|
||||
with <I>ig</I>.
|
||||
</P>
|
||||
<PRE>
|
||||
regADeg : Str -> ADeg ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Just the comparison forms can be irregular.
|
||||
</P>
|
||||
<PRE>
|
||||
irregADeg : (tung,tyngre,tyngst : Str) -> ADeg ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Sometimes just the positive forms are irregular.
|
||||
</P>
|
||||
<PRE>
|
||||
mk3ADeg : (galen,galet,galna : Str) -> ADeg ;
|
||||
mk2ADeg : (bred,brett : Str) -> ADeg ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
If comparison is formed by <I>more, //most</I>, as in general for//
|
||||
long adjective, the following pattern is used:
|
||||
</P>
|
||||
<PRE>
|
||||
compoundADeg : A -> ADeg ; -- -/more/most ridiculous
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
From a given <CODE>ADeg</CODE>, it is possible to get back to <CODE>A</CODE>.
|
||||
</P>
|
||||
<PRE>
|
||||
adegA : ADeg -> A ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc10"></A>
|
||||
<H2>Adverbs</H2>
|
||||
<P>
|
||||
Adverbs are not inflected. Most lexical ones have position
|
||||
after the verb. Some can be preverbal (e.g. <I>always</I>).
|
||||
</P>
|
||||
<PRE>
|
||||
mkAdv : Str -> Adv ;
|
||||
mkAdV : Str -> AdV ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Adverbs modifying adjectives and sentences can also be formed.
|
||||
</P>
|
||||
<PRE>
|
||||
mkAdA : Str -> AdA ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc11"></A>
|
||||
<H2>Prepositions</H2>
|
||||
<P>
|
||||
A preposition is just a string.
|
||||
</P>
|
||||
<PRE>
|
||||
mkPreposition : Str -> Preposition ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc12"></A>
|
||||
<H2>Verbs</H2>
|
||||
<P>
|
||||
The worst case needs five forms.
|
||||
</P>
|
||||
<PRE>
|
||||
mkV : (supa,super,sup,söp,supit,supen : Str) -> V ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
The 'regular verb' function is the first conjugation if the
|
||||
infinitive ends with <I>a</I> (<I>tala</I> - <I>talar</I> - <I>talade</I> - <I>talat</I>),
|
||||
the third in other cases (<I>bo</I> - <I>bor</I> - <I>bodde</I> - <I>bott</I>).
|
||||
</P>
|
||||
<PRE>
|
||||
regV : (tala : Str) -> V ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
The almost regular verb function needs the infinitive and the preteritum.
|
||||
It can deal with almost all cases in the first, second, and third
|
||||
conjugation: <I>tala</I> - <I>talade</I>, <I>leka</I> - <I>lekte</I>,
|
||||
<I>gräva</I> - <I>grävde</I>, <I>byta</I> - <I>bytte</I>, <I>vända</I> - <I>vände</I>,
|
||||
<I>tyda</I> - <I>tydde</I>, <I>bo</I> - <I>bodde</I>.
|
||||
</P>
|
||||
<PRE>
|
||||
mk2V : (leka,lekte : Str) -> V ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
There is an extensive list of irregular verbs in the module <CODE>IrregularSwe</CODE>.
|
||||
In practice, it is enough to give three forms, as in school books.
|
||||
</P>
|
||||
<PRE>
|
||||
irregV : (dricka, drack, druckit : Str) -> V ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc13"></A>
|
||||
<H3>Verbs with a particle.</H3>
|
||||
<P>
|
||||
The particle, such as in <I>passa på</I>, is given as a string.
|
||||
</P>
|
||||
<PRE>
|
||||
partV : V -> Str -> V ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc14"></A>
|
||||
<H3>Deponent verbs.</H3>
|
||||
<P>
|
||||
Some words are used in passive forms only, e.g. <I>hoppas</I>.
|
||||
</P>
|
||||
<PRE>
|
||||
depV : V -> V ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc15"></A>
|
||||
<H3>Two-place verbs</H3>
|
||||
<P>
|
||||
Two-place verbs need a preposition, except the special case with direct object.
|
||||
(transitive verbs). Notice that a particle comes from the <CODE>V</CODE>.
|
||||
</P>
|
||||
<PRE>
|
||||
mkV2 : V -> Preposition -> V2 ;
|
||||
|
||||
dirV2 : V -> V2 ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc16"></A>
|
||||
<H3>Three-place verbs</H3>
|
||||
<P>
|
||||
Three-place (ditransitive) verbs need two prepositions, of which
|
||||
the first one or both can be absent.
|
||||
</P>
|
||||
<PRE>
|
||||
mkV3 : V -> Preposition -> Preposition -> V3 ; -- tala med om
|
||||
dirV3 : V -> Preposition -> V3 ; -- ge _ till
|
||||
dirdirV3 : V -> V3 ; -- ge _ _
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc17"></A>
|
||||
<H3>Other complement patterns</H3>
|
||||
<P>
|
||||
Verbs and adjectives can take complements such as sentences,
|
||||
questions, verb phrases, and adjectives.
|
||||
</P>
|
||||
<PRE>
|
||||
mkV0 : V -> V0 ;
|
||||
mkVS : V -> VS ;
|
||||
mkV2S : V -> Str -> V2S ;
|
||||
mkVV : V -> VV ;
|
||||
mkV2V : V -> Str -> Str -> V2V ;
|
||||
mkVA : V -> VA ;
|
||||
mkV2A : V -> Str -> V2A ;
|
||||
mkVQ : V -> VQ ;
|
||||
mkV2Q : V -> Str -> V2Q ;
|
||||
|
||||
mkAS : A -> AS ;
|
||||
mkA2S : A -> Str -> A2S ;
|
||||
mkAV : A -> AV ;
|
||||
mkA2V : A -> Str -> A2V ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
Notice: categories <CODE>V2S, V2V, V2A, V2Q</CODE> are in v 1.0 treated
|
||||
just as synonyms of <CODE>V2</CODE>, and the second argument is given
|
||||
as an adverb. Likewise <CODE>AS, A2S, AV, A2V</CODE> are just <CODE>A</CODE>.
|
||||
<CODE>V0</CODE> is just <CODE>V</CODE>.
|
||||
</P>
|
||||
<PRE>
|
||||
V0, V2S, V2V, V2A, V2Q : Type ;
|
||||
AS, A2S, AV, A2V : Type ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<A NAME="toc18"></A>
|
||||
<H2>Definitions of the paradigms</H2>
|
||||
<P>
|
||||
The definitions should not bother the user of the API. So they are
|
||||
hidden from the document.
|
||||
</P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc swedish/ParadigmsSwe.txt -->
|
||||
</BODY></HTML>
|
||||
54
lib/resource-1.0/doc/gfdoc/Phrase.html
Normal file
54
lib/resource-1.0/doc/gfdoc/Phrase.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:51 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Phrase = Cat, Tense ** {
|
||||
|
||||
fun
|
||||
PhrUtt : PConj -> Utt -> Voc -> Phr ;
|
||||
|
||||
UttS : S -> Utt ;
|
||||
UttQS : QS -> Utt ;
|
||||
UttImpSg, UttImpPl : Pol -> Imp -> Utt ;
|
||||
|
||||
UttIP : IP -> Utt ;
|
||||
UttIAdv : IAdv -> Utt ;
|
||||
UttNP : NP -> Utt ;
|
||||
UttAdv : Adv -> Utt ;
|
||||
UttVP : VP -> Utt ;
|
||||
|
||||
NoPConj : PConj ;
|
||||
PConjConj : Conj -> PConj ;
|
||||
|
||||
NoVoc : Voc ;
|
||||
VocNP : NP -> Voc ;
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Phrase.txt -->
|
||||
</BODY></HTML>
|
||||
48
lib/resource-1.0/doc/gfdoc/Question.html
Normal file
48
lib/resource-1.0/doc/gfdoc/Question.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:51 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Question = Cat ** {
|
||||
|
||||
fun
|
||||
|
||||
QuestCl : Cl -> QCl ;
|
||||
QuestVP : IP -> VP -> QCl ;
|
||||
QuestSlash : IP -> Slash -> QCl ;
|
||||
QuestIAdv : IAdv -> Cl -> QCl ;
|
||||
|
||||
PrepIP : Prep -> IP -> IAdv ;
|
||||
AdvIP : IP -> Adv -> IP ;
|
||||
|
||||
IDetCN : IDet -> Num -> Ord -> CN -> IP ;
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Question.txt -->
|
||||
</BODY></HTML>
|
||||
45
lib/resource-1.0/doc/gfdoc/Relative.html
Normal file
45
lib/resource-1.0/doc/gfdoc/Relative.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:51 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Relative = Cat ** {
|
||||
|
||||
fun
|
||||
|
||||
RelCl : Cl -> RCl ;
|
||||
RelVP : RP -> VP -> RCl ;
|
||||
RelSlash : RP -> Slash -> RCl ;
|
||||
|
||||
FunRP : Prep -> NP -> RP -> RP ;
|
||||
IdRP : RP ;
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Relative.txt -->
|
||||
</BODY></HTML>
|
||||
48
lib/resource-1.0/doc/gfdoc/Sentence.html
Normal file
48
lib/resource-1.0/doc/gfdoc/Sentence.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:52 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Sentence = Cat ** {
|
||||
|
||||
fun
|
||||
|
||||
PredVP : NP -> VP -> Cl ;
|
||||
PredSCVP : SC -> VP -> Cl ;
|
||||
|
||||
ImpVP : VP -> Imp ;
|
||||
|
||||
SlashV2 : NP -> V2 -> Slash ;
|
||||
SlashVVV2 : NP -> VV -> V2 -> Slash ;
|
||||
AdvSlash : Slash -> Adv -> Slash ;
|
||||
SlashPrep : Cl -> Prep -> Slash ;
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Sentence.txt -->
|
||||
</BODY></HTML>
|
||||
79
lib/resource-1.0/doc/gfdoc/SeqConjunction.html
Normal file
79
lib/resource-1.0/doc/gfdoc/SeqConjunction.html
Normal file
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:52 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract SeqConjunction = Cat ** {
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
This module is for backward compatibility with API 0.9.
|
||||
To be used instead of Conjunction.
|
||||
</P>
|
||||
<PRE>
|
||||
fun
|
||||
|
||||
ConjS : Conj -> SeqS -> S ; -- "John walks and Mary runs"
|
||||
ConjAP : Conj -> SeqAP -> AP ; -- "even and prime"
|
||||
ConjNP : Conj -> SeqNP -> NP ; -- "John or Mary"
|
||||
ConjAdv : Conj -> SeqAdv -> Adv ; -- "quickly or slowly"
|
||||
|
||||
DConjS : DConj -> SeqS -> S ; -- "either John walks or Mary runs"
|
||||
DConjAP : DConj -> SeqAP -> AP ; -- "both even and prime"
|
||||
DConjNP : DConj -> SeqNP -> NP ; -- "either John or Mary"
|
||||
DConjAdv : DConj -> SeqAdv -> Adv ; -- "both badly and slowly"
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
these are rather uninteresting
|
||||
</P>
|
||||
<PRE>
|
||||
TwoS : S -> S -> SeqS ;
|
||||
AddS : SeqS -> S -> SeqS ;
|
||||
TwoAdv : Adv -> Adv -> SeqAdv ;
|
||||
AddAdv : SeqAdv -> Adv -> SeqAdv ;
|
||||
TwoNP : NP -> NP -> SeqNP ;
|
||||
AddNP : SeqNP -> NP -> SeqNP ;
|
||||
TwoAP : AP -> AP -> SeqAP ;
|
||||
AddAP : SeqAP -> AP -> SeqAP ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
we use right-associative lists instead of GF's built-in lists
|
||||
</P>
|
||||
<PRE>
|
||||
cat
|
||||
SeqS ;
|
||||
SeqAdv ;
|
||||
SeqNP ;
|
||||
SeqAP ;
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/SeqConjunction.txt -->
|
||||
</BODY></HTML>
|
||||
169
lib/resource-1.0/doc/gfdoc/Structural.html
Normal file
169
lib/resource-1.0/doc/gfdoc/Structural.html
Normal file
@@ -0,0 +1,169 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
<TITLE> GF Resource Grammar API for Structural Words</TITLE>
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<P ALIGN="center"><CENTER><H1> GF Resource Grammar API for Structural Words</H1>
|
||||
<FONT SIZE="4">
|
||||
<I>Author: </I><BR>
|
||||
Last update: Tue Jan 10 16:38:52 2006
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<UL>
|
||||
<LI><A HREF="#toc1">GF Resource Grammar API for Structural Words</A>
|
||||
</UL>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<A NAME="toc1"></A>
|
||||
<H1>GF Resource Grammar API for Structural Words</H1>
|
||||
<P>
|
||||
AR 21/11/2003 -- 30/11/2005
|
||||
</P>
|
||||
<P>
|
||||
Here we have some words belonging to closed classes and appearing
|
||||
in all languages we have considered.
|
||||
Sometimes they are not really meaningful, e.g. <CODE>we_NP</CODE> in Spanish
|
||||
should be replaced by masculine and feminine variants.
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Structural = Cat ** {
|
||||
|
||||
fun
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
This is an alphabetical list of structural words
|
||||
</P>
|
||||
<PRE>
|
||||
above_Prep : Prep ;
|
||||
after_Prep : Prep ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
all8mass_Det : Det ;
|
||||
all_NDet : NDet ;
|
||||
</P>
|
||||
<PRE>
|
||||
all_Predet : Predet ; --
|
||||
almost_AdA : AdA ; -- Adv
|
||||
almost_AdN : AdN ; --
|
||||
although_Subj : Subj ;
|
||||
always_AdV : AdV ; --
|
||||
and_Conj : Conj ;
|
||||
because_Subj : Subj ;
|
||||
before_Prep : Prep ;
|
||||
behind_Prep : Prep ;
|
||||
between_Prep : Prep ;
|
||||
both7and_DConj : DConj ; -- ConjD
|
||||
but_PConj : PConj ; --
|
||||
by8agent_Prep : Prep ;
|
||||
by8means_Prep : Prep ;
|
||||
can8know_VV : VV ;
|
||||
can_VV : VV ;
|
||||
during_Prep : Prep ;
|
||||
either7or_DConj : DConj ; -- ConjD
|
||||
every_Det : Det ;
|
||||
everybody_NP : NP ;
|
||||
everything_NP : NP ;
|
||||
everywhere_Adv : Adv ;
|
||||
from_Prep : Prep ;
|
||||
he_Pron : Pron ; -- NP
|
||||
here_Adv : Adv ; --
|
||||
here7to_Adv : Adv ;
|
||||
here7from_Adv : Adv ;
|
||||
how_IAdv : IAdv ;
|
||||
how8many_IDet : IDet ;
|
||||
i_Pron : Pron ; -- NP
|
||||
if_Subj : Subj ;
|
||||
in8front_Prep : Prep ;
|
||||
in_Prep : Prep ;
|
||||
it_Pron : Pron ;
|
||||
less_CAdv : CAdv ; --
|
||||
many_Det : Det ;
|
||||
more_CAdv : CAdv ; --
|
||||
most_Predet : Predet ; -- Det
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
most8many_Det : Det ;
|
||||
</P>
|
||||
<PRE>
|
||||
much_Det : Det ;
|
||||
must_VV : VV ;
|
||||
no_Phr : Phr ;
|
||||
on_Prep : Prep ;
|
||||
only_Predet : Predet ; --
|
||||
or_Conj : Conj ;
|
||||
otherwise_PConj : PConj ; -- AdC
|
||||
part_Prep : Prep ;
|
||||
please_Voc : Voc ;
|
||||
possess_Prep : Prep ;
|
||||
quite_Adv : AdA ;
|
||||
she_Pron : Pron ;
|
||||
so_AdA : AdA ; -- Adv
|
||||
someSg_Det : Det ; -- some_Det
|
||||
somePl_Det : Det ; -- NDet
|
||||
somebody_NP : NP ;
|
||||
something_NP : NP ;
|
||||
somewhere_Adv : Adv ;
|
||||
that_Quant : QuantSg ; -- Det
|
||||
that_NP : NP ;
|
||||
there_Adv : Adv ; --
|
||||
there7to_Adv : Adv ; --
|
||||
there7from_Adv : Adv ; --
|
||||
therefore_PConj : PConj ; -- AdC
|
||||
these_NP : NP ; --
|
||||
these_Quant : QuantPl ; -- NDet
|
||||
</PRE>
|
||||
<P></P>
|
||||
<P>
|
||||
they8fem_NP : NP ;
|
||||
</P>
|
||||
<PRE>
|
||||
they_Pron : Pron ; -- NP
|
||||
this_Quant : QuantSg ; -- NDet
|
||||
this_NP : NP ;
|
||||
those_NP : NP ; --
|
||||
those_Quant : QuantPl ; -- NDet
|
||||
thou_Pron : Pron ; -- NP
|
||||
through_Prep : Prep ;
|
||||
to_Prep : Prep ;
|
||||
too_AdA : AdA ; -- Adv
|
||||
under_Prep : Prep ;
|
||||
very_AdA : AdA ; -- Adv
|
||||
want_VV : VV ;
|
||||
we_Pron : Pron ; -- NP
|
||||
whatPl_IP : IP ; -- many
|
||||
whatSg_IP : IP ; -- one
|
||||
when_IAdv : IAdv ;
|
||||
when_Subj : Subj ;
|
||||
where_IAdv : IAdv ;
|
||||
whichPl_IDet : IDet ; -- many
|
||||
whichSg_IDet : IDet ; -- one
|
||||
whoPl_IP : IP ; -- many
|
||||
whoSg_IP : IP ; -- one
|
||||
why_IAdv : IAdv ;
|
||||
with_Prep : Prep ;
|
||||
without_Prep : Prep ;
|
||||
ye_Pron : Pron ; -- NP
|
||||
yes_Phr : Phr ;
|
||||
you_Pron : Pron ; -- NP
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Structural.txt -->
|
||||
</BODY></HTML>
|
||||
46
lib/resource-1.0/doc/gfdoc/Tense.html
Normal file
46
lib/resource-1.0/doc/gfdoc/Tense.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:52 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Tense = {
|
||||
|
||||
cat
|
||||
Pol ;
|
||||
Tense ;
|
||||
Ant ;
|
||||
|
||||
fun
|
||||
PPos, PNeg : Pol ;
|
||||
TPres, TPast, TFut, TCond : Tense ;
|
||||
ASimul, AAnter : Ant ;
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Tense.txt -->
|
||||
</BODY></HTML>
|
||||
41
lib/resource-1.0/doc/gfdoc/Tensed.html
Normal file
41
lib/resource-1.0/doc/gfdoc/Tensed.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:52 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Tensed = Cat, Tense ** {
|
||||
|
||||
fun
|
||||
UseCl : Tense -> Ant -> Pol -> Cl -> S ;
|
||||
UseQCl : Tense -> Ant -> Pol -> QCl -> QS ;
|
||||
UseRCl : Tense -> Ant -> Pol -> RCl -> RS ;
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Tensed.txt -->
|
||||
</BODY></HTML>
|
||||
48
lib/resource-1.0/doc/gfdoc/Test.html
Normal file
48
lib/resource-1.0/doc/gfdoc/Test.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:52 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Test =
|
||||
Noun,
|
||||
Verb,
|
||||
Adjective,
|
||||
Adverb,
|
||||
-- Numeral,
|
||||
Sentence,
|
||||
Question,
|
||||
Relative,
|
||||
Conjunction,
|
||||
Phrase,
|
||||
Untensed,
|
||||
-- Tensed,
|
||||
Lex
|
||||
** {} ;
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Test.txt -->
|
||||
</BODY></HTML>
|
||||
41
lib/resource-1.0/doc/gfdoc/Untensed.html
Normal file
41
lib/resource-1.0/doc/gfdoc/Untensed.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:52 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Untensed = Cat ** {
|
||||
|
||||
fun
|
||||
PosCl, NegCl : Cl -> S ;
|
||||
PosQCl, NegQCl : QCl -> QS ;
|
||||
PosRCl, NegRCl : RCl -> RS ;
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Untensed.txt -->
|
||||
</BODY></HTML>
|
||||
68
lib/resource-1.0/doc/gfdoc/Verb.html
Normal file
68
lib/resource-1.0/doc/gfdoc/Verb.html
Normal file
@@ -0,0 +1,68 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<FONT SIZE="4">
|
||||
</FONT></CENTER>
|
||||
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P></P>
|
||||
<HR NOSHADE SIZE=1>
|
||||
<P></P>
|
||||
<P>
|
||||
Author:
|
||||
Last update: Tue Jan 10 16:38:53 2006
|
||||
</P>
|
||||
<P>
|
||||
Produced by
|
||||
gfdoc - a rudimentary GF document generator.
|
||||
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
|
||||
</P>
|
||||
<P>
|
||||
==
|
||||
</P>
|
||||
<PRE>
|
||||
abstract Verb = Cat ** {
|
||||
|
||||
fun
|
||||
UseV : V -> VP ;
|
||||
ComplV2 : V2 -> NP -> VP ;
|
||||
ComplV3 : V3 -> NP -> NP -> VP ;
|
||||
|
||||
ComplVV : VV -> VP -> VP ;
|
||||
ComplVS : VS -> S -> VP ;
|
||||
ComplVQ : VQ -> QS -> VP ;
|
||||
|
||||
ComplVA : VA -> AP -> VP ;
|
||||
ComplV2A : V2A -> NP -> AP -> VP ;
|
||||
|
||||
ReflV2 : V2 -> VP ;
|
||||
PassV2 : V2 -> Comp ; --- overgen (V2 with prep)
|
||||
|
||||
UseComp : Comp -> VP ;
|
||||
|
||||
AdvVP : VP -> Adv -> VP ; -- here
|
||||
AdVVP : AdV -> VP -> VP ; -- always
|
||||
|
||||
CompAP : AP -> Comp ;
|
||||
CompNP : NP -> Comp ;
|
||||
CompAdv : Adv -> Comp ;
|
||||
|
||||
UseVV : VV -> V2 ;
|
||||
UseVQ : VQ -> V2 ;
|
||||
UseVS : VS -> V2 ;
|
||||
|
||||
EmbedS : S -> SC ;
|
||||
EmbedQS : QS -> SC ;
|
||||
EmbedVP : VP -> SC ;
|
||||
|
||||
}
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc abstract/Verb.txt -->
|
||||
</BODY></HTML>
|
||||
@@ -49,8 +49,8 @@ concrete CatEng of Cat = open ResEng, Prelude in {
|
||||
|
||||
CN = {s : Number => Case => Str} ;
|
||||
NP, Pron = {s : Case => Str ; a : Agr} ;
|
||||
Det, Quant = {s : Str ; n : Number} ;
|
||||
Predet, Num, Ord = {s : Str} ;
|
||||
Det = {s : Str ; n : Number} ;
|
||||
Predet, QuantSg, QuantPl, Num, Ord = {s : Str} ;
|
||||
|
||||
-- Adverb
|
||||
|
||||
|
||||
@@ -10,16 +10,23 @@ concrete NounEng of Noun = CatEng ** open ResEng, Prelude in {
|
||||
UsePN pn = pn ** {a = agrP3 Sg} ;
|
||||
UsePron p = p ;
|
||||
|
||||
MkDet pred quant num ord = {
|
||||
s = pred.s ++ quant.s ++ num.s ++ ord.s ;
|
||||
n = quant.n
|
||||
DetSg pred quant ord = {
|
||||
s = pred.s ++ quant.s ++ ord.s ;
|
||||
n = Sg
|
||||
} ;
|
||||
|
||||
PossPronSg p = {s = p.s ! Gen ; n = Sg} ;
|
||||
PossPronPl p = {s = p.s ! Gen ; n = Pl} ;
|
||||
DetPl pred quant num ord = {
|
||||
s = pred.s ++ quant.s ++ num.s ++ ord.s ;
|
||||
n = Pl
|
||||
} ;
|
||||
|
||||
PossSg p = {s = p.s ! Gen} ;
|
||||
PossPl p = {s = p.s ! Gen} ;
|
||||
|
||||
NoPredet, NoNum, NoOrd = {s = []} ;
|
||||
|
||||
NumInt n = n ;
|
||||
OrdInt n = {s = n.s ++ "th"} ; ---
|
||||
|
||||
NumNumeral numeral = {s = numeral.s ! NCard} ;
|
||||
OrdNumeral numeral = {s = numeral.s ! NOrd} ;
|
||||
@@ -32,7 +39,13 @@ concrete NounEng of Noun = CatEng ** open ResEng, Prelude in {
|
||||
DefPl = {s = artDef ; n = Pl} ;
|
||||
|
||||
IndefSg = {s = artIndef ; n = Sg} ;
|
||||
IndefPl = {s = [] ; n = Pl} ;
|
||||
IndefPl = {s = [] ; n = Pl} ;
|
||||
|
||||
MassDet = {s = [] ; n = Sg} ;
|
||||
|
||||
UseN n = n ;
|
||||
UseN2 n = n ;
|
||||
UseN3 n = n ;
|
||||
|
||||
ComplN2 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c} ;
|
||||
ComplN3 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ; c2 = f.c3} ;
|
||||
@@ -45,6 +58,4 @@ concrete NounEng of Noun = CatEng ** open ResEng, Prelude in {
|
||||
SentCN cn s = {s = \\n,c => cn.s ! n ! c ++ conjThat ++ s.s} ;
|
||||
QuestCN cn qs = {s = \\n,c => cn.s ! n ! c ++ qs.s ! QIndir} ;
|
||||
|
||||
UseN n = n ;
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ concrete CatGer of Cat = open ResGer, Prelude in {
|
||||
-- Sentence
|
||||
|
||||
Cl = {s : Tense => Anteriority => Polarity => Order => Str} ;
|
||||
Slash = {s : Tense => Anteriority => Polarity => Order => Str} ** {c2 : Preposition} ;
|
||||
Slash = {s : Tense => Anteriority => Polarity => Order => Str} **
|
||||
{c2 : Preposition} ;
|
||||
Imp = {s : Polarity => Number => Str} ;
|
||||
|
||||
-- Question
|
||||
@@ -47,7 +48,8 @@ concrete CatGer of Cat = open ResGer, Prelude in {
|
||||
CN = {s : Adjf => Number => Case => Str ; g : Gender} ;
|
||||
NP = {s : Case => Str ; a : Agr} ;
|
||||
Pron = {s : NPForm => Str ; a : Agr} ;
|
||||
Det, Quant = {s : Gender => Case => Str ; n : Number ; a : Adjf} ;
|
||||
Det = {s : Gender => Case => Str ; n : Number ; a : Adjf} ;
|
||||
QuantSg, QuantPl = {s : Gender => Case => Str ; a : Adjf} ;
|
||||
Predet = {s : Number => Gender => Case => Str} ;
|
||||
Num = {s : Gender => Case => Str} ;
|
||||
Ord = {s : AForm => Str} ;
|
||||
|
||||
@@ -15,9 +15,19 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in {
|
||||
a = pron.a
|
||||
} ;
|
||||
|
||||
MkDet pred quant num ord =
|
||||
DetSg pred quant ord =
|
||||
let
|
||||
n = quant.n ;
|
||||
n = Sg ;
|
||||
a = quant.a
|
||||
in {
|
||||
s = \\g,c => pred.s ! n ! g ! c ++ quant.s ! g ! c ++
|
||||
ord.s ! agrAdj g (adjfCase a c) n c ;
|
||||
n = n ;
|
||||
a = a
|
||||
} ;
|
||||
DetPl pred quant num ord =
|
||||
let
|
||||
n = Pl ;
|
||||
a = quant.a
|
||||
in {
|
||||
s = \\g,c => pred.s ! n ! g ! c ++ quant.s ! g ! c ++
|
||||
@@ -26,13 +36,13 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in {
|
||||
a = a
|
||||
} ;
|
||||
|
||||
PossPronSg p = {
|
||||
PossSg p = {
|
||||
s = \\g,c => p.s ! NPPoss (gennum g Sg) c ;
|
||||
n = Sg ;
|
||||
a = Strong
|
||||
} ;
|
||||
|
||||
PossPronPl p = {
|
||||
PossPl p = {
|
||||
s = \\g,c => p.s ! NPPoss (gennum g Pl) c ;
|
||||
n = Pl ;
|
||||
a = Weak
|
||||
@@ -73,6 +83,18 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in {
|
||||
a = Strong
|
||||
} ;
|
||||
|
||||
MassDet = {
|
||||
s = \\g,c => [] ;
|
||||
n = Sg ;
|
||||
a = Strong
|
||||
} ;
|
||||
|
||||
|
||||
UseN, UseN2, UseN3 = \n -> {
|
||||
s = \\_ => n.s ;
|
||||
g = n.g
|
||||
} ;
|
||||
|
||||
ComplN2 f x = {
|
||||
s = \\_,n,c => f.s ! n ! c ++ appPrep f.c2 x.s ;
|
||||
g = f.g
|
||||
@@ -108,9 +130,5 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in {
|
||||
g = cn.g
|
||||
} ;
|
||||
|
||||
UseN n = {
|
||||
s = \\_ => n.s ;
|
||||
g = n.g
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -58,7 +58,9 @@ incomplete concrete CatScand of Cat =
|
||||
|
||||
CN = {s : Number => DetSpecies => Case => Str ; g : Gender} ;
|
||||
NP,Pron = {s : NPForm => Str ; a : Agr} ;
|
||||
Det, Quant = {s : Gender => Str ; n : Number ; det : DetSpecies} ;
|
||||
Det = {s : Gender => Str ; n : Number ; det : DetSpecies} ;
|
||||
QuantSg = {s : Gender => Str ; det : DetSpecies} ;
|
||||
QuantPl = {s : Gender => Str ; det : DetSpecies} ;
|
||||
Predet = {s : GenNum => Str} ;
|
||||
Num = {s : Gender => Str} ;
|
||||
Ord = {s : Str} ;
|
||||
|
||||
@@ -15,18 +15,23 @@ incomplete concrete NounScand of Noun =
|
||||
|
||||
UsePron p = p ;
|
||||
|
||||
MkDet pred quant num ord = let n = quant.n in {
|
||||
s = \\g => pred.s ! gennum g n ++ quant.s ! g ++ num.s ! g ++ ord.s ;
|
||||
n = n ;
|
||||
DetSg pred quant ord = {
|
||||
s = \\g => pred.s ! gennum g Sg ++ quant.s ! g ++ ord.s ;
|
||||
n = Sg ;
|
||||
det = quant.det
|
||||
} ;
|
||||
DetPl pred quant num ord = {
|
||||
s = \\g => pred.s ! gennum g Pl ++ quant.s ! g ++ num.s ! g ++ ord.s ;
|
||||
n = Pl ;
|
||||
det = quant.det
|
||||
} ;
|
||||
|
||||
PossPronSg p = {
|
||||
PossSg p = {
|
||||
s = \\g => p.s ! NPPoss (gennum g Sg) ;
|
||||
n = Sg ;
|
||||
det = DDef Indef
|
||||
} ;
|
||||
PossPronPl p = {
|
||||
PossPl p = {
|
||||
s = \\_ => p.s ! NPPoss Plg ;
|
||||
n = Pl ;
|
||||
det = DDef Indef
|
||||
@@ -34,7 +39,9 @@ incomplete concrete NounScand of Noun =
|
||||
|
||||
NoPredet, NoNum = {s = \\_ => []} ; -- these get different types!
|
||||
NoOrd = {s = []} ;
|
||||
|
||||
NumInt n = {s = \\_ => n.s} ;
|
||||
OrdInt n = {s = n.s ++ ":e"} ; ---
|
||||
|
||||
NumNumeral numeral = {s = \\g => numeral.s ! NCard g} ;
|
||||
OrdNumeral numeral = {s = numeral.s ! NOrd SupWeak} ;
|
||||
@@ -46,8 +53,15 @@ incomplete concrete NounScand of Noun =
|
||||
DefSg = {s = \\g => artDef (gennum g Sg) ; n = Sg ; det = DDef detDef} ;
|
||||
DefPl = {s = \\_ => artDef Plg ; n = Pl ; det = DDef detDef} ;
|
||||
|
||||
IndefSg = {s = artIndef ; n = Sg ; det = DIndef} ;
|
||||
IndefPl = {s = \\_ => [] ; n = Pl ; det = DIndef} ;
|
||||
IndefSg = {s = artIndef ; n = Sg ; det = DIndef} ;
|
||||
IndefPl = {s = \\_ => [] ; n = Pl ; det = DIndef} ;
|
||||
|
||||
MassDet = {s = \\_ => [] ; n = Sg ; det = DIndef} ;
|
||||
|
||||
UseN, UseN2, UseN3 = \noun -> {
|
||||
s = \\n,d => noun.s ! n ! specDet d ;
|
||||
g = noun.g
|
||||
} ;
|
||||
|
||||
-- The genitive of this $NP$ is not correct: "sonen till mig" (not "migs").
|
||||
|
||||
@@ -81,9 +95,4 @@ incomplete concrete NounScand of Noun =
|
||||
g = g
|
||||
} ;
|
||||
|
||||
UseN noun = {
|
||||
s = \\n,d => noun.s ! n ! specDet d ;
|
||||
g = noun.g
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -280,7 +280,6 @@ doc2txt :: Doc -> String
|
||||
doc2txt (Doc title paras) = unlines $
|
||||
let tit = concat (map item2txt title) in
|
||||
tit:
|
||||
"Author: ":
|
||||
"Last update: %%date(%c)":
|
||||
"% NOTE: this is a txt2tags file.":
|
||||
"% Create an html file from this file using:":
|
||||
@@ -288,7 +287,6 @@ doc2txt (Doc title paras) = unlines $
|
||||
"\n":
|
||||
concat (["Produced by " ++ welcome]) :
|
||||
"\n" :
|
||||
concat (tagTxt "=" [tit]) :
|
||||
empty :
|
||||
map para2txt paras
|
||||
|
||||
|
||||
Reference in New Issue
Block a user