API documentation and slight change in Det syntax

This commit is contained in:
aarne
2006-01-10 15:39:20 +00:00
parent d2dc0e82e8
commit da26bfb246
38 changed files with 4254 additions and 130 deletions

View File

@@ -0,0 +1,5 @@
gfdoc:
gfdoc -txthtml abstract/*.gf
gfdoc -txthtml */Paradigms*.gf
mv abstract/*.html doc/gfdoc
mv */Paradigms*.html doc/gfdoc

View File

@@ -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"
}

View File

@@ -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 ;

View File

@@ -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
} ;

View File

@@ -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 ;

View 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 -&gt; AP ;
ComparA : A -&gt; NP -&gt; AP ;
</PRE>
<P></P>
<P>
<CODE>SuperlA</CODE> belongs to determiner syntax in <CODE>Noun</CODE>.
</P>
<PRE>
ComplA2 : A2 -&gt; NP -&gt; AP ;
ReflA2 : A2 -&gt; AP ;
SentAP : AP -&gt; S -&gt; AP ;
QuestAP : AP -&gt; QS -&gt; AP ;
AdAP : AdA -&gt; AP -&gt; AP ;
</PRE>
<P></P>
<P>
<CODE>AdvA</CODE> that forms adverbs belongs to <CODE>Adverb</CODE>.
Elliptic constructions as usual.
</P>
<PRE>
UseA2 : A2 -&gt; A ;
}
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Adjective.txt -->
</BODY></HTML>

View 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 -&gt; Adv ;
ComparAdvAdj : CAdv -&gt; A -&gt; NP -&gt; Adv ;
ComparAdvAdjS : CAdv -&gt; A -&gt; S -&gt; Adv ;
PrepNP : Prep -&gt; NP -&gt; Adv ;
AdAdv : AdA -&gt; Adv -&gt; Adv ;
SubjS : Subj -&gt; S -&gt; Adv ;
AdvSC : SC -&gt; Adv ;
AdnCAdv : CAdv -&gt; AdN ;
}
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Adverb.txt -->
</BODY></HTML>

View 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>

View 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>

View 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 -&gt; [S] -&gt; S ; -- "John walks and Mary runs"
ConjAP : Conj -&gt; [AP] -&gt; AP ; -- "even and prime"
ConjNP : Conj -&gt; [NP] -&gt; NP ; -- "John or Mary"
ConjAdv : Conj -&gt; [Adv] -&gt; Adv ; -- "quickly or slowly"
DConjS : DConj -&gt; [S] -&gt; S ; -- "either John walks or Mary runs"
DConjAP : DConj -&gt; [AP] -&gt; AP ; -- "both even and prime"
DConjNP : DConj -&gt; [NP] -&gt; NP ; -- "either John or Mary"
DConjAdv : DConj -&gt; [Adv] -&gt; 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>

View 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>

View 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>

View 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 -&gt; [S] -&gt; S ; -- "John walks and Mary runs"
ConjAP : Conj -&gt; [AP] -&gt; AP ; -- "even and prime"
ConjNP : Conj -&gt; [NP] -&gt; NP ; -- "John or Mary"
ConjAdv : Conj -&gt; [Adv] -&gt; Adv ; -- "quickly or slowly"
DConjS : DConj -&gt; [S] -&gt; S ; -- "either John walks or Mary runs"
DConjAP : DConj -&gt; [AP] -&gt; AP ; -- "both even and prime"
DConjNP : DConj -&gt; [NP] -&gt; NP ; -- "either John or Mary"
DConjAdv : DConj -&gt; [Adv] -&gt; 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>

View 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 -&gt; PN ; -- "x"
IntPN : Int -&gt; PN ; -- "27"
CNIntNP : CN -&gt; Int -&gt; NP ; -- "level 53"
CNSymbNP : Det -&gt; CN -&gt; [Symb] -&gt; 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 -&gt; Symb ;
}
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Math.txt -->
</BODY></HTML>

