documenting the library

This commit is contained in:
aarne
2006-02-25 22:58:55 +00:00
parent 5bd28ff6af
commit 607dc668b7
44 changed files with 874 additions and 581 deletions

View File

@@ -15,7 +15,6 @@ Before this, you have to have compiled the libraries:
cd <whatever you need>GF/lib/resource-1.0
make present
make install
To work with the grammar

View File

@@ -1,11 +1,15 @@
-- predefined functions for concrete syntax, defined in AppPredefined.hs
--1 Predefined functions for concrete syntax
-- The definitions of these constants are hard-coded in GF, and defined
-- in [AppPredefined.hs ../src/GF/Grammar/AppPredefined.hs]. Applying
-- them to run-time variables leads to compiler errors that are often
-- only detected at the code generation time.
resource Predef = {
-- this type is for internal use only
param PBool = PTrue | PFalse ;
-- This type of booleans is for internal use only.
-- these operations have their proper definitions in AppPredefined.hs
param PBool = PTrue | PFalse ;
oper Int : Type = variants {} ; -- the type of integers
oper Ints : Int -> Type = variants {} ; -- the type of integers from 0 to n
@@ -25,7 +29,7 @@ resource Predef = {
oper read : (P : Type) -> Tok -> P = variants {} ; -- convert string to param
oper toStr : (L : Type) -> L -> Str = variants {} ; -- find the "first" string
oper mapStr : (L : Type) -> (Str -> Str) -> L -> L = variants {} ;
-- map all strings in a data structure
-- map all strings in a data structure; experimental ---
} ;
} ;

View File

@@ -1,9 +1,13 @@
-- language-independent prelude facilities
--1 The GF Prelude
-- This file defines some prelude facilities usable in all grammars.
resource Prelude = open (Predef=Predef) in {
oper
-- to construct records and tables
--2 Strings, records, and tables
SS : Type = {s : Str} ;
ss : Str -> SS = \s -> {s = s} ;
ss2 : (_,_ : Str) -> SS = \x,y -> ss (x ++ y) ;
@@ -18,37 +22,46 @@ oper
SP1 : Type -> Type = \P -> {s : Str ; p : P} ;
sp1 : (A : Type) -> Str -> A -> SP1 A = \_,s,a -> {s = s ; p = a} ;
constTable : (A,B : Type) -> B -> A => B = \_,_,b -> \\_ => b ;
constStr : (A : Type) -> Str -> A => Str = \A -> constTable A Str ;
-- Discontinuous constituents.
SD2 = {s1,s2 : Str} ;
sd2 : (_,_ : Str) -> SD2 = \x,y -> {s1 = x ; s2 = y} ;
--2 Optional elements
-- Missing form.
nonExist : Str = variants {} ;
-- Optional string with preference on the string vs. empty.
optStr : Str -> Str = \s -> variants {s ; []} ;
strOpt : Str -> Str = \s -> variants {[] ; s} ;
constTable : (A,B : Type) -> B -> A => B = \_,_,b -> \\_ => b ;
constStr : (A : Type) -> Str -> A => Str = \A -> constTable A Str ;
-- Free order between two strings.
bothWays : Str -> Str -> Str = \x,y -> variants {x ++ y ; y ++ x} ;
-- Parametric order between two strings.
preOrPost : Bool -> Str -> Str -> Str = \pr,x,y ->
if_then_Str pr (x ++ y) (y ++ x) ;
--2 Infixes. prefixes, and postfixes
-- Fixes with precedences are defined in [Precedence Precedence.html].
infixSS : Str -> SS -> SS -> SS = \f,x,y -> ss (x.s ++ f ++ y.s) ;
prefixSS : Str -> SS -> SS = \f,x -> ss (f ++ x.s) ;
postfixSS : Str -> SS -> SS = \f,x -> ss (x.s ++ f) ;
embedSS : Str -> Str -> SS -> SS = \f,g,x -> ss (f ++ x.s ++ g) ;
id : (A : Type) -> A -> A = \_,a -> a ;
-- discontinuous
SD2 = {s1,s2 : Str} ;
sd2 : (_,_ : Str) -> SD2 = \x,y -> {s1 = x ; s2 = y} ;
-- parentheses
paren : Str -> Str = \s -> "(" ++ s ++ ")" ;
parenss : SS -> SS = \s -> ss (paren s.s) ;
-- free order between two strings
bothWays : Str -> Str -> Str = \x,y -> variants {x ++ y ; y ++ x} ;
-- parametric order between two strings
preOrPost : Bool -> Str -> Str -> Str = \pr,x,y ->
if_then_Str pr (x ++ y) (y ++ x) ;
-- Booleans
--2 Booleans
param Bool = True | False ;
@@ -70,7 +83,53 @@ oper
_ => nonExist
} ;
-- zero, one, two, or more (elements in a list etc)
-- Interface to internal booleans
pbool2bool : Predef.PBool -> Bool = \b -> case b of {
Predef.PFalse => False ; Predef.PTrue => True
} ;
init : Tok -> Tok = Predef.tk 1 ;
last : Tok -> Tok = Predef.dp 1 ;
--2 High-level acces to Predef operations
isNil : Tok -> Bool = \b -> pbool2bool (Predef.eqStr [] b) ;
ifTok : (A : Type) -> Tok -> Tok -> A -> A -> A = \A,t,u,a,b ->
case Predef.eqStr t u of {Predef.PTrue => a ; Predef.PFalse => b} ;
--2 Lexer-related operations
-- Bind together two tokens in some lexers, either obligatorily or optionally
oper
glue : Str -> Str -> Str = \x,y -> x ++ BIND ++ y ;
glueOpt : Str -> Str -> Str = \x,y -> variants {glue x y ; x ++ y} ;
noglueOpt : Str -> Str -> Str = \x,y -> variants {x ++ y ; glue x y} ;
-- Force capitalization of next word in some unlexers
capitalize : Str -> Str = \s -> CAPIT ++ s ;
-- These should be hidden, and never changed since they are hardcoded in (un)lexers
BIND : Str = "&+" ;
PARA : Str = "&-" ;
CAPIT : Str = "&|" ;
--2 Miscellaneous
-- Identity function
id : (A : Type) -> A -> A = \_,a -> a ;
-- Parentheses
paren : Str -> Str = \s -> "(" ++ s ++ ")" ;
parenss : SS -> SS = \s -> ss (paren s.s) ;
-- Zero, one, two, or more (elements in a list etc)
param
ENumber = E0 | E1 | E2 | Emore ;
@@ -79,34 +138,5 @@ oper
eNext : ENumber -> ENumber = \e -> case e of {
E0 => E1 ; E1 => E2 ; _ => Emore} ;
-- these were defined in Predef before
isNil : Tok -> Bool = \b -> pbool2bool (Predef.eqStr [] b) ;
ifTok : (A : Type) -> Tok -> Tok -> A -> A -> A = \A,t,u,a,b ->
case Predef.eqStr t u of {Predef.PTrue => a ; Predef.PFalse => b} ;
-- so we need an interface
pbool2bool : Predef.PBool -> Bool = \b -> case b of {
Predef.PFalse => False ; Predef.PTrue => True
} ;
init : Tok -> Tok = Predef.tk 1 ;
last : Tok -> Tok = Predef.dp 1 ;
-- bind together two tokens in some lexers, either obligatorily or optionally
oper
glue : Str -> Str -> Str = \x,y -> x ++ BIND ++ y ;
glueOpt : Str -> Str -> Str = \x,y -> variants {glue x y ; x ++ y} ;
noglueOpt : Str -> Str -> Str = \x,y -> variants {x ++ y ; glue x y} ;
-- force capitalization of next word in some unlexers
capitalize : Str -> Str = \s -> CAPIT ++ s ;
-- these should be hidden, and never changed since it's hardcoded in (un)lexers
BIND : Str = "&+" ;
PARA : Str = "&-" ;
CAPIT : Str = "&|" ;
} ;
}

View File

@@ -1,25 +1,23 @@
all: present mathematical multimodal langs
test: langs
test:
echo "gr -cat=Text -number=11 -prob | tb" | gf -nocf -probs=lang.gfprob langs.gfcm
langs:
echo "s ;; pm | wf langs.gfcm" | gf -nocf */Lang??*.gf english/LangEng.gf +RTS -M500M -K100M
echo "s ;; pm | wf langs.gfcm" | gf -nocf -src */Lang??*.gf english/LangEng.gf +RTS -M500M -K100M
cp -p */*.gfc */*.gfr ../alltenses
present:
gf -nocf -preproc=./mkPresent */Lang??*.gf
gf -make -src -preproc=./mkPresent */Lang??*.gf
mv */*.gfc */*.gfr ../present
mathematical: present
gf -batch -nocf -preproc=./mkPresent mathematical/Mathematical???.gf
mv mathematical/*.gf ../mathematical
mathematical:
gf -make -nocf -preproc=./mkPresent mathematical/Mathematical???.gf
mv mathematical/*.gfc ../mathematical
multimodal: present
gf -batch -nocf -preproc=./mkPresent multimodal/Multimodal???.gf
mv multimodal/*.gf ../multimodal
install:
cp -p */*.gfc */*.gfr ../alltenses
multimodal:
gf -make -nocf -preproc=./mkPresent multimodal/Multimodal???.gf
mv multimodal/*.gfc ../multimodal
stat:
wc */*.gfc

View File