View 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 -&gt; CN -&gt; NP ; -- the man
UsePN : PN -&gt; NP ; -- John
UsePron : Pron -&gt; 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 -&gt; QuantSg -&gt; Ord -&gt; Det ;
DetPl : Predet -&gt; QuantPl -&gt; Num -&gt; Ord -&gt; 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 -&gt; QuantSg ; -- my (house)
PossPl : Pron -&gt; 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 -&gt; Num ; -- 51
NumNumeral : Numeral -&gt; 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 -&gt; Num -&gt; Num ; -- almost 51
</PRE>
<P></P>
<P>
<CODE>Ord</CODE> consists of either digits or numeral words.
</P>
<PRE>
OrdInt : Int -&gt; Ord ; -- 51st
OrdNumeral : Numeral -&gt; Ord ; -- fifty-first
</PRE>
<P></P>
<P>
Superlative forms of adjectives behave syntactically in the same way as
ordinals.
</P>
<PRE>
OrdSuperl : A -&gt; 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 -&gt; CN ; -- house
</PRE>
<P></P>
<P>
Relational nouns take one or two arguments.
</P>
<PRE>
ComplN2 : N2 -&gt; NP -&gt; CN ; -- son of the king
ComplN3 : N3 -&gt; NP -&gt; 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 -&gt; CN ; -- son
UseN3 : N3 -&gt; CN ; -- flight
</PRE>
<P></P>
<P>
Nouns can be modified by adjectives and relative clauses.
</P>
<PRE>
AdjCN : AP -&gt; CN -&gt; CN ; -- big house
RelCN : CN -&gt; RS -&gt; 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 -&gt; S -&gt; CN ; -- fact that John smokes
QuestCN : CN -&gt; QS -&gt; 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>

View 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 -&gt; Numeral ;
n2, n3, n4, n5, n6, n7, n8, n9 : Digit ;
pot01 : Sub10 ; -- 1
pot0 : Digit -&gt; Sub10 ; -- d * 1
pot110 : Sub100 ; -- 10
pot111 : Sub100 ; -- 11
pot1to19 : Digit -&gt; Sub100 ; -- 10 + d
pot0as1 : Sub10 -&gt; Sub100 ; -- coercion of 1..9
pot1 : Digit -&gt; Sub100 ; -- d * 10
pot1plus : Digit -&gt; Sub10 -&gt; Sub100 ; -- d * 10 + n
pot1as2 : Sub100 -&gt; Sub1000 ; -- coercion of 1..99
pot2 : Sub10 -&gt; Sub1000 ; -- m * 100
pot2plus : Sub10 -&gt; Sub100 -&gt; Sub1000 ; -- m * 100 + n
pot2as3 : Sub1000 -&gt; Sub1000000 ; -- coercion of 1..999
pot3 : Sub1000 -&gt; Sub1000000 ; -- m * 1000
pot3plus : Sub1000 -&gt; Sub1000 -&gt; 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>

View 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) -&gt; 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 -&gt; N ;
</P>
<P>
-- In practice the worst case is just: give singular and plural nominative.
</P>
<P>
mk2N : (man,men : Str) -&gt; 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 -&gt; N -&gt; 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 -&gt; Preposition -&gt; 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 -&gt; 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 -&gt; Preposition -&gt; Preposition -&gt; 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 -&gt; Preposition -&gt; N2 ;
cnN3 : CN -&gt; Preposition -&gt; Preposition -&gt; N3 ;
</P>
<P>
--
--3 Proper names and noun phrases
--
-- Proper names, with a regular genitive, are formed as follows
</P>
<P>
regPN : Str -&gt; Gender -&gt; 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 -&gt; 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 -&gt; Str -&gt; Number -&gt; Gender -&gt; 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) -&gt; 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 -&gt; A ;
</P>
<P>
--3 Two-place adjectives
--
-- Two-place adjectives need a preposition for their second argument.
</P>
<P>
mkA2 : A -&gt; Preposition -&gt; A2 ;
</P>
<P>
-- Comparison adjectives may two more forms.
</P>
<P>
ADeg : Type ;
</P>
<P>
mkADeg : (good,better,best,well : Str) -&gt; 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 -&gt; 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 -&gt; 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 -&gt; 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 -&gt; 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 -&gt; Adv ;
mkAdV : Str -&gt; AdV ;
</P>
<P>
-- Adverbs modifying adjectives and sentences can also be formed.
</P>
<P>
mkAdA : Str -&gt; 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 -&gt; Preposition ;
mkPrep : Str -&gt; 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) -&gt; 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 -&gt; V ;
</P>
<P>
-- The following variant duplicates the last letter in the forms like
-- <I>rip - ripped - ripping</I>.
</P>
<P>
regDuplV : Str -&gt; 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) -&gt; V ;
irregDuplV : (get, got, gotten : Str) -&gt; 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 -&gt; Str -&gt; 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 -&gt; Preposition -&gt; V2 ;
</P>
<P>
dirV2 : V -&gt; 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 -&gt; Str -&gt; Str -&gt; V3 ; -- speak, with, about
dirV3 : V -&gt; Str -&gt; V3 ; -- give,_,to
dirdirV3 : V -&gt; 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 -&gt; V0 ;
mkVS : V -&gt; VS ;
mkV2S : V -&gt; Str -&gt; V2S ;
mkVV : V -&gt; VV ;
mkV2V : V -&gt; Str -&gt; Str -&gt; V2V ;
mkVA : V -&gt; VA ;
mkV2A : V -&gt; Str -&gt; V2A ;
mkVQ : V -&gt; VQ ;
mkV2Q : V -&gt; Str -&gt; V2Q ;
</P>
<P>
mkAS : A -&gt; AS ;
mkA2S : A -&gt; Str -&gt; A2S ;
mkAV : A -&gt; AV ;
mkA2V : A -&gt; Str -&gt; 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 -&gt;
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> =&gt; y2ie ray <I>s</I> ;
<I>s</I> =&gt; ray + <I>es</I> ;
<I>z</I> =&gt; ray + <I>es</I> ;
<I>x</I> =&gt; ray + <I>es</I> ;
_ =&gt; case ay of {
<I>sh</I> =&gt; ray + <I>es</I> ;
<I>ch</I> =&gt; ray + <I>es</I> ;
_ =&gt; ray + <I>s</I>
}
}
in
mk2N ray rays ;
</P>
<P>
mk2N = \man,men -&gt;
let mens = case last men of {
<I>s</I> =&gt; men + <I>'</I> ;
_ =&gt; men + <I>'s</I>
}
in
mkN man men (man + <I>'s</I>) mens ;
</P>
<P>
mkN = \man,men,man's,men's -&gt;
mkNoun man men man's men's **** {g = Neutr ; lock_N = &lt;&gt;} ;
</P>
<P>
genderN g man = {s = man.s ; g = g ; lock_N = &lt;&gt;} ;
</P>
<P>
mkN2 = \n,p -&gt; n **** {lock_N2 = &lt;&gt; ; c2 = p} ;
regN2 n = mkN2 (regN n) (mkPreposition <I>of</I>) ;
mkN3 = \n,p,q -&gt; n **** {lock_N3 = &lt;&gt; ; c2 = p ; c3 = q} ;
cnN2 = \n,p -&gt; n **** {lock_N2 = &lt;&gt; ; c2 = p} ;
cnN3 = \n,p,q -&gt; n **** {lock_N3 = &lt;&gt; ; c2 = p ; c3 = q} ;
</P>
<P>
regPN n g = nameReg n g **** {lock_PN = &lt;&gt;} ;
nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = &lt;&gt;} ;
mkNP x y n g = {s = table {Gen =&gt; x ; _ =&gt; y} ; a = (agrP3 n).a ;
lock_NP = &lt;&gt;} ;
</P>
<P>
mkA a b = mkAdjective a a a b **** {lock_A = &lt;&gt;} ;
regA a = regAdjective a **** {lock_A = &lt;&gt;} ;
</P>
<P>
mkA2 a p = a **** {c2 = p ; lock_A2 = &lt;&gt;} ;
</P>
<P>
ADeg = A ; ----
</P>
<P>
mkADeg a b c d = mkAdjective a b c d **** {lock_A = &lt;&gt;} ;
</P>
<P>
regADeg happy =
let
happ = init happy ;
y = last happy ;
happie = case y of {
<I>y</I> =&gt; happ + <I>ie</I> ;
<I>e</I> =&gt; happy ;
_ =&gt; happy + <I>e</I>
} ;
happily = case y of {
<I>y</I> =&gt; happ + <I>ily</I> ;
_ =&gt; 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 = &lt;&gt;} ;
mkAdV x = ss x **** {lock_AdV = &lt;&gt;} ;
mkAdA x = ss x **** {lock_AdA = &lt;&gt;} ;
</P>
<P>
mkPreposition p = p ;
mkPrep p = ss p **** {lock_Prep = &lt;&gt;} ;
</P>
<P>
mkV a b c d e = mkVerbWorst a b c d e **** {s1 = [] ; lock_V = &lt;&gt;} ;
</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> =&gt; crie + <I>d</I> ;
_ =&gt; crie + <I>ed</I>
} ;
crying = case y of {
<I>e</I> =&gt; case last cr of {
<I>e</I> =&gt; cry + <I>ing</I> ;
_ =&gt; cr + <I>ing</I>
} ;
_ =&gt; 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 = &lt;&gt;} ;
</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 = &lt;&gt;} ;
</P>
<P>
mkV2 v p = v **** {s = v.s ; s1 = v.s1 ; c2 = p ; lock_V2 = &lt;&gt;} ;
dirV2 v = mkV2 v [] ;
</P>
<P>
mkV3 v p q = v **** {s = v.s ; s1 = v.s1 ; c2 = p ; c3 = q ; lock_V3 = &lt;&gt;} ;
dirV3 v p = mkV3 v [] p ;
dirdirV3 v = dirV3 v [] ;
</P>
<P>
mkVS v = v **** {lock_VS = &lt;&gt;} ;
mkVV v = v **** {c2 = <I>to</I> ; lock_VV = &lt;&gt;} ;
mkVQ v = v **** {lock_VQ = &lt;&gt;} ;
</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 = &lt;&gt;} ;
mkV2S v p = mkV2 v p **** {lock_V2 = &lt;&gt;} ;
mkV2V v p t = mkV2 v p **** {s4 = t ; lock_V2 = &lt;&gt;} ;
mkVA v = v **** {lock_VA = &lt;&gt;} ;
mkV2A v p = mkV2 v p **** {lock_V2A = &lt;&gt;} ;
mkV2Q v p = mkV2 v p **** {lock_V2 = &lt;&gt;} ;
</P>
<P>
mkAS v = v **** {lock_A = &lt;&gt;} ;
mkA2S v p = mkA2 v p **** {lock_A = &lt;&gt;} ;
mkAV v = v **** {lock_A = &lt;&gt;} ;
mkA2V v p = mkA2 v p **** {lock_A2 = &lt;&gt;} ;
</P>
<P>
} ;
</P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc dutch/ParadigmsDut.txt -->
</BODY></HTML>