@@ -23,6 +23,13 @@ For translation from Eng to all others, try e.g.
gf langs.gfcm
> p -cat=Phr -mcfg "I haven't seen her" | l -multi
To link to the library, use the precompiled packages
- ``lib/alltenses`` the complete ground-API library with all forms
- ``lib/present`` a pruned ground-API library with present tense only
- ``lib/mathematical`` special-purpose API for mathematical applications
- ``lib/multimodal`` special-purpose API for multimodal dialogue applications
The main changes from 0.9 to 1.0 are
1. Refactoring of module structure: there are many more modules now.
@@ -45,19 +52,29 @@ The main changes from 0.9 to 1.0 are
in this case. Also compilation time and amount of generated code (gfr)
decreases quite a bit.
5. Judging from the English implementation, there is a promise to get
a lighter and more efficient resource library, just because of
lessons learned from earlier implementations.
5. The result is a lighter and more efficient resource library, just
because of lessons learned from earlier implementations.
Compared to 0.9, compilation times and gfc sizes have dropped by
50% up to 70%.
Version 0.9 is hereby "frozen" to its current state, which means that
extensions and bug fixes are not carried over to it. However, if
requested, we might provide a reimplementation of the old API using
the new.
When will it be ready? Hopefully around February 2006.
When will it be ready? Today (25 February 2006) the implementation
is complete for 8 languages (which excludes Danish and Russian).
A number of bugs wait to be fixes, and a SourceForge release will
be made some time in March.
BUT WE ALREADY RECOMMEND USING 1.0 INSTEAD OF THE OLDER VERSIONS.
Notice that GF v.
---------- later history and status:
25/2 Added directories for precompiled libraries directly under lib.
See doc/index.html for more information.
21/2 Added modules Text and Idiom. Many bugs fixed, see TODO.
7/2 Finnish added.

View File