View 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) -&gt; 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 -&gt; N ;
</PRE>
<P></P>
<P>
In practice the worst case is just: give singular and plural nominative.
</P>
<PRE>
mk2N : (man,men : Str) -&gt; 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 -&gt; N -&gt; 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 -&gt; Preposition -&gt; 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 -&gt; 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 -&gt; Preposition -&gt; Preposition -&gt; 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 -&gt; Preposition -&gt; N2 ;
cnN3 : CN -&gt; Preposition -&gt; Preposition -&gt; 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 -&gt; Gender -&gt; 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 -&gt; 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 -&gt; Str -&gt; Number -&gt; Gender -&gt; 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) -&gt; 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 -&gt; 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 -&gt; Preposition -&gt; A2 ;
</PRE>
<P></P>
<P>
Comparison adjectives may two more forms.
</P>
<PRE>
ADeg : Type ;
mkADeg : (good,better,best,well : Str) -&gt; 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 -&gt; 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 -&gt; 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 -&gt; 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 -&gt; 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 -&gt; Adv ;
mkAdV : Str -&gt; AdV ;
</PRE>
<P></P>
<P>
Adverbs modifying adjectives and sentences can also be formed.
</P>
<PRE>
mkAdA : Str -&gt; 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 -&gt; Preposition ;
mkPrep : Str -&gt; 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) -&gt; 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 -&gt; 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 -&gt; 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) -&gt; V ;
irregDuplV : (get, got, gotten : Str) -&gt; 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 -&gt; Str -&gt; 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 -&gt; Preposition -&gt; V2 ;
dirV2 : V -&gt; 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 -&gt; Preposition -&gt; Preposition -&gt; V3 ; -- speak, with, about
dirV3 : V -&gt; Preposition -&gt; V3 ; -- give,_,to
dirdirV3 : V -&gt; 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 -&gt; V0 ;
mkVS : V -&gt; VS ;
mkV2S : V -&gt; Str -&gt; V2S ;
mkVV : V -&gt; VV ;
mkV2V : V -&gt; Str -&gt; Str -&gt; V2V ;
mkVA : V -&gt; VA ;
mkV2A : V -&gt; Str -&gt; V2A ;
mkVQ : V -&gt; VQ ;
mkV2Q : V -&gt; Str -&gt; V2Q ;
mkAS : A -&gt; AS ;
mkA2S : A -&gt; Str -&gt; A2S ;
mkAV : A -&gt; AV ;
mkA2V : A -&gt; Str -&gt; 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>

View 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) -&gt; 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 -&gt; N ;
</P>
<P>
-- In practice the worst case is just: give singular and plural nominative.
</P>
<P>
mk2N : (man,men : Str) -&gt; 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 -&gt; N -&gt; 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 -&gt; Preposition -&gt; 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 -&gt; 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 -&gt; Preposition -&gt; Preposition -&gt; 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 -&gt; Preposition -&gt; N2 ;
cnN3 : CN -&gt; Preposition -&gt; Preposition -&gt; N3 ;
</P>
<P>
--
--3 Proper names and noun phrases
--
-- Proper names, with a regular genitive, are formed as follows
</P>
<P>
regPN : Str -&gt; Gender -&gt; 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 -&gt; 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 -&gt; Str -&gt; Number -&gt; Gender -&gt; 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) -&gt; 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 -&gt; A ;
</P>
<P>
--3 Two-place adjectives
--
-- Two-place adjectives need a preposition for their second argument.
</P>
<P>
mkA2 : A -&gt; Preposition -&gt; A2 ;
</P>
<P>
-- Comparison adjectives may two more forms.
</P>
<P>
ADeg : Type ;
</P>
<P>
mkADeg : (good,better,best,well : Str) -&gt; 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 -&gt; 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 -&gt; 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 -&gt; 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 -&gt; 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 -&gt; Adv ;
mkAdV : Str -&gt; AdV ;
</P>
<P>
-- Adverbs modifying adjectives and sentences can also be formed.
</P>
<P>
mkAdA : Str -&gt; 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 -&gt; Preposition ;
mkPrep : Str -&gt; 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) -&gt; 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 -&gt; V ;
</P>
<P>
-- The following variant duplicates the last letter in the forms like
-- <I>rip - ripped - ripping</I>.
</P>
<P>
regDuplV : Str -&gt; 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) -&gt; V ;
irregDuplV : (get, got, gotten : Str) -&gt; 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 -&gt; Str -&gt; 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 -&gt; Preposition -&gt; V2 ;
</P>
<P>
dirV2 : V -&gt; 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 -&gt; Preposition -&gt; Preposition -&gt; V3 ; -- speak, with, about
dirV3 : V -&gt; Preposition -&gt; V3 ; -- give,_,to
dirdirV3 : V -&gt; 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 -&gt; V0 ;
mkVS : V -&gt; VS ;
mkV2S : V -&gt; Str -&gt; V2S ;
mkVV : V -&gt; VV ;
mkV2V : V -&gt; Str -&gt; Str -&gt; V2V ;
mkVA : V -&gt; VA ;
mkV2A : V -&gt; Str -&gt; V2A ;
mkVQ : V -&gt; VQ ;
mkV2Q : V -&gt; Str -&gt; V2Q ;
</P>
<P>
mkAS : A -&gt; AS ;
mkA2S : A -&gt; Str -&gt; A2S ;
mkAV : A -&gt; AV ;
mkA2V : A -&gt; Str -&gt; 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 -&gt;
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> =&gt; y2ie ray <I>s</I> ;
<I>s</I> =&gt; ray + <I>es</I> ;
<I>z</I> =&gt; ray + <I>es</I> ;
<I>x</I> =&gt; ray + <I>es</I> ;
_ =&gt; case ay of {
<I>sh</I> =&gt; ray + <I>es</I> ;
<I>ch</I> =&gt; ray + <I>es</I> ;
_ =&gt; ray + <I>s</I>
}
}
in
mk2N ray rays ;
</P>
<P>
mk2N = \man,men -&gt;
let mens = case last men of {
<I>s</I> =&gt; men + <I>'</I> ;
_ =&gt; men + <I>'s</I>
}
in
mkN man men (man + <I>'s</I>) mens ;
</P>
<P>
mkN = \man,men,man's,men's -&gt;
mkNoun man man's men men's **** {g = Neutr ; lock_N = &lt;&gt;} ;
</P>
<P>
genderN g man = {s = man.s ; g = g ; lock_N = &lt;&gt;} ;
</P>
<P>
mkN2 = \n,p -&gt; n **** {lock_N2 = &lt;&gt; ; c2 = p} ;
regN2 n = mkN2 (regN n) (mkPreposition <I>of</I>) ;
mkN3 = \n,p,q -&gt; n **** {lock_N3 = &lt;&gt; ; c2 = p ; c3 = q} ;
cnN2 = \n,p -&gt; n **** {lock_N2 = &lt;&gt; ; c2 = p} ;
cnN3 = \n,p,q -&gt; n **** {lock_N3 = &lt;&gt; ; c2 = p ; c3 = q} ;
</P>
<P>
regPN n g = nameReg n g **** {lock_PN = &lt;&gt;} ;
nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = &lt;&gt;} ;
mkNP x y n g = {s = table {Gen =&gt; x ; _ =&gt; y} ; a = agrP3 n ;
lock_NP = &lt;&gt;} ;
</P>
<P>
mkA a b = mkAdjective a a a b **** {lock_A = &lt;&gt;} ;
regA a = regAdjective a **** {lock_A = &lt;&gt;} ;
</P>
<P>
mkA2 a p = a **** {c2 = p ; lock_A2 = &lt;&gt;} ;
</P>
<P>
ADeg = A ; ----
</P>
<P>
mkADeg a b c d = mkAdjective a b c d **** {lock_A = &lt;&gt;} ;
</P>
<P>
regADeg happy =
let
happ = init happy ;
y = last happy ;
happie = case y of {
<I>y</I> =&gt; happ + <I>ie</I> ;
<I>e</I> =&gt; happy ;
_ =&gt; happy + <I>e</I>
} ;
happily = case y of {
<I>y</I> =&gt; happ + <I>ily</I> ;
_ =&gt; 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 = &lt;&gt;} ;
mkAdV x = ss x **** {lock_AdV = &lt;&gt;} ;
mkAdA x = ss x **** {lock_AdA = &lt;&gt;} ;
</P>
<P>
mkPreposition p = p ;
mkPrep p = ss p **** {lock_Prep = &lt;&gt;} ;
</P>
<P>
mkV a b c d e = mkVerb a b c d e **** {s1 = [] ; lock_V = &lt;&gt;} ;
</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> =&gt; crie + <I>d</I> ;
_ =&gt; crie + <I>ed</I>
} ;
crying = case y of {
<I>e</I> =&gt; case last cr of {
<I>e</I> =&gt; cry + <I>ing</I> ;
_ =&gt; cr + <I>ing</I>
} ;
_ =&gt; 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 = &lt;&gt;} ;
</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 = &lt;&gt;} ;
</P>
<P>
mkV2 v p = v **** {s = v.s ; s1 = v.s1 ; c2 = p ; lock_V2 = &lt;&gt;} ;
dirV2 v = mkV2 v [] ;
</P>
<P>
mkV3 v p q = v **** {s = v.s ; s1 = v.s1 ; c2 = p ; c3 = q ; lock_V3 = &lt;&gt;} ;
dirV3 v p = mkV3 v [] p ;
dirdirV3 v = dirV3 v [] ;
</P>
<P>
mkVS v = v **** {lock_VS = &lt;&gt;} ;
mkVV v = v **** {c2 = <I>to</I> ; lock_VV = &lt;&gt;} ;
mkVQ v = v **** {lock_VQ = &lt;&gt;} ;
</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 = &lt;&gt;} ;
mkV2S v p = mkV2 v p **** {lock_V2 = &lt;&gt;} ;
mkV2V v p t = mkV2 v p **** {s4 = t ; lock_V2 = &lt;&gt;} ;
mkVA v = v **** {lock_VA = &lt;&gt;} ;
mkV2A v p = mkV2 v p **** {lock_V2A = &lt;&gt;} ;
mkV2Q v p = mkV2 v p **** {lock_V2 = &lt;&gt;} ;
</P>
<P>
mkAS v = v **** {lock_A = &lt;&gt;} ;
mkA2S v p = mkA2 v p **** {lock_A = &lt;&gt;} ;
mkAV v = v **** {lock_A = &lt;&gt;} ;
mkA2V v p = mkA2 v p **** {lock_A2 = &lt;&gt;} ;
</P>
<P>
} ;
</P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc german/ParadigmsGer.txt -->
</BODY></HTML>