@@ -6,17 +6,13 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> Adjectives and adjectival phrases</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:51 2006
<I>Last update: Sat Feb 25 22:35:53 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">Adjectives and adjectival phrases</A>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
@@ -25,8 +21,6 @@ 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>Adjectives and adjectival phrases</H1>
<PRE>
abstract Adjective = Cat ** {
@@ -71,6 +65,6 @@ by <A HREF="Adverb.html">Adverb</A>.
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Adjective.txt -->
</BODY></HTML>

View File

@@ -6,17 +6,13 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> Adverbs and adverbial phrases</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:52 2006
<I>Last update: Sat Feb 25 22:35:53 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">Adverbs and adverbial phrases</A>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
@@ -25,8 +21,6 @@ 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>Adverbs and adverbial phrases</H1>
<PRE>
abstract Adverb = Cat ** {
@@ -76,6 +70,6 @@ Comparison adverbs also work as numeral adverbs.
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Adverb.txt -->
</BODY></HTML>

View File

@@ -6,29 +6,26 @@
</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 Feb 21 16:23:52 2006
<I>Last update: Sat Feb 25 22:35:53 2006</I><BR>
% NOTE: this is a txt2tags file.
</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">Sentences and clauses</A>
<LI><A HREF="#toc4">Questions and interrogatives</A>
<LI><A HREF="#toc5">Relative clauses and pronouns</A>
<LI><A HREF="#toc6">Verb phrases</A>
<LI><A HREF="#toc7">Adjectival phrases</A>
<LI><A HREF="#toc8">Nouns and noun phrases</A>
<LI><A HREF="#toc9">Adverbs</A>
<LI><A HREF="#toc10">Numerals</A>
<LI><A HREF="#toc11">Structural words</A>
<LI><A HREF="#toc12">Words of open classes</A>
<LI><A HREF="#toc1">Top-level units</A>
<LI><A HREF="#toc2">Sentences and clauses</A>
<LI><A HREF="#toc3">Questions and interrogatives</A>
<LI><A HREF="#toc4">Relative clauses and pronouns</A>
<LI><A HREF="#toc5">Verb phrases</A>
<LI><A HREF="#toc6">Adjectival phrases</A>
<LI><A HREF="#toc7">Nouns and noun phrases</A>
<LI><A HREF="#toc8">Adverbs</A>
<LI><A HREF="#toc9">Numerals</A>
<LI><A HREF="#toc10">Structural words</A>
<LI><A HREF="#toc11">Words of open classes</A>
</UL>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
@@ -38,8 +35,6 @@ 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>
<P>
Some categories are inherited from <A HREF="Common.html">Common</A>.
</P>
@@ -49,7 +44,7 @@ Some categories are inherited from <A HREF="Common.html">Common</A>.
cat
</PRE>
<P></P>
<A NAME="toc2"></A>
<A NAME="toc1"></A>
<H2>Top-level units</H2>
<P>
Constructed in <A HREF="Text.html">Text</A>: <CODE>Text</CODE>.
@@ -60,7 +55,7 @@ Constructed in <A HREF="Phrase.html">Phrase</A>: <CODE>Phr</CODE> and
Voc ; -- vocative or "please" e.g. "my darling"
</PRE>
<P></P>
<A NAME="toc3"></A>
<A NAME="toc2"></A>
<H2>Sentences and clauses</H2>
<P>
Constructed in <A HREF="Sentence.html">Sentence</A>, and also in
@@ -76,7 +71,7 @@ Constructed in <A HREF="Sentence.html">Sentence</A>, and also in
SC ; -- embedded sentence or question e.g. "that it rains"
</PRE>
<P></P>
<A NAME="toc4"></A>
<A NAME="toc3"></A>
<H2>Questions and interrogatives</H2>
<P>
Constructed in <A HREF="Question.html">Question</A>.
@@ -88,7 +83,7 @@ Constructed in <A HREF="Question.html">Question</A>.
IDet ; -- interrogative determiner e.g. "which"
</PRE>
<P></P>
<A NAME="toc5"></A>
<A NAME="toc4"></A>
<H2>Relative clauses and pronouns</H2>
<P>
Constructed in <A HREF="Relative.html">Relative</A>.
@@ -98,7 +93,7 @@ Constructed in <A HREF="Relative.html">Relative</A>.
RP ; -- relative pronoun e.g. "in which"
</PRE>
<P></P>
<A NAME="toc6"></A>
<A NAME="toc5"></A>
<H2>Verb phrases</H2>
<P>
Constructed in <A HREF="Verb.html">Verb</A>.
@@ -108,7 +103,7 @@ Constructed in <A HREF="Verb.html">Verb</A>.
Comp ; -- complement of copula, such as AP e.g. "very warm"
</PRE>
<P></P>
<A NAME="toc7"></A>
<A NAME="toc6"></A>
<H2>Adjectival phrases</H2>
<P>
Constructed in <A HREF="Adjective.html">Adjective</A>.
@@ -117,7 +112,7 @@ Constructed in <A HREF="Adjective.html">Adjective</A>.
AP ; -- adjectival phrase e.g. "very warm"
</PRE>
<P></P>
<A NAME="toc8"></A>
<A NAME="toc7"></A>
<H2>Nouns and noun phrases</H2>
<P>
Constructed in <A HREF="Noun.html">Noun</A>.
@@ -144,7 +139,7 @@ as defined in <A HREF="Noun.html">Noun</A>.
Ord ; -- ordinal number (used in Det) e.g. "seventh"
</PRE>
<P></P>
<A NAME="toc9"></A>
<A NAME="toc8"></A>
<H2>Adverbs</H2>
<P>
Constructed in <A HREF="Adverb.html">Adverb</A>.
@@ -157,7 +152,7 @@ Many adverbs are constructed in <A HREF="Structural.html">Structural</A>.
AdN ; -- numeral-modifying adverb, e.g. "more than"
</PRE>
<P></P>
<A NAME="toc10"></A>
<A NAME="toc9"></A>
<H2>Numerals</H2>
<P>
Constructed in <A HREF="Numeral.html">Numeral</A>.
@@ -166,7 +161,7 @@ Constructed in <A HREF="Numeral.html">Numeral</A>.
Numeral;-- cardinal or ordinal, e.g. "five/fifth"
</PRE>
<P></P>
<A NAME="toc11"></A>
<A NAME="toc10"></A>
<H2>Structural words</H2>
<P>
Constructed in <A HREF="Structural.html">Structural</A>.
@@ -180,7 +175,7 @@ Constructed in <A HREF="Structural.html">Structural</A>.
Prep ; -- preposition, or just case e.g. "in"
</PRE>
<P></P>
<A NAME="toc12"></A>
<A NAME="toc11"></A>
<H2>Words of open classes</H2>
<P>
These are constructed in <A HREF="Lexicon.html">Lexicon</A> and in additional lexicon modules.
@@ -207,6 +202,6 @@ These are constructed in <A HREF="Lexicon.html">Lexicon</A> and in additional le
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Cat.txt -->
</BODY></HTML>

View File

@@ -6,17 +6,13 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> Infrastructure with common implementations.</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:52 2006
<I>Last update: Sat Feb 25 22:35:54 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">Infrastructure with common implementations.</A>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
@@ -25,14 +21,12 @@ 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>Infrastructure with common implementations.</H1>
<P>
This module defines the abstract parameters of tense, polarity, and
anteriority, which are used in <A HREF="Phrase.html">Phrase</A> to generate different
forms of sentences. Together they give 2 x 4 x 4 = 16 sentence forms.
These tenses are defined for all languages in the library. More tenses
can be defined in the language extensions, e.g. the <I>passé simple</I> of
can be defined in the language extensions, e.g. the <I>passé simple</I> of
Romance languages.
</P>
<PRE>
@@ -40,21 +34,24 @@ Romance languages.
cat
Text ; -- text consisting of several phrases
Phr ; -- phrase in a text e.g. "But be quiet my darling."
Phr ; -- phrase in a text e.g. "But come here my darling."
Pol ;
Tense ;
Ant ;
fun
PPos, PNeg : Pol ; -- I sleep/don't sleep
TPres, TPast, TFut, TCond : Tense ; -- I sleep/slept/will sleep/would sleep
ASimul, AAnter : Ant ; -- I sleep/have slept
PPos, PNeg : Pol ; -- I sleep/don't sleep
TPres : Tense ;
ASimul : Ant ;
TPast, TFut, TCond : Tense ; -- I slept/will sleep/would sleep --# notpresent
AAnter : Ant ; -- I have slept --# notpresent
}
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Common.txt -->
</BODY></HTML>

View File

@@ -6,21 +6,18 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> Coordination</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:52 2006
<I>Last update: Sat Feb 25 22:35:54 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">Coordination</A>
<UL>
<LI><A HREF="#toc2">Rules</A>
<LI><A HREF="#toc3">Categories</A>
<LI><A HREF="#toc4">List constructors</A>
<LI><A HREF="#toc1">Rules</A>
<LI><A HREF="#toc2">Categories</A>
<LI><A HREF="#toc3">List constructors</A>
</UL>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
@@ -30,8 +27,6 @@ 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>Coordination</H1>
<P>
Coordination is defined for many different categories; here is
a sample. The rules apply to <B>lists</B> of two or more elements,
@@ -51,7 +46,7 @@ compatibility with API 0.9 is needed, use
abstract Conjunction = Cat ** {
</PRE>
<P></P>
<A NAME="toc2"></A>
<A NAME="toc1"></A>
<H2>Rules</H2>
<PRE>
fun
@@ -66,7 +61,7 @@ compatibility with API 0.9 is needed, use
DConjAdv : DConj -&gt; [Adv] -&gt; Adv; -- "both badly and slowly"
</PRE>
<P></P>
<A NAME="toc3"></A>
<A NAME="toc2"></A>
<H2>Categories</H2>
<P>
These categories are only used in this module.
@@ -79,7 +74,7 @@ These categories are only used in this module.
[AP]{2} ;
</PRE>
<P></P>
<A NAME="toc4"></A>
<A NAME="toc3"></A>
<H2>List constructors</H2>
<P>
The list constructors are derived from the list notation and therefore
@@ -92,6 +87,6 @@ not given explicitly. But here are their type signatures:
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Conjunction.txt -->
</BODY></HTML>

View File

@@ -13,19 +13,15 @@
<HR NOSHADE SIZE=1>
<P></P>
<P>
Author:
Last update: Tue Feb 21 16:23:56 2006
Last update: Sat Feb 25 22:36:01 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 Demonstrative = Cat ** {
abstract Demonstrative = Cat, PredefAbs ** {
</PRE>
<P></P>
<P>
@@ -148,6 +144,6 @@ For testing and example-based grammar writing.
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc multimodal/Demonstrative.txt -->
</BODY></HTML>

View File

@@ -6,17 +6,13 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> Idiomatic expressions</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:52 2006
<I>Last update: Sat Feb 25 22:35:54 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">Idiomatic expressions</A>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
@@ -25,8 +21,6 @@ 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>Idiomatic expressions</H1>
<PRE>
abstract Idiom = Cat ** {
</PRE>
@@ -47,6 +41,6 @@ often different even in closely related languages.
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Idiom.txt -->
</BODY></HTML>

View File

@@ -1,181 +1,7 @@
----# -path=.:prelude:../abstract:../common
--
--concrete IrregGer of IrregGerAbs = CatGer ** open ParadigmsGer in {
--
--flags optimize=values ;
--
-- lin
-- awake_V = irregV "awake" "awoke" "awoken" ;
-- bear_V = irregV "bear" "bore" "born" ;
-- beat_V = irregV "beat" "beat" "beat" ;
-- become_V = irregV "become" "became" "become" ;
-- begin_V = irregV "begin" "began" "begun" ;
-- bend_V = irregV "bend" "bent" "bent" ;
-- beset_V = irregV "beset" "beset" "beset" ;
-- bet_V = irregDuplV "bet" "bet" "bet" ;
-- bid_V = irregDuplV "bid" (variants {"bid" ; "bade"}) (variants {"bid" ; "bidden"}) ;
-- bind_V = irregV "bind" "bound" "bound" ;
-- bite_V = irregV "bite" "bit" "bitten" ;
-- bleed_V = irregV "bleed" "bled" "bled" ;
-- blow_V = irregV "blow" "blew" "blown" ;
-- break_V = irregV "break" "broke" "broken" ;
-- breed_V = irregV "breed" "bred" "bred" ;
-- bring_V = irregV "bring" "brought" "brought" ;
-- broadcast_V = irregV "broadcast" "broadcast" "broadcast" ;
-- build_V = irregV "build" "built" "built" ;
-- burn_V = irregV "burn" (variants {"burned" ; "burnt"}) (variants {"burned" ; "burnt"}) ;
-- burst_V = irregV "burst" "burst" "burst" ;
-- buy_V = irregV "buy" "bought" "bought" ;
-- cast_V = irregV "cast" "cast" "cast" ;
-- catch_V = irregV "catch" "caught" "caught" ;
-- choose_V = irregV "choose" "chose" "chosen" ;
-- cling_V = irregV "cling" "clung" "clung" ;
-- come_V = irregV "come" "came" "come" ;
-- cost_V = irregV "cost" "cost" "cost" ;
-- creep_V = irregV "creep" "crept" "crept" ;
-- cut_V = irregDuplV "cut" "cut" "cut" ;
-- deal_V = irregV "deal" "dealt" "dealt" ;
-- dig_V = irregDuplV "dig" "dug" "dug" ;
-- dive_V = irregV "dive" (variants {"dived" ; "dove"}) "dived" ;
-- do_V = mkV "do" "does" "did" "done" "doing" ;
-- draw_V = irregV "draw" "drew" "drawn" ;
-- dream_V = irregV "dream" (variants {"dreamed" ; "dreamt"}) (variants {"dreamed" ; "dreamt"}) ;
-- drive_V = irregV "drive" "drove" "driven" ;
-- drink_V = irregV "drink" "drank" "drunk" ;
-- eat_V = irregV "eat" "ate" "eaten" ;
-- fall_V = irregV "fall" "fell" "fallen" ;
-- feed_V = irregV "feed" "fed" "fed" ;
-- feel_V = irregV "feel" "felt" "felt" ;
-- fight_V = irregV "fight" "fought" "fought" ;
-- find_V = irregV "find" "found" "found" ;
-- fit_V = irregDuplV "fit" "fit" "fit" ;
-- flee_V = irregV "flee" "fled" "fled" ;
-- fling_V = irregV "fling" "flung" "flung" ;
-- fly_V = irregV "fly" "flew" "flown" ;
-- forbid_V = irregDuplV "forbid" "forbade" "forbidden" ;
-- forget_V = irregDuplV "forget" "forgot" "forgotten" ;
-- forgive_V = irregV "forgive" "forgave" "forgiven" ;
-- forsake_V = irregV "forsake" "forsook" "forsaken" ;
-- freeze_V = irregV "freeze" "froze" "frozen" ;
-- get_V = irregDuplV "get" "got" "gotten" ;
-- give_V = irregV "give" "gave" "given" ;
-- go_V = irregV "go" "went" "gone" ;
-- grind_V = irregV "grind" "ground" "ground" ;
-- grow_V = irregV "grow" "grew" "grown" ;
-- hang_V = irregV "hang" "hung" "hung" ;
-- have_V = mkV "have" "has" "had" "had" "having" ;
-- hear_V = irregV "hear" "heard" "heard" ;
-- hide_V = irregV "hide" "hid" "hidden" ;
-- hit_V = irregDuplV "hit" "hit" "hit" ;
-- hold_V = irregV "hold" "held" "held" ;
-- hurt_V = irregV "hurt" "hurt" "hurt" ;
-- keep_V = irregV "keep" "kept" "kept" ;
-- kneel_V = irregV "kneel" "knelt" "knelt" ;
-- knit_V = irregDuplV "knit" "knit" "knit" ;
-- know_V = irregV "know" "knew" "know" ;
-- lay_V = irregV "lay" "laid" "laid" ;
-- lead_V = irregV "lead" "led" "led" ;
-- leap_V = irregV "leap" (variants {"leaped" ; "lept"}) (variants {"leaped" ; "lept"}) ;
-- learn_V = irregV "learn" (variants {"learned" ; "learnt"}) (variants {"learned" ; "learnt"}) ;
-- leave_V = irregV "leave" "left" "left" ;
-- lend_V = irregV "lend" "lent" "lent" ;
-- let_V = irregDuplV "let" "let" "let" ;
-- lie_V = irregV "lie" "lay" "lain" ;
-- light_V = irregV "light" (variants {"lighted" ; "lit"}) "lighted" ;
-- lose_V = irregV "lose" "lost" "lost" ;
-- make_V = irregV "make" "made" "made" ;
-- mean_V = irregV "mean" "meant" "meant" ;
-- meet_V = irregV "meet" "met" "met" ;
-- misspell_V = irregV "misspell" (variants {"misspelled" ; "misspelt"}) (variants {"misspelled" ; "misspelt"}) ;
-- mistake_V = irregV "mistake" "mistook" "mistaken" ;
-- mow_V = irregV "mow" "mowed" (variants {"mowed" ; "mown"}) ;
-- overcome_V = irregV "overcome" "overcame" "overcome" ;
-- overdo_V = mkV "overdo" "overdoes" "overdid" "overdone" "overdoing" ;
-- overtake_V = irregV "overtake" "overtook" "overtaken" ;
-- overthrow_V = irregV "overthrow" "overthrew" "overthrown" ;
-- pay_V = irregV "pay" "paid" "paid" ;
-- plead_V = irregV "plead" "pled" "pled" ;
-- prove_V = irregV "prove" "proved" (variants {"proved" ; "proven"}) ;
-- put_V = irregDuplV "put" "put" "put" ;
-- quit_V = irregDuplV "quit" "quit" "quit" ;
-- read_V = irregV "read" "read" "read" ;
-- rid_V = irregDuplV "rid" "rid" "rid" ;
-- ride_V = irregV "ride" "rode" "ridden" ;
-- ring_V = irregV "ring" "rang" "rung" ;
-- rise_V = irregV "rise" "rose" "risen" ;
-- run_V = irregDuplV "run" "ran" "run" ;
-- saw_V = irregV "saw" "sawed" (variants {"sawed" ; "sawn"}) ;
-- say_V = irregV "say" "said" "said" ;
-- see_V = irregV "see" "saw" "seen" ;
-- seek_V = irregV "seek" "sought" "sought" ;
-- sell_V = irregV "sell" "sold" "sold" ;
-- send_V = irregV "send" "sent" "sent" ;
-- set_V = irregDuplV "set" "set" "set" ;
-- sew_V = irregV "sew" "sewed" (variants {"sewed" ; "sewn"}) ;
-- shake_V = irregV "shake" "shook" "shaken" ;
-- shave_V = irregV "shave" "shaved" (variants {"shaved" ; "shaven"}) ;
-- shear_V = irregV "shear" "shore" "shorn" ;
-- shed_V = irregDuplV "shed" "shed" "shed" ;
-- shine_V = irregV "shine" "shone" "shone" ;
-- shoe_V = irregV "shoe" "shoed" (variants {"shoed" ; "shod"}) ;
-- shoot_V = irregV "shoot" "shot" "shot" ;
-- show_V = irregV "show" "showed" (variants {"showed" ; "shown"}) ;
-- shrink_V = irregV "shrink" "shrank" "shrunk" ;
-- shut_V = irregDuplV "shut" "shut" "shut" ;
-- sing_V = irregV "sing" "sang" "sung" ;
-- sink_V = irregV "sink" "sank" "sunk" ;
-- sit_V = irregDuplV "sit" "sat" "sat" ;
-- sleep_V = irregV "sleep" "slept" "slept" ;
-- slay_V = irregV "slay" "slew" "slain" ;
-- slide_V = irregV "slide" "slid" "slid" ;
-- sling_V = irregV "sling" "slung" "slung" ;
-- slit_V = irregDuplV "slit" "slit" "slit" ;
-- smite_V = irregV "smite" "smote" "smitten" ;
-- sow_V = irregV "sow" "sowed" (variants {"sowed" ; "sown"}) ;
-- speak_V = irregV "speak" "spoke" "spoken" ;
-- speed_V = irregV "speed" "sped" "sped" ;
-- spend_V = irregV "spend" "spent" "spent" ;
-- spill_V = irregV "spill" (variants {"spilled" ; "spilt"}) (variants {"spilled" ; "spilt"}) ;
-- spin_V = irregDuplV "spin" "spun" "spun" ;
-- spit_V = irregDuplV "spit" (variants {"spit" ; "spat"}) "spit" ;
-- split_V = irregDuplV "split" "split" "split" ;
-- spread_V = irregV "spread" "spread" "spread" ;
-- spring_V = irregV "spring" (variants {"sprang" ; "sprung"}) "sprung" ;
-- stand_V = irregV "stand" "stood" "stood" ;
-- steal_V = irregV "steal" "stole" "stolen" ;
-- stick_V = irregV "stick" "stuck" "stuck" ;
-- sting_V = irregV "sting" "stung" "stung" ;
-- stink_V = irregV "stink" "stank" "stunk" ;
-- stride_V = irregV "stride" "strod" "stridden" ;
-- strike_V = irregV "strike" "struck" "struck" ;
-- string_V = irregV "string" "strung" "strung" ;
-- strive_V = irregV "strive" "strove" "striven" ;
-- swear_V = irregV "swear" "swore" "sworn" ;
-- sweep_V = irregV "sweep" "swept" "swept" ;
-- swell_V = irregV "swell" "swelled" (variants {"swelled" ; "swollen"}) ;
-- swim_V = irregDuplV "swim" "swam" "swum" ;
-- swing_V = irregV "swing" "swung" "swung" ;
-- take_V = irregV "take" "took" "taken" ;
-- teach_V = irregV "teach" "taught" "taught" ;
-- tear_V = irregV "tear" "tore" "torn" ;
-- tell_V = irregV "tell" "told" "told" ;
-- think_V = irregV "think" "thought" "thought" ;
-- thrive_V = irregV "thrive" (variants {"thrived" ; "throve"}) "thrived" ;
-- throw_V = irregV "throw" "threw" "thrown" ;
-- thrust_V = irregV "thrust" "thrust" "thrust" ;
-- tread_V = irregV "tread" "trod" "trodden" ;
-- understand_V = irregV "understand" "understood" "understood" ;
-- uphold_V = irregV "uphold" "upheld" "upheld" ;
-- upset_V = irregDuplV "upset" "upset" "upset" ;
-- wake_V = irregV "wake" "woke" "woken" ;
-- wear_V = irregV "wear" "wore" "worn" ;
-- weave_V = irregV "weave" (variants {"weaved" ; "wove"}) (variants {"weaved" ; "woven"}) ;
-- wed_V = irregDuplV "wed" "wed" "wed" ;
-- weep_V = irregV "weep" "wept" "wept" ;
-- wind_V = irregV "wind" "wound" "wound" ;
-- win_V = irregDuplV "win" "won" "won" ;
-- withhold_V = irregV "withhold" "withheld" "withheld" ;
-- withstand_V = irregV "withstand" "withstood" "withstood" ;
-- wring_V = irregV "wring" "wrung" "wrung" ;
-- write_V = irregV "write" "wrote" "written" ;
--}
--# -path=.:prelude:../abstract:../common
concrete IrregGer of IrregGerAbs = CatGer ** open ParadigmsGer in {
flags optimize=values ;
}

View File

@@ -6,17 +6,13 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> The Main Module of the Resource Grammar</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:53 2006
<I>Last update: Sat Feb 25 22:35:55 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">The Main Module of the Resource Grammar</A>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
@@ -25,8 +21,6 @@ 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 Main Module of the Resource Grammar</H1>
<P>
This grammar is just a collection of the different modules,
and the one that can be imported when one wants to test the
@@ -52,6 +46,6 @@ grammar. A smaller top module is <A HREF="Test.html">Test</A>.
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Lang.txt -->
</BODY></HTML>

View File

@@ -6,17 +6,13 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> The Mathematics API to the Resource Grammar</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:56 2006
<I>Last update: Sat Feb 25 22:36:00 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">The Mathematics API to the Resource Grammar</A>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
@@ -25,8 +21,6 @@ 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 Mathematics API to the Resource Grammar</H1>
<P>
This grammar is a collection of the different modules.
It differs from <CODE>Lang</CODE> in two main ways:
@@ -47,10 +41,10 @@ are included, and that symbolic expressions are recognized as NPs.
<P></P>
<P>
Verb,
Adjective,
Adverb,
</P>
<PRE>
Adjective,
Adverb,
Numeral,
</PRE>
<P></P>
@@ -62,6 +56,8 @@ Sentence,
Relative,
Conjunction,
Phrase,
Text,
Idiom,
Structural,
Symbol,
@@ -72,6 +68,6 @@ Sentence,
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc mathematical/Mathematical.txt -->
</BODY></HTML>

View File

@@ -13,17 +13,13 @@
<HR NOSHADE SIZE=1>
<P></P>
<P>
Author:
Last update: Tue Feb 21 16:23:56 2006
Last update: Sat Feb 25 22:36:01 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 Multimodal =
Noun,
@@ -54,6 +50,6 @@ Tensed,
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc multimodal/Multimodal.txt -->
</BODY></HTML>

View File

@@ -6,21 +6,18 @@
</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 Feb 21 16:23:53 2006
<I>Last update: Sat Feb 25 22:35:55 2006</I><BR>
% NOTE: this is a txt2tags file.
</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>
<LI><A HREF="#toc1">Noun phrases</A>
<LI><A HREF="#toc2">Determiners</A>
<LI><A HREF="#toc3">Common nouns</A>
</UL>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
@@ -30,13 +27,11 @@ 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 ** {
</PRE>
<P></P>
<A NAME="toc2"></A>
<A NAME="toc1"></A>
<H2>Noun phrases</H2>
<P>
The three main types of noun phrases are
@@ -62,7 +57,7 @@ A noun phrase already formed can be modified by a Predeterminer.
PredetNP : Predet -&gt; NP -&gt; NP; -- only the man
</PRE>
<P></P>
<A NAME="toc3"></A>
<A NAME="toc2"></A>
<H2>Determiners</H2>
<P>
The determiner has a fine-grained structure, in which a 'nucleus'
@@ -156,7 +151,7 @@ in semantically odd expressions.
<P>
Other determiners are defined in <A HREF="Structural.html">Structural</A>.
</P>
<A NAME="toc4"></A>
<A NAME="toc3"></A>
<H2>Common nouns</H2>
<P>
Simple nouns can be used as nouns outright.
@@ -205,6 +200,6 @@ to decide. Sentential complements are defined in <A HREF="Verb.html">Verb</A>.
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Noun.txt -->
</BODY></HTML>

View File

@@ -6,17 +6,13 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> Numerals</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:53 2006
<I>Last update: Sat Feb 25 22:35:55 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">Numerals</A>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
@@ -25,8 +21,6 @@ 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>Numerals</H1>
<P>
This grammar defines numerals from 1 to 999999.
The implementations are adapted from the
@@ -74,6 +68,6 @@ because we can assume that numbers form plural noun phrases.
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Numeral.txt -->
</BODY></HTML>

View File

@@ -42,8 +42,7 @@
<HR NOSHADE SIZE=1>
<P></P>
<P>
Author:
Last update: Tue Feb 21 16:23:54 2006
Last update: Sat Feb 25 22:35:58 2006
</P>
<P>
Produced by
@@ -51,9 +50,6 @@ 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:../common
</P>
<A NAME="toc1"></A>
@@ -463,6 +459,6 @@ 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) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc english/ParadigmsEng.txt -->
</BODY></HTML>

View File

@@ -27,8 +27,7 @@
<HR NOSHADE SIZE=1>
<P></P>
<P>
Author:
Last update: Tue Feb 21 16:23:55 2006
Last update: Sat Feb 25 22:35:58 2006
</P>
<P>
Produced by
@@ -36,9 +35,6 @@ 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:../common:../../prelude
</P>
<A NAME="toc1"></A>
@@ -519,6 +515,6 @@ 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) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc finnish/ParadigmsFin.txt -->
</BODY></HTML>

View File

@@ -40,8 +40,7 @@
<HR NOSHADE SIZE=1>
<P></P>
<P>
Author:
Last update: Tue Feb 21 16:23:55 2006
Last update: Sat Feb 25 22:35:58 2006
</P>
<P>
Produced by
@@ -49,9 +48,6 @@ 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=.:../romance:../common:../abstract:../../prelude
</P>
<A NAME="toc1"></A>
@@ -418,6 +414,6 @@ 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) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc french/ParadigmsFre.txt -->
</BODY></HTML>

View File

@@ -34,8 +34,7 @@
<HR NOSHADE SIZE=1>
<P></P>
<P>
Author:
Last update: Tue Feb 21 16:23:55 2006
Last update: Sat Feb 25 22:35:59 2006
</P>
<P>
Produced by
@@ -43,9 +42,6 @@ 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=.:../common:../abstract:../../prelude
</P>
<A NAME="toc1"></A>
@@ -378,6 +374,6 @@ 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) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc german/ParadigmsGer.txt -->
</BODY></HTML>

View File

@@ -40,8 +40,7 @@
<HR NOSHADE SIZE=1>
<P></P>
<P>
Author:
Last update: Tue Feb 21 16:23:55 2006
Last update: Sat Feb 25 22:35:59 2006
</P>
<P>
Produced by
@@ -49,9 +48,6 @@ 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=.:../romance:../common:../abstract:../../prelude
</P>
<A NAME="toc1"></A>
@@ -417,6 +413,6 @@ 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) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc italian/ParadigmsIta.txt -->
</BODY></HTML>

View File

@@ -42,8 +42,7 @@
<HR NOSHADE SIZE=1>
<P></P>
<P>
Author:
Last update: Tue Feb 21 16:23:55 2006
Last update: Sat Feb 25 22:35:59 2006
</P>
<P>
Produced by
@@ -51,9 +50,6 @@ 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>
@@ -443,6 +439,6 @@ 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) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc norwegian/ParadigmsNor.txt -->
</BODY></HTML>