View 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) -&gt; 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 -&gt; Gender -&gt; N ;
</PRE>
<P></P>
<P>
In practice the worst case is often just: give singular and plural indefinite.
</P>
<PRE>
mk2N : (nyckel,nycklar : Str) -&gt; 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 -&gt; Preposition -&gt; 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 -&gt; Gender -&gt; 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 -&gt; Preposition -&gt; Preposition -&gt; 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 -&gt; Gender -&gt; 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 -&gt; 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 -&gt; Str -&gt; Number -&gt; Gender -&gt; 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) -&gt; A ;
</PRE>
<P></P>
<P>
For regular adjectives, the other forms are derived.
</P>
<PRE>
regA : Str -&gt; A ;
</PRE>
<P></P>
<P>
In practice, two forms are enough.
</P>
<PRE>
mk2A : (bred,brett : Str) -&gt; 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 -&gt; Preposition -&gt; 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) -&gt; ADeg ;
</PRE>
<P></P>
<P>
The regular pattern works for many adjectives, e.g. those ending
with <I>ig</I>.
</P>
<PRE>
regADeg : Str -&gt; ADeg ;
</PRE>
<P></P>
<P>
Just the comparison forms can be irregular.
</P>
<PRE>
irregADeg : (tung,tyngre,tyngst : Str) -&gt; ADeg ;
</PRE>
<P></P>
<P>
Sometimes just the positive forms are irregular.
</P>
<PRE>
mk3ADeg : (galen,galet,galna : Str) -&gt; ADeg ;
mk2ADeg : (bred,brett : Str) -&gt; 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 -&gt; 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 -&gt; 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 -&gt; Adv ;
mkAdV : Str -&gt; AdV ;
</PRE>
<P></P>
<P>
Adverbs modifying adjectives and sentences can also be formed.
</P>
<PRE>
mkAdA : Str -&gt; AdA ;
</PRE>
<P></P>
<A NAME="toc11"></A>
<H2>Prepositions</H2>
<P>
A preposition is just a string.
</P>
<PRE>
mkPreposition : Str -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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 -&gt; Str -&gt; 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 -&gt; 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 -&gt; Preposition -&gt; V2 ;
dirV2 : V -&gt; 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 -&gt; Preposition -&gt; Preposition -&gt; V3 ; -- tala med om
dirV3 : V -&gt; Preposition -&gt; V3 ; -- ge _ till
dirdirV3 : V -&gt; 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 -&gt; V0 ;
mkVS : V -&gt; VS ;
mkV2S : V -&gt; Str -&gt; V2S ;
mkVV : V -&gt; VV ;
mkV2V : V -&gt; Str -&gt; Str -&gt; V2V ;
mkVA : V -&gt; VA ;
mkV2A : V -&gt; Str -&gt; V2A ;
mkVQ : V -&gt; VQ ;
mkV2Q : V -&gt; Str -&gt; V2Q ;
mkAS : A -&gt; AS ;
mkA2S : A -&gt; Str -&gt; A2S ;
mkAV : A -&gt; AV ;
mkA2V : A -&gt; Str -&gt; 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>

View 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 -&gt; Utt -&gt; Voc -&gt; Phr ;
UttS : S -&gt; Utt ;
UttQS : QS -&gt; Utt ;
UttImpSg, UttImpPl : Pol -&gt; Imp -&gt; Utt ;
UttIP : IP -&gt; Utt ;
UttIAdv : IAdv -&gt; Utt ;
UttNP : NP -&gt; Utt ;
UttAdv : Adv -&gt; Utt ;
UttVP : VP -&gt; Utt ;
NoPConj : PConj ;
PConjConj : Conj -&gt; PConj ;
NoVoc : Voc ;
VocNP : NP -&gt; Voc ;
}
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Phrase.txt -->
</BODY></HTML>

View 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 -&gt; QCl ;
QuestVP : IP -&gt; VP -&gt; QCl ;
QuestSlash : IP -&gt; Slash -&gt; QCl ;
QuestIAdv : IAdv -&gt; Cl -&gt; QCl ;
PrepIP : Prep -&gt; IP -&gt; IAdv ;
AdvIP : IP -&gt; Adv -&gt; IP ;
IDetCN : IDet -&gt; Num -&gt; Ord -&gt; CN -&gt; IP ;
}
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Question.txt -->
</BODY></HTML>

View 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 -&gt; RCl ;
RelVP : RP -&gt; VP -&gt; RCl ;
RelSlash : RP -&gt; Slash -&gt; RCl ;
FunRP : Prep -&gt; NP -&gt; RP -&gt; 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>