View File

@@ -40,8 +40,7 @@
<HR NOSHADE SIZE=1>
<P></P>
<P>
Author:
Last update: Tue Feb 21 16:23:55 2006
Last update: Sat Feb 25 22:35:59 2006
</P>
<P>
Produced by
@@ -49,9 +48,6 @@ 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=.:../romance:../common:../abstract:../../prelude
</P>
<A NAME="toc1"></A>
@@ -424,6 +420,6 @@ 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) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc spanish/ParadigmsSpa.txt -->
</BODY></HTML>

View File

@@ -42,8 +42,7 @@
<HR NOSHADE SIZE=1>
<P></P>
<P>
Author:
Last update: Tue Feb 21 16:23:55 2006
Last update: Sat Feb 25 22:36:00 2006
</P>
<P>
Produced by
@@ -51,9 +50,6 @@ 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>
@@ -427,6 +423,6 @@ 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) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc swedish/ParadigmsSwe.txt -->
</BODY></HTML>

View File

@@ -6,17 +6,13 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> Phrases and utterances</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:53 2006
<I>Last update: Sat Feb 25 22:35:56 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">Phrases and utterances</A>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
@@ -25,8 +21,6 @@ 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>Phrases and utterances</H1>
<PRE>
abstract Phrase = Cat ** {
</PRE>
@@ -87,6 +81,6 @@ which may be overgenerating (e.g. <I>I</I>).
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Phrase.txt -->
</BODY></HTML>

View File

@@ -0,0 +1,180 @@
<!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>
Last update: Sat Feb 25 22:36:02 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>
operations for precedence-dependent strings.
five levels:
p4 (constants), p3 (applications), p2 (products), p1 (sums), p0 (arrows)
</P>
<PRE>
resource Precedence = open Prelude in {
param
Prec = p4 | p3 | p2 | p1 | p0 ;
lintype
PrecTerm = Prec =&gt; Str ;
oper
pss : PrecTerm -&gt; {s : PrecTerm} = \s -&gt; {s = s} ;
</PRE>
<P></P>
<P>
change this if you want some other type of parentheses
</P>
<PRE>
mkParenth : Str -&gt; Str = \str -&gt; "(" ++ str ++ ")" ;
</PRE>
<P></P>
<P>
define ordering of precedences
</P>
<PRE>
nextPrec : Prec =&gt; Prec =
table {p0 =&gt; p1 ; p1 =&gt; p2 ; p2 =&gt; p3 ; _ =&gt; p4} ;
prevPrec : Prec =&gt; Prec =
table {p4 =&gt; p3 ; p3 =&gt; p2 ; p2 =&gt; p1 ; _ =&gt; p0} ;
mkPrec : Str -&gt; Prec =&gt; Prec =&gt; Str = \str -&gt;
table {
p4 =&gt; table { -- use the term of precedence p4...
_ =&gt; str} ; -- ...always without parentheses
p3 =&gt; table { -- use the term of precedence p3...
p4 =&gt; mkParenth str ; -- ...in parentheses if p4 is required...
_ =&gt; str} ; -- ...otherwise without parentheses
p2 =&gt; table {
p4 =&gt; mkParenth str ;
p3 =&gt; mkParenth str ;
_ =&gt; str} ;
p1 =&gt; table {
p1 =&gt; str ;
p0 =&gt; str ;
_ =&gt; mkParenth str} ;
p0 =&gt; table {
p0 =&gt; str ;
_ =&gt; mkParenth str}
} ;
</PRE>
<P></P>
<P>
make a string into a constant, of precedence p4
</P>
<PRE>
mkConst : Str -&gt; PrecTerm =
\f -&gt;
mkPrec f ! p4 ;
</PRE>
<P></P>
<P>
make a string into a 1/2/3 -place prefix operator, of precedence p3
</P>
<PRE>
mkFun1 : Str -&gt; PrecTerm -&gt; PrecTerm =
\f -&gt; \x -&gt;
table {k =&gt; mkPrec (f ++ x ! p4) ! p3 ! k} ;
mkFun2 : Str -&gt; PrecTerm -&gt; PrecTerm -&gt; PrecTerm =
\f -&gt; \x -&gt; \y -&gt;
table {k =&gt; mkPrec (f ++ x ! p4 ++ y ! p4) ! p3 ! k} ;
mkFun3 : Str -&gt; PrecTerm -&gt; PrecTerm -&gt; PrecTerm -&gt; PrecTerm =
\f -&gt; \x -&gt; \y -&gt; \z -&gt;
table {k =&gt; mkPrec (f ++ x ! p4 ++ y ! p4 ++ z ! p4) ! p3 ! k} ;
</PRE>
<P></P>
<P>
make a string into a non/left/right -associative infix operator, of precedence p
</P>
<PRE>
mkInfix : Str -&gt; Prec -&gt; PrecTerm -&gt; PrecTerm -&gt; PrecTerm =
\f -&gt; \p -&gt; \x -&gt; \y -&gt;
table {k =&gt; mkPrec (x ! (nextPrec ! p) ++ f ++ y ! (nextPrec ! p)) ! p ! k} ;
mkInfixL : Str -&gt; Prec -&gt; PrecTerm -&gt; PrecTerm -&gt; PrecTerm =
\f -&gt; \p -&gt; \x -&gt; \y -&gt;
table {k =&gt; mkPrec (x ! p ++ f ++ y ! (nextPrec ! p)) ! p ! k} ;
mkInfixR : Str -&gt; Prec -&gt; PrecTerm -&gt; PrecTerm -&gt; PrecTerm =
\f -&gt; \p -&gt; \x -&gt; \y -&gt;
table {k =&gt; mkPrec (x ! (nextPrec ! p) ++ f ++ y ! p) ! p ! k} ;
</PRE>
<P></P>
<HR NOSHADE SIZE=1>
<P>
alternative:
precedence as inherent feature
</P>
<PRE>
lintype TermWithPrec = {s : Str ; p : Prec} ;
oper
mkpPrec : Str -&gt; Prec -&gt; TermWithPrec =
\f -&gt; \p -&gt;
{s = f ; p = p} ;
usePrec : TermWithPrec -&gt; Prec -&gt; Str =
\x -&gt; \p -&gt;
mkPrec x.s ! x.p ! p ;
</PRE>
<P></P>
<P>
make a string into a constant, of precedence p4
</P>
<PRE>
mkpConst : Str -&gt; TermWithPrec =
\f -&gt;
mkpPrec f p4 ;
</PRE>
<P></P>
<P>
make a string into a 1/2/3 -place prefix operator, of precedence p3
</P>
<PRE>
mkpFun1 : Str -&gt; TermWithPrec -&gt; TermWithPrec =
\f -&gt; \x -&gt;
mkpPrec (f ++ usePrec x p4) p3 ;
mkpFun2 : Str -&gt; TermWithPrec -&gt; TermWithPrec -&gt; TermWithPrec =
\f -&gt; \x -&gt; \y -&gt;
mkpPrec (f ++ usePrec x p4 ++ usePrec y p4) p3 ;
mkpFun3 : Str -&gt; TermWithPrec -&gt; TermWithPrec -&gt; TermWithPrec -&gt; TermWithPrec =
\f -&gt; \x -&gt; \y -&gt; \z -&gt;
mkpPrec (f ++ usePrec x p4 ++ usePrec y p4 ++ usePrec z p4) p3 ;
</PRE>
<P></P>
<P>
make a string a into non/left/right -associative infix operator, of precedence p
</P>
<PRE>
mkpInfix : Str -&gt; Prec -&gt; TermWithPrec -&gt; TermWithPrec -&gt; TermWithPrec =
\f -&gt; \p -&gt; \x -&gt; \y -&gt;
mkpPrec (usePrec x (nextPrec ! p) ++ f ++ usePrec y (nextPrec ! p)) p ;
mkpInfixL : Str -&gt; Prec -&gt; TermWithPrec -&gt; TermWithPrec -&gt; TermWithPrec =
\f -&gt; \p -&gt; \x -&gt; \y -&gt;
mkpPrec (usePrec x p ++ f ++ usePrec y (nextPrec ! p)) p ;
mkpInfixR : Str -&gt; Prec -&gt; TermWithPrec -&gt; TermWithPrec -&gt; TermWithPrec =
\f -&gt; \p -&gt; \x -&gt; \y -&gt;
mkpPrec (usePrec x (nextPrec ! p) ++ f ++ usePrec y p) p ;
} ;
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc ../prelude/Precedence.txt -->
</BODY></HTML>

View File

@@ -0,0 +1,66 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
<TITLE> Predefined functions for concrete syntax</TITLE>
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> Predefined functions for concrete syntax</H1>
<FONT SIZE="4">
<I>Last update: Sat Feb 25 22:36:02 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<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>
<P>
The definitions of these constants are hard-coded in GF, and defined
in <A HREF="../src/GF/Grammar/AppPredefined.hs">AppPredefined.hs</A>. Applying
them to run-time variables leads to compiler errors that are often
only detected at the code generation time.
</P>
<PRE>
resource Predef = {
</PRE>
<P></P>
<P>
This type of booleans is for internal use only.
</P>
<PRE>
param PBool = PTrue | PFalse ;
oper Int : Type = variants {} ; -- the type of integers
oper Ints : Int -&gt; Type = variants {} ; -- the type of integers from 0 to n
oper length : Tok -&gt; Int = variants {} ; -- length of string
oper drop : Int -&gt; Tok -&gt; Tok = variants {} ; -- drop prefix of length
oper take : Int -&gt; Tok -&gt; Tok = variants {} ; -- take prefix of length
oper tk : Int -&gt; Tok -&gt; Tok = variants {} ; -- drop suffix of length
oper dp : Int -&gt; Tok -&gt; Tok = variants {} ; -- take suffix of length
oper eqInt : Int -&gt; Int -&gt; PBool = variants {} ; -- test if equal integers
oper lessInt: Int -&gt; Int -&gt; PBool = variants {} ; -- test order of integers
oper plus : Int -&gt; Int -&gt; Int = variants {} ; -- add integers
oper eqStr : Tok -&gt; Tok -&gt; PBool = variants {} ; -- test if equal strings
oper occur : Tok -&gt; Tok -&gt; PBool = variants {} ; -- test if occurs as substring
oper occurs : Tok -&gt; Tok -&gt; PBool = variants {} ; -- test if any char occurs
oper show : (P : Type) -&gt; P -&gt; Tok = variants {} ; -- convert param to string
oper read : (P : Type) -&gt; Tok -&gt; P = variants {} ; -- convert string to param
oper toStr : (L : Type) -&gt; L -&gt; Str = variants {} ; -- find the "first" string
oper mapStr : (L : Type) -&gt; (Str -&gt; Str) -&gt; L -&gt; L = variants {} ;
-- map all strings in a data structure; experimental ---
} ;
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc ../prelude/Predef.txt -->
</BODY></HTML>

View File

@@ -0,0 +1,32 @@
<!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>
Last update: Sat Feb 25 22:36:02 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>
<PRE>
abstract PredefAbs = {
cat Int ; String ;
} ;
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc ../prelude/PredefAbs.txt -->
</BODY></HTML>

View File

@@ -6,23 +6,20 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> A Small Predication Library</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:56 2006
<I>Last update: Sat Feb 25 22:36:00 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">A Small Predication Library</A>
<UL>
<LI><A HREF="#toc2">The category of atomic sentences</A>
<LI><A HREF="#toc3">Predication patterns.</A>
<LI><A HREF="#toc4">Individual-valued function applications</A>
<LI><A HREF="#toc5">Families of types</A>
<LI><A HREF="#toc6">Type constructor</A>
<LI><A HREF="#toc1">The category of atomic sentences</A>
<LI><A HREF="#toc2">Predication patterns.</A>
<LI><A HREF="#toc3">Individual-valued function applications</A>
<LI><A HREF="#toc4">Families of types</A>
<LI><A HREF="#toc5">Type constructor</A>
</UL>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
@@ -32,8 +29,6 @@ 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>A Small Predication Library</H1>
<P>
(c) Aarne Ranta 2003-2006 under Gnu GPL.
</P>
@@ -45,7 +40,7 @@ API of resource grammars.
abstract Predication = Cat ** {
</PRE>
<P></P>
<A NAME="toc2"></A>
<A NAME="toc1"></A>
<H2>The category of atomic sentences</H2>
<P>
We want to use sentences in positive and negative forms but do not care about
@@ -57,7 +52,7 @@ tenses.
NegCl : Cl -&gt; S ; -- negative sentence: "x doesn't intersect y"
</PRE>
<P></P>
<A NAME="toc3"></A>
<A NAME="toc2"></A>
<H2>Predication patterns.</H2>
<PRE>
predV : V -&gt; NP -&gt; Cl ; -- one-place verb: "x converges"
@@ -75,7 +70,7 @@ tenses.
predPrep : Prep -&gt; NP -&gt; NP -&gt; Cl ; -- preposition: "x is outside y"
</PRE>
<P></P>
<A NAME="toc4"></A>
<A NAME="toc3"></A>
<H2>Individual-valued function applications</H2>
<PRE>
appN2 : N2 -&gt; NP -&gt; NP ; -- one-place function: "the successor of x"
@@ -83,7 +78,7 @@ tenses.
appColl : N2 -&gt; NP -&gt; NP -&gt; NP ; -- collective function: "the sum of x and y"
</PRE>
<P></P>
<A NAME="toc5"></A>
<A NAME="toc4"></A>
<H2>Families of types</H2>
<P>
These are expressed by relational nouns applied to arguments.
@@ -94,7 +89,7 @@ These are expressed by relational nouns applied to arguments.
famColl : N2 -&gt; NP -&gt; NP -&gt; CN ; -- collective family: "path between x and y"
</PRE>
<P></P>
<A NAME="toc6"></A>
<A NAME="toc5"></A>
<H2>Type constructor</H2>
<P>
This is similar to a family except that the argument is a type.
@@ -106,6 +101,6 @@ This is similar to a family except that the argument is a type.
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc mathematical/Predication.txt -->
</BODY></HTML>

View File

@@ -0,0 +1,223 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
<TITLE> The GF Prelude</TITLE>
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> The GF Prelude</H1>
<FONT SIZE="4">
<I>Last update: Sat Feb 25 22:36:03 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">Strings, records, and tables</A>
<LI><A HREF="#toc2">Optional elements</A>
<LI><A HREF="#toc3">Infixes. prefixes, and postfixes</A>
<LI><A HREF="#toc4">Booleans</A>
<LI><A HREF="#toc5">High-level acces to Predef operations</A>
<LI><A HREF="#toc6">Lexer-related operations</A>
<LI><A HREF="#toc7">Miscellaneous</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>
<P>
This file defines some prelude facilities usable in all grammars.
</P>
<PRE>
resource Prelude = open (Predef=Predef) in {
oper
</PRE>
<P></P>
<A NAME="toc1"></A>
<H2>Strings, records, and tables</H2>
<PRE>
SS : Type = {s : Str} ;
ss : Str -&gt; SS = \s -&gt; {s = s} ;
ss2 : (_,_ : Str) -&gt; SS = \x,y -&gt; ss (x ++ y) ;
ss3 : (_,_ ,_: Str) -&gt; SS = \x,y,z -&gt; ss (x ++ y ++ z) ;
cc2 : (_,_ : SS) -&gt; SS = \x,y -&gt; ss (x.s ++ y.s) ;
cc3 : (_,_,_ : SS) -&gt; SS = \x,y,z -&gt; ss (x.s ++ y.s ++ z.s) ;
SS1 : Type -&gt; Type = \P -&gt; {s : P =&gt; Str} ;
ss1 : (A : Type) -&gt; Str -&gt; SS1 A = \A,s -&gt; {s = table {_ =&gt; s}} ;
SP1 : Type -&gt; Type = \P -&gt; {s : Str ; p : P} ;
sp1 : (A : Type) -&gt; Str -&gt; A -&gt; SP1 A = \_,s,a -&gt; {s = s ; p = a} ;
constTable : (A,B : Type) -&gt; B -&gt; A =&gt; B = \_,_,b -&gt; \\_ =&gt; b ;
constStr : (A : Type) -&gt; Str -&gt; A =&gt; Str = \A -&gt; constTable A Str ;
</PRE>
<P></P>
<P>
Discontinuous constituents.
</P>
<PRE>
SD2 = {s1,s2 : Str} ;
sd2 : (_,_ : Str) -&gt; SD2 = \x,y -&gt; {s1 = x ; s2 = y} ;
</PRE>
<P></P>
<A NAME="toc2"></A>
<H2>Optional elements</H2>
<P>
Missing form.
</P>
<PRE>
nonExist : Str = variants {} ;
</PRE>
<P></P>
<P>
Optional string with preference on the string vs. empty.
</P>
<PRE>
optStr : Str -&gt; Str = \s -&gt; variants {s ; []} ;
strOpt : Str -&gt; Str = \s -&gt; variants {[] ; s} ;
</PRE>
<P></P>
<P>
Free order between two strings.
</P>
<PRE>
bothWays : Str -&gt; Str -&gt; Str = \x,y -&gt; variants {x ++ y ; y ++ x} ;
</PRE>
<P></P>
<P>
Parametric order between two strings.
</P>
<PRE>
preOrPost : Bool -&gt; Str -&gt; Str -&gt; Str = \pr,x,y -&gt;
if_then_Str pr (x ++ y) (y ++ x) ;
</PRE>
<P></P>
<A NAME="toc3"></A>
<H2>Infixes. prefixes, and postfixes</H2>
<P>
Fixes with precedences are defined in <A HREF="Precedence.html">Precedence</A>.
</P>
<PRE>
infixSS : Str -&gt; SS -&gt; SS -&gt; SS = \f,x,y -&gt; ss (x.s ++ f ++ y.s) ;
prefixSS : Str -&gt; SS -&gt; SS = \f,x -&gt; ss (f ++ x.s) ;
postfixSS : Str -&gt; SS -&gt; SS = \f,x -&gt; ss (x.s ++ f) ;
embedSS : Str -&gt; Str -&gt; SS -&gt; SS = \f,g,x -&gt; ss (f ++ x.s ++ g) ;
</PRE>
<P></P>
<A NAME="toc4"></A>
<H2>Booleans</H2>
<PRE>
param Bool = True | False ;
oper
if_then_else : (A : Type) -&gt; Bool -&gt; A -&gt; A -&gt; A = \_,c,d,e -&gt;
case c of {
True =&gt; d ; ---- should not need to qualify
False =&gt; e
} ;
andB : (_,_ : Bool) -&gt; Bool = \a,b -&gt; if_then_else Bool a b False ;
orB : (_,_ : Bool) -&gt; Bool = \a,b -&gt; if_then_else Bool a True b ;
notB : Bool -&gt; Bool = \a -&gt; if_then_else Bool a False True ;
if_then_Str : Bool -&gt; Str -&gt; Str -&gt; Str = if_then_else Str ;
onlyIf : Bool -&gt; Str -&gt; Str = \b,s -&gt; case b of {
True =&gt; s ;
_ =&gt; nonExist
} ;
</PRE>
<P></P>
<P>
Interface to internal booleans
</P>
<PRE>
pbool2bool : Predef.PBool -&gt; Bool = \b -&gt; case b of {
Predef.PFalse =&gt; False ; Predef.PTrue =&gt; True
} ;
init : Tok -&gt; Tok = Predef.tk 1 ;
last : Tok -&gt; Tok = Predef.dp 1 ;
</PRE>
<P></P>
<A NAME="toc5"></A>
<H2>High-level acces to Predef operations</H2>
<PRE>
isNil : Tok -&gt; Bool = \b -&gt; pbool2bool (Predef.eqStr [] b) ;
ifTok : (A : Type) -&gt; Tok -&gt; Tok -&gt; A -&gt; A -&gt; A = \A,t,u,a,b -&gt;
case Predef.eqStr t u of {Predef.PTrue =&gt; a ; Predef.PFalse =&gt; b} ;
</PRE>
<P></P>
<A NAME="toc6"></A>
<H2>Lexer-related operations</H2>
<P>
Bind together two tokens in some lexers, either obligatorily or optionally
</P>
<PRE>
oper
glue : Str -&gt; Str -&gt; Str = \x,y -&gt; x ++ BIND ++ y ;
glueOpt : Str -&gt; Str -&gt; Str = \x,y -&gt; variants {glue x y ; x ++ y} ;
noglueOpt : Str -&gt; Str -&gt; Str = \x,y -&gt; variants {x ++ y ; glue x y} ;
</PRE>
<P></P>
<P>
Force capitalization of next word in some unlexers
</P>
<PRE>
capitalize : Str -&gt; Str = \s -&gt; CAPIT ++ s ;
</PRE>
<P></P>
<P>
These should be hidden, and never changed since they are hardcoded in (un)lexers
</P>
<PRE>
BIND : Str = "&amp;+" ;
PARA : Str = "&amp;-" ;
CAPIT : Str = "&amp;|" ;
</PRE>
<P></P>
<A NAME="toc7"></A>
<H2>Miscellaneous</H2>
<P>
Identity function
</P>
<PRE>
id : (A : Type) -&gt; A -&gt; A = \_,a -&gt; a ;
</PRE>
<P></P>
<P>
Parentheses
</P>
<PRE>
paren : Str -&gt; Str = \s -&gt; "(" ++ s ++ ")" ;
parenss : SS -&gt; SS = \s -&gt; ss (paren s.s) ;
</PRE>
<P></P>
<P>
Zero, one, two, or more (elements in a list etc)
</P>
<PRE>
param
ENumber = E0 | E1 | E2 | Emore ;
oper
eNext : ENumber -&gt; ENumber = \e -&gt; case e of {
E0 =&gt; E1 ; E1 =&gt; E2 ; _ =&gt; Emore} ;
}
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc ../prelude/Prelude.txt -->
</BODY></HTML>

View File

@@ -6,17 +6,13 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> Questions and interrogative pronouns</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:53 2006
<I>Last update: Sat Feb 25 22:35:56 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">Questions and interrogative pronouns</A>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
@@ -25,8 +21,6 @@ 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>Questions and interrogative pronouns</H1>
<PRE>
abstract Question = Cat ** {
</PRE>
@@ -63,6 +57,6 @@ More <CODE>IP</CODE>, <CODE>IDet</CODE>, and <CODE>IAdv</CODE> are defined in
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Question.txt -->
</BODY></HTML>

View File

@@ -6,17 +6,13 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> Relative clauses and pronouns</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:53 2006
<I>Last update: Sat Feb 25 22:35:56 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">Relative clauses and pronouns</A>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
@@ -25,8 +21,6 @@ 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>Relative clauses and pronouns</H1>
<PRE>
abstract Relative = Cat ** {
@@ -62,6 +56,6 @@ or suffixing (depending on language) prepositional phrases.
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Relative.txt -->
</BODY></HTML>

View File

@@ -6,23 +6,20 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> Sentences, clauses, imperatives, and sentential complements</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:54 2006
<I>Last update: Sat Feb 25 22:35:56 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">Sentences, clauses, imperatives, and sentential complements</A>
<UL>
<LI><A HREF="#toc2">Clauses</A>
<LI><A HREF="#toc3">Clauses missing object noun phrases</A>
<LI><A HREF="#toc4">Imperatives</A>
<LI><A HREF="#toc5">Embedded sentences</A>
<LI><A HREF="#toc6">Sentences</A>
<LI><A HREF="#toc1">Clauses</A>
<LI><A HREF="#toc2">Clauses missing object noun phrases</A>
<LI><A HREF="#toc3">Imperatives</A>
<LI><A HREF="#toc4">Embedded sentences</A>
<LI><A HREF="#toc5">Sentences</A>
</UL>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
@@ -32,13 +29,11 @@ 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>Sentences, clauses, imperatives, and sentential complements</H1>
<PRE>
abstract Sentence = Cat ** {
</PRE>
<P></P>
<A NAME="toc2"></A>
<A NAME="toc1"></A>
<H2>Clauses</H2>
<P>
The <CODE>NP VP</CODE> predication rule form a clause whose linearization
@@ -59,7 +54,7 @@ is only meaningful for some verb phrases.
PredSCVP : SC -&gt; VP -&gt; Cl ; -- that you go makes me happy
</PRE>
<P></P>
<A NAME="toc3"></A>
<A NAME="toc2"></A>
<H2>Clauses missing object noun phrases</H2>
<P>
This category is a variant of the 'slash category' <CODE>S/NP</CODE> of
@@ -77,7 +72,7 @@ the style of CCG.
SlashPrep : Cl -&gt; Prep -&gt; Slash ; -- (with whom) he walks
</PRE>
<P></P>
<A NAME="toc4"></A>
<A NAME="toc3"></A>
<H2>Imperatives</H2>
<P>
An imperative is straightforwardly formed from a verb phrase.
@@ -88,7 +83,7 @@ To fix these parameters, see <A HREF="Phrase.html">Phrase</A>.
ImpVP : VP -&gt; Imp ; -- go
</PRE>
<P></P>
<A NAME="toc5"></A>
<A NAME="toc4"></A>
<H2>Embedded sentences</H2>
<P>
Sentences, questions, and infinitival phrases can be used as
@@ -100,7 +95,7 @@ subjects and (adverbial) complements.
EmbedVP : VP -&gt; SC ; -- to go
</PRE>
<P></P>
<A NAME="toc6"></A>
<A NAME="toc5"></A>
<H2>Sentences</H2>
<P>
These are the 2 x 4 x 4 = 16 forms generated by different
@@ -138,6 +133,6 @@ Cond Anter Pos ODir : he would have slept
Cond Anter Neg ODir : he wouldn't have slept
</P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Sentence.txt -->
</BODY></HTML>

View File

@@ -6,17 +6,13 @@
</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 Feb 21 16:23:54 2006
<I>Last update: Sat Feb 25 22:35:57 2006</I><BR>
% NOTE: this is a txt2tags file.
</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>
@@ -25,8 +21,6 @@ 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>
@@ -145,6 +139,6 @@ This is an alphabetical list of structural words
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Structural.txt -->
</BODY></HTML>

View File

@@ -6,20 +6,17 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> Symbolic expressions</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:56 2006
<I>Last update: Sat Feb 25 22:36:00 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">Symbolic expressions</A>
<UL>
<LI><A HREF="#toc2">Noun phrases with symbols and numbers</A>
<LI><A HREF="#toc3">Symbol lists</A>
<LI><A HREF="#toc1">Noun phrases with symbols and numbers</A>
<LI><A HREF="#toc2">Symbol lists</A>
</UL>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
@@ -29,17 +26,15 @@ 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>Symbolic expressions</H1>
<P>
<B>Note</B>. This module is not automatically included in the main
grammar <A HREF="Lang.html">Lang</A>.
</P>
<PRE>
abstract Symbol = Cat ** {
abstract Symbol = Cat, PredefAbs ** {
</PRE>
<P></P>
<A NAME="toc2"></A>
<A NAME="toc1"></A>
<H2>Noun phrases with symbols and numbers</H2>
<PRE>
fun
@@ -51,7 +46,7 @@ grammar <A HREF="Lang.html">Lang</A>.
CNSymbNP : Det -&gt; CN -&gt; [Symb] -&gt; NP ; -- (the) (2) numbers x and y
</PRE>
<P></P>
<A NAME="toc3"></A>
<A NAME="toc2"></A>
<H2>Symbol lists</H2>
<P>
A symbol list has at least two elements. The last two are separated
@@ -70,6 +65,6 @@ This produces <I>x, y and z</I>, in English.
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc mathematical/Symbol.txt -->
</BODY></HTML>

View File

@@ -6,17 +6,13 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> Tense, Polarity, and Anteriority</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:54 2006
<I>Last update: Sat Feb 25 22:35:57 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">Tense, Polarity, and Anteriority</A>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
@@ -25,8 +21,6 @@ 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>Tense, Polarity, and Anteriority</H1>
<P>
This module defines the abstract parameters of tense, polarity, and
anteriority, which are used in <A HREF="Tensed.html">Tensed</A> to generate different
@@ -52,6 +46,6 @@ Romance languages.
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Tense.txt -->
</BODY></HTML>

View File

@@ -6,17 +6,13 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> Texts</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:54 2006
<I>Last update: Sat Feb 25 22:35:57 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">Texts</A>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
@@ -25,8 +21,6 @@ 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>Texts</H1>
<PRE>
abstract Text = Cat ** {
@@ -40,6 +34,6 @@ gfdoc - a rudimentary GF document generator.
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Text.txt -->
</BODY></HTML>

View File

@@ -6,22 +6,19 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> The construction of verb phrases</H1>
<FONT SIZE="4">
<I>Author: </I><BR>
Last update: Tue Feb 21 16:23:54 2006
<I>Last update: Sat Feb 25 22:35:57 2006</I><BR>
% NOTE: this is a txt2tags file.
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">The construction of verb phrases</A>
<UL>
<LI><A HREF="#toc2">Complementization rules</A>
<LI><A HREF="#toc3">Other ways of forming verb phrases</A>
<LI><A HREF="#toc4">Complements to copula</A>
<LI><A HREF="#toc5">Coercions</A>
<LI><A HREF="#toc1">Complementization rules</A>
<LI><A HREF="#toc2">Other ways of forming verb phrases</A>
<LI><A HREF="#toc3">Complements to copula</A>
<LI><A HREF="#toc4">Coercions</A>
</UL>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
@@ -31,13 +28,11 @@ 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 verb phrases</H1>
<PRE>
abstract Verb = Cat ** {
</PRE>
<P></P>
<A NAME="toc2"></A>
<A NAME="toc1"></A>
<H2>Complementization rules</H2>
<P>
Verb phrases are constructed from verbs by providing their
@@ -57,7 +52,7 @@ complements. There is one rule for each verb category.
ComplV2A : V2A -&gt; NP -&gt; AP -&gt; VP ; -- paint the house red
</PRE>
<P></P>
<A NAME="toc3"></A>
<A NAME="toc2"></A>
<H2>Other ways of forming verb phrases</H2>
<P>
Verb phrases can also be constructed reflexively and from
@@ -98,7 +93,7 @@ vs. next to (or before) the verb.
<B>Agents of passives</B> are constructed as adverbs with the
preposition <A HREF="Structural.html">Structural</A><CODE>.8agent_Prep</CODE>.
</P>
<A NAME="toc4"></A>
<A NAME="toc3"></A>
<H2>Complements to copula</H2>
<P>
Adjectival phrases, noun phrases, and adverbs can be used.
@@ -109,7 +104,7 @@ Adjectival phrases, noun phrases, and adverbs can be used.
CompAdv : Adv -&gt; Comp ; -- (be) here
</PRE>
<P></P>
<A NAME="toc5"></A>
<A NAME="toc4"></A>
<H2>Coercions</H2>
<P>
Verbs can change subcategorization patterns in systematic ways,
@@ -124,6 +119,6 @@ work in all the languages we cover.
</PRE>
<P></P>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml -\-toc abstract/Verb.txt -->
</BODY></HTML>

View File

@@ -7,19 +7,20 @@
<P ALIGN="center"><CENTER><H1>GF Resource Grammar Library v. 1.0</H1>
<FONT SIZE="4">
<I>Author: Aarne Ranta &lt;aarne (at) cs.chalmers.se&gt;</I><BR>
Last update: Tue Feb 21 16:23:46 2006
Last update: Sat Feb 25 23:18:51 2006
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">The language independent API</A>
<LI><A HREF="#toc2">The language-dependent APIs</A>
<LI><A HREF="#toc3">Special-purpose APIs</A>
<LI><A HREF="#toc1">Using the library</A>
<LI><A HREF="#toc2">The language independent API</A>
<LI><A HREF="#toc3">The language-dependent APIs</A>
<LI><A HREF="#toc4">Special-purpose APIs</A>
<UL>
<LI><A HREF="#toc4">Multimodal</A>
<LI><A HREF="#toc5">Mathematical</A>
<LI><A HREF="#toc5">Multimodal</A>
<LI><A HREF="#toc6">Mathematical</A>
</UL>
</UL>
@@ -29,14 +30,49 @@ Last update: Tue Feb 21 16:23:46 2006
<P>
<B>Notice</B>. This document concerns the API v. 1.0 which has not
yet been "officially" released. You can find the beginnings of it
in <A HREF=".."><CODE>GF/lib/resource-1.0/</CODE></A>. See the
in <A HREF=".."><CODE>GF/lib/resource-1.0/</CODE></A>. See
<A HREF="../README"><CODE>resource-1.0/README</CODE></A> for
details on how it differs from previous versions
and how much has been implemented
</P>
<A NAME="toc1"></A>
<H2>Using the library</H2>
<P>
There is no need to link application grammars to the source directories of the
library. Use one (or several) of the following packages instead:
</P>
<UL>
<LI><CODE>lib/alltenses</CODE> the complete ground-API library with all forms
<LI><CODE>lib/present</CODE> a pruned ground-API library with present tense only
<LI><CODE>lib/mathematical</CODE> special-purpose API for mathematical applications
<LI><CODE>lib/multimodal</CODE> special-purpose API for multimodal dialogue applications
</UL>
<P>
Notice, however, that both special-purpose APIs share modules with
<CODE>present</CODE>. It is therefore not a good idea to use them in combination with
<CODE>alltenses</CODE>.
</P>
<P>
It is advisable to use the bare package names in paths pointing to the
libraries. Here is an example, from <CODE>examples/tram</CODE>:
</P>
<PRE>
--# -path=.:present:multimodal:mathematical:prelude
</PRE>
<P>
To reach these directories from anywhere, set the environment variable
<CODE>GF_LIB_PATH</CODE> to point to the directory <CODE>GF/lib/</CODE>. For instance,
I have the following line in my <CODE>.bashrc</CODE> file:
</P>
<PRE>
export GF_LIB_PATH=/home/aarne/GF/lib
</PRE>
<P></P>
<A NAME="toc2"></A>
<H2>The language independent API</H2>
<P>
This API is accessible by both <CODE>present</CODE> and <CODE>alltenses</CODE>.
The API is divided into a bunch of <CODE>abstract</CODE> modules.
The following figure gives the dependencies of these modules.
</P>
@@ -66,7 +102,7 @@ The documentation of the individual modules:
<LI><A HREF="gfdoc/Lang.html">Lang</A>: the main module comprising all the others
</UL>
<A NAME="toc2"></A>
<A NAME="toc3"></A>
<H2>The language-dependent APIs</H2>
<UL>
<LI><A HREF="gfdoc/ParadigmsEng.html">ParadigmsEng</A>: English lexical paradigms
@@ -86,16 +122,16 @@ The documentation of the individual modules:
<LI><A HREF="gfdoc/IrregSwe.gf">IrregSwe</A>: Swedish irregular verbs
</UL>
<A NAME="toc3"></A>
<H2>Special-purpose APIs</H2>
<A NAME="toc4"></A>
<H2>Special-purpose APIs</H2>
<A NAME="toc5"></A>
<H3>Multimodal</H3>
<UL>
<LI><A HREF="gfdoc/Multimodal.html">Multimodal</A>: main module for multimodal dialogue systems
<LI><A HREF="gfdoc/Demonstrative.html">Demonstrative</A>: demonstrative noun phrases and adverbs
</UL>
<A NAME="toc5"></A>
<A NAME="toc6"></A>
<H3>Mathematical</H3>
<UL>
<LI><A HREF="gfdoc/Mathematical.html">Mathematical</A>: main module for mathematical language
@@ -105,6 +141,6 @@ The documentation of the individual modules:
</UL>
<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -\-toc -thtml index.txt -->
</BODY></HTML>

View File

@@ -11,15 +11,46 @@ Last update: %%date(%c)
**Notice**. This document concerns the API v. 1.0 which has not
yet been "officially" released. You can find the beginnings of it
in [``GF/lib/resource-1.0/`` ..]. See the
in [``GF/lib/resource-1.0/`` ..]. See
[``resource-1.0/README`` ../README] for
details on how it differs from previous versions
and how much has been implemented
==Using the library==
There is no need to link application grammars to the source directories of the
library. Use one (or several) of the following packages instead:
- ``lib/alltenses`` the complete ground-API library with all forms
- ``lib/present`` a pruned ground-API library with present tense only
- ``lib/mathematical`` special-purpose API for mathematical applications
- ``lib/multimodal`` special-purpose API for multimodal dialogue applications
Notice, however, that both special-purpose APIs share modules with
``present``. It is therefore not a good idea to use them in combination with
``alltenses``.
It is advisable to use the bare package names in paths pointing to the
libraries. Here is an example, from ``examples/tram``:
```
--# -path=.:present:multimodal:mathematical:prelude
```
To reach these directories from anywhere, set the environment variable
``GF_LIB_PATH`` to point to the directory ``GF/lib/``. For instance,
I have the following line in my ``.bashrc`` file:
```
export GF_LIB_PATH=/home/aarne/GF/lib
```
==The language independent API==
This API is accessible by both ``present`` and ``alltenses``.
The API is divided into a bunch of ``abstract`` modules.
The following figure gives the dependencies of these modules.

View File

@@ -59,9 +59,8 @@ main = do
return ()
_ | opt doMake -> do
case fs of
[f] -> batchCompile os f
_ -> putStrLnFlush "expecting exactly one gf file to compile"
mapM_ (batchCompile os) fs
return ()
_ | opt makeConcrete -> do
mkConcretes fs

View File

@@ -169,7 +169,7 @@ optionsOfCommand co = case co of
CSetFlag -> both "utf8 table struct record all multi"
"cat lang lexer parser number depth rawtrees unlexer optimize path conversion printer"
CImport _ -> both "old v s src gfc retain nocf nocheckcirc cflexer noemit o ex prob"
CImport _ -> both "old v s src gfc retain nocf nocheckcirc cflexer noemit o make ex prob"
"abs cnc res path optimize conversion cat preproc probs noparse"
CRemoveLanguage _ -> none
CEmptyState -> none