View 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 -&gt; VP -&gt; Cl ;
PredSCVP : SC -&gt; VP -&gt; Cl ;
ImpVP : VP -&gt; Imp ;
SlashV2 : NP -&gt; V2 -&gt; Slash ;
SlashVVV2 : NP -&gt; VV -&gt; V2 -&gt; Slash ;
AdvSlash : Slash -&gt; Adv -&gt; Slash ;
SlashPrep : Cl -&gt; Prep -&gt; Slash ;
}
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Sentence.txt -->
</BODY></HTML>

View 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 -&gt; SeqS -&gt; S ; -- "John walks and Mary runs"
ConjAP : Conj -&gt; SeqAP -&gt; AP ; -- "even and prime"
ConjNP : Conj -&gt; SeqNP -&gt; NP ; -- "John or Mary"
ConjAdv : Conj -&gt; SeqAdv -&gt; Adv ; -- "quickly or slowly"
DConjS : DConj -&gt; SeqS -&gt; S ; -- "either John walks or Mary runs"
DConjAP : DConj -&gt; SeqAP -&gt; AP ; -- "both even and prime"
DConjNP : DConj -&gt; SeqNP -&gt; NP ; -- "either John or Mary"
DConjAdv : DConj -&gt; SeqAdv -&gt; Adv ; -- "both badly and slowly"
</PRE>
<P></P>
<P>
these are rather uninteresting
</P>
<PRE>
TwoS : S -&gt; S -&gt; SeqS ;
AddS : SeqS -&gt; S -&gt; SeqS ;
TwoAdv : Adv -&gt; Adv -&gt; SeqAdv ;
AddAdv : SeqAdv -&gt; Adv -&gt; SeqAdv ;
TwoNP : NP -&gt; NP -&gt; SeqNP ;
AddNP : SeqNP -&gt; NP -&gt; SeqNP ;
TwoAP : AP -&gt; AP -&gt; SeqAP ;
AddAP : SeqAP -&gt; AP -&gt; 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>

View 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>

View 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>

View 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 -&gt; Ant -&gt; Pol -&gt; Cl -&gt; S ;
UseQCl : Tense -&gt; Ant -&gt; Pol -&gt; QCl -&gt; QS ;
UseRCl : Tense -&gt; Ant -&gt; Pol -&gt; RCl -&gt; RS ;
}
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Tensed.txt -->
</BODY></HTML>

View 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>

View 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 -&gt; S ;
PosQCl, NegQCl : QCl -&gt; QS ;
PosRCl, NegRCl : RCl -&gt; RS ;
}
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Untensed.txt -->
</BODY></HTML>

View 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 -&gt; VP ;
ComplV2 : V2 -&gt; NP -&gt; VP ;
ComplV3 : V3 -&gt; NP -&gt; NP -&gt; VP ;
ComplVV : VV -&gt; VP -&gt; VP ;
ComplVS : VS -&gt; S -&gt; VP ;
ComplVQ : VQ -&gt; QS -&gt; VP ;
ComplVA : VA -&gt; AP -&gt; VP ;
ComplV2A : V2A -&gt; NP -&gt; AP -&gt; VP ;
ReflV2 : V2 -&gt; VP ;
PassV2 : V2 -&gt; Comp ; --- overgen (V2 with prep)
UseComp : Comp -&gt; VP ;
AdvVP : VP -&gt; Adv -&gt; VP ; -- here
AdVVP : AdV -&gt; VP -&gt; VP ; -- always
CompAP : AP -&gt; Comp ;
CompNP : NP -&gt; Comp ;
CompAdv : Adv -&gt; Comp ;
UseVV : VV -&gt; V2 ;
UseVQ : VQ -&gt; V2 ;
UseVS : VS -&gt; V2 ;
EmbedS : S -&gt; SC ;
EmbedQS : QS -&gt; SC ;
EmbedVP : VP -&gt; SC ;
}
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Verb.txt -->
</BODY></HTML>

View File

@@ -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

View File

@@ -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 ;
}

View File

@@ -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} ;

View File

@@ -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
} ;
}

View File

@@ -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} ;

View File

@@ -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
} ;
}

View File

@@ -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