diff --git a/examples/bronzeage/README b/examples/bronzeage/README index 02b430c7b..c93a8c99c 100644 --- a/examples/bronzeage/README +++ b/examples/bronzeage/README @@ -15,7 +15,6 @@ Before this, you have to have compiled the libraries: cd GF/lib/resource-1.0 make present - make install To work with the grammar diff --git a/lib/prelude/Predef.gf b/lib/prelude/Predef.gf index 11d094793..a52f954d0 100644 --- a/lib/prelude/Predef.gf +++ b/lib/prelude/Predef.gf @@ -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 --- - } ; +} ; diff --git a/lib/prelude/Prelude.gf b/lib/prelude/Prelude.gf index ec68db8e5..45445a261 100644 --- a/lib/prelude/Prelude.gf +++ b/lib/prelude/Prelude.gf @@ -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 = "&|" ; -} ; +} diff --git a/lib/resource-1.0/Makefile b/lib/resource-1.0/Makefile index 34130360b..728f49c84 100644 --- a/lib/resource-1.0/Makefile +++ b/lib/resource-1.0/Makefile @@ -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 diff --git a/lib/resource-1.0/README b/lib/resource-1.0/README index d966e7d37..5d41e4fad 100644 --- a/lib/resource-1.0/README +++ b/lib/resource-1.0/README @@ -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. diff --git a/lib/resource-1.0/doc/gfdoc/Adjective.html b/lib/resource-1.0/doc/gfdoc/Adjective.html index df84b9bc0..197602218 100644 --- a/lib/resource-1.0/doc/gfdoc/Adjective.html +++ b/lib/resource-1.0/doc/gfdoc/Adjective.html @@ -6,17 +6,13 @@

Adjectives and adjectival phrases

-Author:
-Last update: Tue Feb 21 16:23:51 2006 +Last update: Sat Feb 25 22:35:53 2006
+% NOTE: this is a txt2tags file.


- -


@@ -25,8 +21,6 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

Adjectives and adjectival phrases

     abstract Adjective = Cat ** {
     
@@ -71,6 +65,6 @@ by Adverb.
 

- + diff --git a/lib/resource-1.0/doc/gfdoc/Adverb.html b/lib/resource-1.0/doc/gfdoc/Adverb.html index bc988a462..1a2a1837c 100644 --- a/lib/resource-1.0/doc/gfdoc/Adverb.html +++ b/lib/resource-1.0/doc/gfdoc/Adverb.html @@ -6,17 +6,13 @@

Adverbs and adverbial phrases

-Author:
-Last update: Tue Feb 21 16:23:52 2006 +Last update: Sat Feb 25 22:35:53 2006
+% NOTE: this is a txt2tags file.


- -


@@ -25,8 +21,6 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

Adverbs and adverbial phrases

     abstract Adverb = Cat ** {
     
@@ -76,6 +70,6 @@ Comparison adverbs also work as numeral adverbs.
 

- + diff --git a/lib/resource-1.0/doc/gfdoc/Cat.html b/lib/resource-1.0/doc/gfdoc/Cat.html index b4427a1e6..b042ae14d 100644 --- a/lib/resource-1.0/doc/gfdoc/Cat.html +++ b/lib/resource-1.0/doc/gfdoc/Cat.html @@ -6,29 +6,26 @@

The category system

-Author:
-Last update: Tue Feb 21 16:23:52 2006 +Last update: Sat Feb 25 22:35:53 2006
+% NOTE: this is a txt2tags file.


-


@@ -38,8 +35,6 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

The category system

Some categories are inherited from Common.

@@ -49,7 +44,7 @@ Some categories are inherited from Common. cat

- +

Top-level units

Constructed in Text: Text. @@ -60,7 +55,7 @@ Constructed in Phrase: Phr and Voc ; -- vocative or "please" e.g. "my darling"

- +

Sentences and clauses

Constructed in Sentence, and also in @@ -76,7 +71,7 @@ Constructed in Sentence, and also in SC ; -- embedded sentence or question e.g. "that it rains"

- +

Questions and interrogatives

Constructed in Question. @@ -88,7 +83,7 @@ Constructed in Question. IDet ; -- interrogative determiner e.g. "which"

- +

Relative clauses and pronouns

Constructed in Relative. @@ -98,7 +93,7 @@ Constructed in Relative. RP ; -- relative pronoun e.g. "in which"

- +

Verb phrases

Constructed in Verb. @@ -108,7 +103,7 @@ Constructed in Verb. Comp ; -- complement of copula, such as AP e.g. "very warm"

- +

Adjectival phrases

Constructed in Adjective. @@ -117,7 +112,7 @@ Constructed in Adjective. AP ; -- adjectival phrase e.g. "very warm"

- +

Nouns and noun phrases

Constructed in Noun. @@ -144,7 +139,7 @@ as defined in Noun. Ord ; -- ordinal number (used in Det) e.g. "seventh"

- +

Adverbs

Constructed in Adverb. @@ -157,7 +152,7 @@ Many adverbs are constructed in Structural. AdN ; -- numeral-modifying adverb, e.g. "more than"

- +

Numerals

Constructed in Numeral. @@ -166,7 +161,7 @@ Constructed in Numeral. Numeral;-- cardinal or ordinal, e.g. "five/fifth"

- +

Structural words

Constructed in Structural. @@ -180,7 +175,7 @@ Constructed in Structural. Prep ; -- preposition, or just case e.g. "in"

- +

Words of open classes

These are constructed in Lexicon and in additional lexicon modules. @@ -207,6 +202,6 @@ These are constructed in Lexicon and in additional le

- + diff --git a/lib/resource-1.0/doc/gfdoc/Common.html b/lib/resource-1.0/doc/gfdoc/Common.html index d4cbfe679..e8fbbba2e 100644 --- a/lib/resource-1.0/doc/gfdoc/Common.html +++ b/lib/resource-1.0/doc/gfdoc/Common.html @@ -6,17 +6,13 @@

Infrastructure with common implementations.

-Author:
-Last update: Tue Feb 21 16:23:52 2006 +Last update: Sat Feb 25 22:35:54 2006
+% NOTE: this is a txt2tags file.


- -


@@ -25,14 +21,12 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

Infrastructure with common implementations.

This module defines the abstract parameters of tense, polarity, and anteriority, which are used in Phrase 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 passé simple of +can be defined in the language extensions, e.g. the passé simple of Romance languages.

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

- + diff --git a/lib/resource-1.0/doc/gfdoc/Conjunction.html b/lib/resource-1.0/doc/gfdoc/Conjunction.html index 6f8abd9f0..69873a28c 100644 --- a/lib/resource-1.0/doc/gfdoc/Conjunction.html +++ b/lib/resource-1.0/doc/gfdoc/Conjunction.html @@ -6,21 +6,18 @@

Coordination

-Author:
-Last update: Tue Feb 21 16:23:52 2006 +Last update: Sat Feb 25 22:35:54 2006
+% NOTE: this is a txt2tags file.


-


@@ -30,8 +27,6 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

Coordination

Coordination is defined for many different categories; here is a sample. The rules apply to lists of two or more elements, @@ -51,7 +46,7 @@ compatibility with API 0.9 is needed, use abstract Conjunction = Cat ** {

- +

Rules

       fun
@@ -66,7 +61,7 @@ compatibility with API 0.9 is needed, use
         DConjAdv : DConj -> [Adv] -> Adv; -- "both badly and slowly"
 

- +

Categories

These categories are only used in this module. @@ -79,7 +74,7 @@ These categories are only used in this module. [AP]{2} ;

- +

List constructors

The list constructors are derived from the list notation and therefore @@ -92,6 +87,6 @@ not given explicitly. But here are their type signatures:

- + diff --git a/lib/resource-1.0/doc/gfdoc/Demonstrative.html b/lib/resource-1.0/doc/gfdoc/Demonstrative.html index 0191ab138..770986c7c 100644 --- a/lib/resource-1.0/doc/gfdoc/Demonstrative.html +++ b/lib/resource-1.0/doc/gfdoc/Demonstrative.html @@ -13,19 +13,15 @@

-Author: -Last update: Tue Feb 21 16:23:56 2006 +Last update: Sat Feb 25 22:36:01 2006

Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

-

-== -

-    abstract Demonstrative = Cat ** {
+    abstract Demonstrative = Cat, PredefAbs ** {
 

@@ -148,6 +144,6 @@ For testing and example-based grammar writing.

- + diff --git a/lib/resource-1.0/doc/gfdoc/Idiom.html b/lib/resource-1.0/doc/gfdoc/Idiom.html index e06b24bee..e453a0eac 100644 --- a/lib/resource-1.0/doc/gfdoc/Idiom.html +++ b/lib/resource-1.0/doc/gfdoc/Idiom.html @@ -6,17 +6,13 @@

Idiomatic expressions

-Author:
-Last update: Tue Feb 21 16:23:52 2006 +Last update: Sat Feb 25 22:35:54 2006
+% NOTE: this is a txt2tags file.


- -


@@ -25,8 +21,6 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

Idiomatic expressions

     abstract Idiom = Cat ** {
 
@@ -47,6 +41,6 @@ often different even in closely related languages.

- + diff --git a/lib/resource-1.0/doc/gfdoc/IrregGer.gf b/lib/resource-1.0/doc/gfdoc/IrregGer.gf index 93bcb927f..3285ce342 100644 --- a/lib/resource-1.0/doc/gfdoc/IrregGer.gf +++ b/lib/resource-1.0/doc/gfdoc/IrregGer.gf @@ -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 ; + +} diff --git a/lib/resource-1.0/doc/gfdoc/Lang.html b/lib/resource-1.0/doc/gfdoc/Lang.html index db99ade40..f9bfa1c9d 100644 --- a/lib/resource-1.0/doc/gfdoc/Lang.html +++ b/lib/resource-1.0/doc/gfdoc/Lang.html @@ -6,17 +6,13 @@

The Main Module of the Resource Grammar

-Author:
-Last update: Tue Feb 21 16:23:53 2006 +Last update: Sat Feb 25 22:35:55 2006
+% NOTE: this is a txt2tags file.


- -


@@ -25,8 +21,6 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

The Main Module of the Resource Grammar

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 Test.

- + diff --git a/lib/resource-1.0/doc/gfdoc/Mathematical.html b/lib/resource-1.0/doc/gfdoc/Mathematical.html index 154d0ecd9..d4e0b85d8 100644 --- a/lib/resource-1.0/doc/gfdoc/Mathematical.html +++ b/lib/resource-1.0/doc/gfdoc/Mathematical.html @@ -6,17 +6,13 @@

The Mathematics API to the Resource Grammar

-Author:
-Last update: Tue Feb 21 16:23:56 2006 +Last update: Sat Feb 25 22:36:00 2006
+% NOTE: this is a txt2tags file.


- -


@@ -25,8 +21,6 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

The Mathematics API to the Resource Grammar

This grammar is a collection of the different modules. It differs from Lang in two main ways: @@ -47,10 +41,10 @@ are included, and that symbolic expressions are recognized as NPs.

Verb, -Adjective, -Adverb,

+      Adjective,
+      Adverb,
       Numeral,
 

@@ -62,6 +56,8 @@ Sentence, Relative, Conjunction, Phrase, + Text, + Idiom, Structural, Symbol, @@ -72,6 +68,6 @@ Sentence,

- + diff --git a/lib/resource-1.0/doc/gfdoc/Multimodal.html b/lib/resource-1.0/doc/gfdoc/Multimodal.html index 59b903185..c68cba7c5 100644 --- a/lib/resource-1.0/doc/gfdoc/Multimodal.html +++ b/lib/resource-1.0/doc/gfdoc/Multimodal.html @@ -13,17 +13,13 @@

-Author: -Last update: Tue Feb 21 16:23:56 2006 +Last update: Sat Feb 25 22:36:01 2006

Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

-

-== -

     abstract Multimodal =
       Noun,
@@ -54,6 +50,6 @@ Tensed,
 

- + diff --git a/lib/resource-1.0/doc/gfdoc/Noun.html b/lib/resource-1.0/doc/gfdoc/Noun.html index 32290145c..9f2ddc808 100644 --- a/lib/resource-1.0/doc/gfdoc/Noun.html +++ b/lib/resource-1.0/doc/gfdoc/Noun.html @@ -6,21 +6,18 @@

The construction of nouns, noun phrases, and determiners

-Author:
-Last update: Tue Feb 21 16:23:53 2006 +Last update: Sat Feb 25 22:35:55 2006
+% NOTE: this is a txt2tags file.


-


@@ -30,13 +27,11 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

The construction of nouns, noun phrases, and determiners

     abstract Noun = Cat ** {
 

- +

Noun phrases

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 -> NP -> NP; -- only the man

- +

Determiners

The determiner has a fine-grained structure, in which a 'nucleus' @@ -156,7 +151,7 @@ in semantically odd expressions.

Other determiners are defined in Structural.

- +

Common nouns

Simple nouns can be used as nouns outright. @@ -205,6 +200,6 @@ to decide. Sentential complements are defined in Verb.

- + diff --git a/lib/resource-1.0/doc/gfdoc/Numeral.html b/lib/resource-1.0/doc/gfdoc/Numeral.html index 0677803f6..c2f040743 100644 --- a/lib/resource-1.0/doc/gfdoc/Numeral.html +++ b/lib/resource-1.0/doc/gfdoc/Numeral.html @@ -6,17 +6,13 @@

Numerals

-Author:
-Last update: Tue Feb 21 16:23:53 2006 +Last update: Sat Feb 25 22:35:55 2006
+% NOTE: this is a txt2tags file.


- -


@@ -25,8 +21,6 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

Numerals

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.

- + diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsEng.html b/lib/resource-1.0/doc/gfdoc/ParadigmsEng.html index 926a8830a..38d831ee3 100644 --- a/lib/resource-1.0/doc/gfdoc/ParadigmsEng.html +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsEng.html @@ -42,8 +42,7 @@

-Author: -Last update: Tue Feb 21 16:23:54 2006 +Last update: Sat Feb 25 22:35:58 2006

Produced by @@ -51,9 +50,6 @@ gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

-== -

-

# -path=.:../abstract:../../prelude:../common

@@ -463,6 +459,6 @@ The definitions should not bother the user of the API. So they are hidden from the document.

- + diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsFin.html b/lib/resource-1.0/doc/gfdoc/ParadigmsFin.html index 0a3d72c29..5505af389 100644 --- a/lib/resource-1.0/doc/gfdoc/ParadigmsFin.html +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsFin.html @@ -27,8 +27,7 @@

-Author: -Last update: Tue Feb 21 16:23:55 2006 +Last update: Sat Feb 25 22:35:58 2006

Produced by @@ -36,9 +35,6 @@ gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

-== -

-

# -path=.:../abstract:../common:../../prelude

@@ -519,6 +515,6 @@ The definitions should not bother the user of the API. So they are hidden from the document.

- + diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsFre.html b/lib/resource-1.0/doc/gfdoc/ParadigmsFre.html index daebfdf4f..e105bb8e6 100644 --- a/lib/resource-1.0/doc/gfdoc/ParadigmsFre.html +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsFre.html @@ -40,8 +40,7 @@

-Author: -Last update: Tue Feb 21 16:23:55 2006 +Last update: Sat Feb 25 22:35:58 2006

Produced by @@ -49,9 +48,6 @@ gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

-== -

-

# -path=.:../romance:../common:../abstract:../../prelude

@@ -418,6 +414,6 @@ The definitions should not bother the user of the API. So they are hidden from the document.

- + diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsGer.html b/lib/resource-1.0/doc/gfdoc/ParadigmsGer.html index badbb7e36..6a6a6141b 100644 --- a/lib/resource-1.0/doc/gfdoc/ParadigmsGer.html +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsGer.html @@ -34,8 +34,7 @@

-Author: -Last update: Tue Feb 21 16:23:55 2006 +Last update: Sat Feb 25 22:35:59 2006

Produced by @@ -43,9 +42,6 @@ gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

-== -

-

# -path=.:../common:../abstract:../../prelude

@@ -378,6 +374,6 @@ The definitions should not bother the user of the API. So they are hidden from the document.

- + diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsIta.html b/lib/resource-1.0/doc/gfdoc/ParadigmsIta.html index a4503dc3c..d6c861c9a 100644 --- a/lib/resource-1.0/doc/gfdoc/ParadigmsIta.html +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsIta.html @@ -40,8 +40,7 @@

-Author: -Last update: Tue Feb 21 16:23:55 2006 +Last update: Sat Feb 25 22:35:59 2006

Produced by @@ -49,9 +48,6 @@ gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

-== -

-

# -path=.:../romance:../common:../abstract:../../prelude

@@ -417,6 +413,6 @@ The definitions should not bother the user of the API. So they are hidden from the document.

- + diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsNor.html b/lib/resource-1.0/doc/gfdoc/ParadigmsNor.html index d8adfc52b..89126eea0 100644 --- a/lib/resource-1.0/doc/gfdoc/ParadigmsNor.html +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsNor.html @@ -42,8 +42,7 @@

-Author: -Last update: Tue Feb 21 16:23:55 2006 +Last update: Sat Feb 25 22:35:59 2006

Produced by @@ -51,9 +50,6 @@ gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

-== -

-

# -path=.:../scandinavian:../common:../abstract:../../prelude

@@ -443,6 +439,6 @@ The definitions should not bother the user of the API. So they are hidden from the document.

- + diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsSpa.html b/lib/resource-1.0/doc/gfdoc/ParadigmsSpa.html index fcb1f3e89..2b05da664 100644 --- a/lib/resource-1.0/doc/gfdoc/ParadigmsSpa.html +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsSpa.html @@ -40,8 +40,7 @@

-Author: -Last update: Tue Feb 21 16:23:55 2006 +Last update: Sat Feb 25 22:35:59 2006

Produced by @@ -49,9 +48,6 @@ gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

-== -

-

# -path=.:../romance:../common:../abstract:../../prelude

@@ -424,6 +420,6 @@ The definitions should not bother the user of the API. So they are hidden from the document.

- + diff --git a/lib/resource-1.0/doc/gfdoc/ParadigmsSwe.html b/lib/resource-1.0/doc/gfdoc/ParadigmsSwe.html index 4d8d34ca4..40954d378 100644 --- a/lib/resource-1.0/doc/gfdoc/ParadigmsSwe.html +++ b/lib/resource-1.0/doc/gfdoc/ParadigmsSwe.html @@ -42,8 +42,7 @@

-Author: -Last update: Tue Feb 21 16:23:55 2006 +Last update: Sat Feb 25 22:36:00 2006

Produced by @@ -51,9 +50,6 @@ gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

-== -

-

# -path=.:../scandinavian:../common:../abstract:../../prelude

@@ -427,6 +423,6 @@ The definitions should not bother the user of the API. So they are hidden from the document.

- + diff --git a/lib/resource-1.0/doc/gfdoc/Phrase.html b/lib/resource-1.0/doc/gfdoc/Phrase.html index a5a43935c..21bd1bf05 100644 --- a/lib/resource-1.0/doc/gfdoc/Phrase.html +++ b/lib/resource-1.0/doc/gfdoc/Phrase.html @@ -6,17 +6,13 @@

Phrases and utterances

-Author:
-Last update: Tue Feb 21 16:23:53 2006 +Last update: Sat Feb 25 22:35:56 2006
+% NOTE: this is a txt2tags file.


- -


@@ -25,8 +21,6 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

Phrases and utterances

     abstract Phrase = Cat ** {
 
@@ -87,6 +81,6 @@ which may be overgenerating (e.g. I).

- + diff --git a/lib/resource-1.0/doc/gfdoc/Precedence.html b/lib/resource-1.0/doc/gfdoc/Precedence.html new file mode 100644 index 000000000..c2edba4ef --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Precedence.html @@ -0,0 +1,180 @@ + + + + + + + + +

+
+

+

+
+

+

+Last update: Sat Feb 25 22:36:02 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+operations for precedence-dependent strings. +five levels: +p4 (constants), p3 (applications), p2 (products), p1 (sums), p0 (arrows) +

+
+    resource Precedence = open Prelude in {
+    
+    param 
+    Prec = p4 | p3 | p2 | p1 | p0 ;
+    
+    lintype 
+    PrecTerm = Prec => Str ;
+    
+    oper 
+    pss : PrecTerm -> {s : PrecTerm} = \s -> {s = s} ;
+
+

+

+change this if you want some other type of parentheses +

+
+    mkParenth : Str -> Str = \str -> "(" ++ str ++ ")" ;
+
+

+

+define ordering of precedences +

+
+    nextPrec : Prec => Prec =
+      table {p0 => p1 ; p1 => p2 ; p2 => p3 ; _ => p4} ;
+    prevPrec : Prec => Prec =
+      table {p4 => p3 ; p3 => p2 ; p2 => p1 ; _ => p0} ;
+    
+    mkPrec : Str -> Prec => Prec => Str = \str ->
+      table {
+        p4 => table {                -- use the term of precedence p4...
+          _   => str} ;              -- ...always without parentheses
+        p3 => table {                -- use the term of precedence p3...
+          p4  => mkParenth str ;     -- ...in parentheses if p4 is required...
+          _   => str} ;              -- ...otherwise without parentheses
+        p2 => table {
+          p4  => mkParenth str ;
+          p3  => mkParenth str ;
+          _   => str} ;              
+        p1 => table {
+          p1  => str ;
+          p0  => str ;
+          _   => mkParenth str} ;
+        p0 => table {
+          p0  => str ;
+          _   => mkParenth str}
+            } ;
+
+

+

+make a string into a constant, of precedence p4 +

+
+    mkConst : Str -> PrecTerm = 
+      \f -> 
+      mkPrec f ! p4 ;
+
+

+

+make a string into a 1/2/3 -place prefix operator, of precedence p3 +

+
+    mkFun1 : Str -> PrecTerm -> PrecTerm = 
+      \f -> \x ->
+      table {k => mkPrec (f ++ x ! p4) ! p3 ! k} ;
+    mkFun2 : Str -> PrecTerm -> PrecTerm -> PrecTerm = 
+      \f -> \x -> \y ->
+      table {k => mkPrec (f ++ x ! p4 ++ y ! p4) ! p3 ! k} ;
+    mkFun3 : Str -> PrecTerm -> PrecTerm -> PrecTerm -> PrecTerm = 
+      \f -> \x -> \y -> \z ->
+      table {k => mkPrec (f ++ x ! p4 ++ y ! p4 ++ z ! p4) ! p3 ! k} ;
+
+

+

+make a string into a non/left/right -associative infix operator, of precedence p +

+
+    mkInfix : Str -> Prec -> PrecTerm -> PrecTerm -> PrecTerm = 
+      \f -> \p -> \x -> \y ->
+      table {k => mkPrec (x ! (nextPrec ! p) ++ f ++ y ! (nextPrec ! p)) ! p ! k} ;
+    mkInfixL : Str -> Prec -> PrecTerm -> PrecTerm -> PrecTerm = 
+      \f -> \p -> \x -> \y ->
+      table {k => mkPrec (x ! p ++ f ++ y ! (nextPrec ! p)) ! p ! k} ;
+    mkInfixR : Str -> Prec -> PrecTerm -> PrecTerm -> PrecTerm = 
+      \f -> \p -> \x -> \y ->
+      table {k => mkPrec (x ! (nextPrec ! p) ++ f ++ y ! p) ! p ! k} ;
+
+

+
+

+alternative: +precedence as inherent feature +

+
+    lintype TermWithPrec = {s : Str ; p : Prec} ;
+    
+    oper 
+    mkpPrec : Str -> Prec -> TermWithPrec =
+      \f -> \p ->
+      {s = f ; p = p} ;
+    
+    usePrec : TermWithPrec -> Prec -> Str =
+      \x -> \p ->
+      mkPrec x.s ! x.p ! p ;
+
+

+

+make a string into a constant, of precedence p4 +

+
+    mkpConst : Str -> TermWithPrec = 
+      \f -> 
+      mkpPrec f p4 ;
+
+

+

+make a string into a 1/2/3 -place prefix operator, of precedence p3 +

+
+    mkpFun1 : Str -> TermWithPrec -> TermWithPrec = 
+      \f -> \x ->
+      mkpPrec (f ++ usePrec x p4) p3 ;
+    
+    mkpFun2 : Str -> TermWithPrec -> TermWithPrec -> TermWithPrec = 
+      \f -> \x -> \y ->
+      mkpPrec (f ++ usePrec x p4 ++ usePrec y p4) p3 ;
+    
+    mkpFun3 : Str -> TermWithPrec -> TermWithPrec -> TermWithPrec -> TermWithPrec = 
+      \f -> \x -> \y -> \z ->
+      mkpPrec (f ++ usePrec x p4 ++ usePrec y p4 ++ usePrec z p4) p3 ;
+
+

+

+make a string a into non/left/right -associative infix operator, of precedence p +

+
+    mkpInfix : Str -> Prec -> TermWithPrec -> TermWithPrec -> TermWithPrec = 
+      \f -> \p -> \x -> \y ->
+      mkpPrec (usePrec x (nextPrec ! p) ++ f ++ usePrec y (nextPrec ! p)) p ;
+    mkpInfixL : Str -> Prec -> TermWithPrec -> TermWithPrec -> TermWithPrec = 
+      \f -> \p -> \x -> \y ->
+      mkpPrec (usePrec x p ++ f ++ usePrec y (nextPrec ! p)) p ;
+    mkpInfixR : Str -> Prec -> TermWithPrec -> TermWithPrec -> TermWithPrec = 
+      \f -> \p -> \x -> \y ->
+      mkpPrec (usePrec x (nextPrec ! p) ++ f ++ usePrec y p) p ;
+    } ;
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Predef.html b/lib/resource-1.0/doc/gfdoc/Predef.html new file mode 100644 index 000000000..e9b87e237 --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Predef.html @@ -0,0 +1,66 @@ + + + + + Predefined functions for concrete syntax + +

Predefined functions for concrete syntax

+ +Last update: Sat Feb 25 22:36:02 2006
+% NOTE: this is a txt2tags file. +
+ +

+
+

+

+
+

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+The definitions of these constants are hard-coded in GF, and defined +in 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 of booleans is for internal use only. +

+
+      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
+    
+      oper length : Tok ->        Int      = variants {} ; -- length of string
+      oper drop   : Int -> Tok -> Tok      = variants {} ; -- drop prefix of length
+      oper take   : Int -> Tok -> Tok      = variants {} ; -- take prefix of length
+      oper tk     : Int -> Tok -> Tok      = variants {} ; -- drop suffix of length
+      oper dp     : Int -> Tok -> Tok      = variants {} ; -- take suffix of length
+      oper eqInt  : Int -> Int -> PBool    = variants {} ; -- test if equal integers
+      oper lessInt: Int -> Int -> PBool    = variants {} ; -- test order of integers
+      oper plus   : Int -> Int -> Int      = variants {} ; -- add integers
+      oper eqStr  : Tok -> Tok -> PBool    = variants {} ; -- test if equal strings
+      oper occur  : Tok -> Tok -> PBool    = variants {} ; -- test if occurs as substring
+      oper occurs : Tok -> Tok -> PBool    = variants {} ; -- test if any char occurs
+      oper show   : (P : Type) -> P -> Tok = variants {} ; -- convert param to string
+      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; experimental ---
+    
+    } ;
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/PredefAbs.html b/lib/resource-1.0/doc/gfdoc/PredefAbs.html new file mode 100644 index 000000000..b883207dc --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/PredefAbs.html @@ -0,0 +1,32 @@ + + + + + + + + +

+
+

+

+
+

+

+Last update: Sat Feb 25 22:36:02 2006 +

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+
+    abstract PredefAbs = {
+      cat Int ; String ;
+    } ;
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Predication.html b/lib/resource-1.0/doc/gfdoc/Predication.html index ad208d90f..60aa778d1 100644 --- a/lib/resource-1.0/doc/gfdoc/Predication.html +++ b/lib/resource-1.0/doc/gfdoc/Predication.html @@ -6,23 +6,20 @@

A Small Predication Library

-Author:
-Last update: Tue Feb 21 16:23:56 2006 +Last update: Sat Feb 25 22:36:00 2006
+% NOTE: this is a txt2tags file.


-


@@ -32,8 +29,6 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

A Small Predication Library

(c) Aarne Ranta 2003-2006 under Gnu GPL.

@@ -45,7 +40,7 @@ API of resource grammars. abstract Predication = Cat ** {

- +

The category of atomic sentences

We want to use sentences in positive and negative forms but do not care about @@ -57,7 +52,7 @@ tenses. NegCl : Cl -> S ; -- negative sentence: "x doesn't intersect y"

- +

Predication patterns.

       predV     : V  -> NP -> Cl ;         -- one-place verb:      "x converges"
@@ -75,7 +70,7 @@ tenses.
       predPrep  : Prep -> NP -> NP -> Cl ; -- preposition:         "x is outside y"
 

- +

Individual-valued function applications

       appN2     : N2 -> NP -> NP ;         -- one-place function:  "the successor of x"
@@ -83,7 +78,7 @@ tenses.
       appColl   : N2 -> NP -> NP -> NP ;   -- collective function: "the sum of x and y"
 

- +

Families of types

These are expressed by relational nouns applied to arguments. @@ -94,7 +89,7 @@ These are expressed by relational nouns applied to arguments. famColl : N2 -> NP -> NP -> CN ; -- collective family: "path between x and y"

- +

Type constructor

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.

- + diff --git a/lib/resource-1.0/doc/gfdoc/Prelude.html b/lib/resource-1.0/doc/gfdoc/Prelude.html new file mode 100644 index 000000000..70e558fcc --- /dev/null +++ b/lib/resource-1.0/doc/gfdoc/Prelude.html @@ -0,0 +1,223 @@ + + + + + The GF Prelude + +

The GF Prelude

+ +Last update: Sat Feb 25 22:36:03 2006
+% NOTE: this is a txt2tags file. +
+ +

+
+

+ + +

+
+

+

+Produced by +gfdoc - a rudimentary GF document generator. +(c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL. +

+

+This file defines some prelude facilities usable in all grammars. +

+
+    resource Prelude = open (Predef=Predef) in {
+    
+    oper
+
+

+ +

Strings, records, and tables

+
+      SS  : Type = {s : Str} ;
+      ss  : Str -> SS = \s -> {s = s} ;
+      ss2 : (_,_ : Str) -> SS = \x,y -> ss (x ++ y) ;
+      ss3 : (_,_ ,_: Str) -> SS = \x,y,z -> ss (x ++ y ++ z) ;
+    
+      cc2 : (_,_ : SS) -> SS = \x,y -> ss (x.s ++ y.s) ;
+      cc3 : (_,_,_ : SS) -> SS = \x,y,z -> ss (x.s ++ y.s ++ z.s) ;
+    
+      SS1 : Type -> Type = \P -> {s : P => Str} ;
+      ss1 : (A : Type) -> Str -> SS1 A = \A,s -> {s = table {_ => s}} ;
+    
+      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} ;
+
+

+ +

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

+

+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) ;
+
+

+ +

Infixes. prefixes, and postfixes

+

+Fixes with precedences are defined in Precedence. +

+
+      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) ;
+
+

+ +

Booleans

+
+     param Bool = True | False ;
+    
+    oper
+      if_then_else : (A : Type) -> Bool -> A -> A -> A = \_,c,d,e -> 
+        case c of {
+          True => d ;  ---- should not need to qualify
+          False => e
+         } ;
+    
+      andB : (_,_ : Bool) -> Bool = \a,b -> if_then_else Bool a b False ;
+      orB  : (_,_ : Bool) -> Bool = \a,b -> if_then_else Bool a True b ;
+      notB : Bool         -> Bool = \a   -> if_then_else Bool a False True ;
+    
+      if_then_Str : Bool -> Str -> Str -> Str = if_then_else Str ;
+    
+      onlyIf : Bool -> Str -> Str = \b,s -> case b of {
+        True => s ;
+        _ => nonExist
+        } ;
+
+

+

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

+ +

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

+ +

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 = "&|" ;
+
+

+ +

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 ;
+    
+    oper
+      eNext : ENumber -> ENumber = \e -> case e of {
+        E0 => E1 ; E1 => E2 ; _ => Emore} ;
+    
+    }
+
+

+ + + + diff --git a/lib/resource-1.0/doc/gfdoc/Question.html b/lib/resource-1.0/doc/gfdoc/Question.html index 8fe66fa78..389f5cafc 100644 --- a/lib/resource-1.0/doc/gfdoc/Question.html +++ b/lib/resource-1.0/doc/gfdoc/Question.html @@ -6,17 +6,13 @@

Questions and interrogative pronouns

-Author:
-Last update: Tue Feb 21 16:23:53 2006 +Last update: Sat Feb 25 22:35:56 2006
+% NOTE: this is a txt2tags file.


- -


@@ -25,8 +21,6 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

Questions and interrogative pronouns

     abstract Question = Cat ** {
 
@@ -63,6 +57,6 @@ More IP, IDet, and IAdv are defined in

- + diff --git a/lib/resource-1.0/doc/gfdoc/Relative.html b/lib/resource-1.0/doc/gfdoc/Relative.html index 841449a6b..afc87c751 100644 --- a/lib/resource-1.0/doc/gfdoc/Relative.html +++ b/lib/resource-1.0/doc/gfdoc/Relative.html @@ -6,17 +6,13 @@

Relative clauses and pronouns

-Author:
-Last update: Tue Feb 21 16:23:53 2006 +Last update: Sat Feb 25 22:35:56 2006
+% NOTE: this is a txt2tags file.


- -


@@ -25,8 +21,6 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

Relative clauses and pronouns

     abstract Relative = Cat ** {
     
@@ -62,6 +56,6 @@ or suffixing (depending on language) prepositional phrases.
 

- + diff --git a/lib/resource-1.0/doc/gfdoc/Sentence.html b/lib/resource-1.0/doc/gfdoc/Sentence.html index fe3c8ca6d..a1b3c2fc8 100644 --- a/lib/resource-1.0/doc/gfdoc/Sentence.html +++ b/lib/resource-1.0/doc/gfdoc/Sentence.html @@ -6,23 +6,20 @@

Sentences, clauses, imperatives, and sentential complements

-Author:
-Last update: Tue Feb 21 16:23:54 2006 +Last update: Sat Feb 25 22:35:56 2006
+% NOTE: this is a txt2tags file.


-


@@ -32,13 +29,11 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

Sentences, clauses, imperatives, and sentential complements

     abstract Sentence = Cat ** {
 

- +

Clauses

The NP VP predication rule form a clause whose linearization @@ -59,7 +54,7 @@ is only meaningful for some verb phrases. PredSCVP : SC -> VP -> Cl ; -- that you go makes me happy

- +

Clauses missing object noun phrases

This category is a variant of the 'slash category' S/NP of @@ -77,7 +72,7 @@ the style of CCG. SlashPrep : Cl -> Prep -> Slash ; -- (with whom) he walks

- +

Imperatives

An imperative is straightforwardly formed from a verb phrase. @@ -88,7 +83,7 @@ To fix these parameters, see Phrase. ImpVP : VP -> Imp ; -- go

- +

Embedded sentences

Sentences, questions, and infinitival phrases can be used as @@ -100,7 +95,7 @@ subjects and (adverbial) complements. EmbedVP : VP -> SC ; -- to go

- +

Sentences

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

- + diff --git a/lib/resource-1.0/doc/gfdoc/Structural.html b/lib/resource-1.0/doc/gfdoc/Structural.html index f87e9e4ba..08f40e66b 100644 --- a/lib/resource-1.0/doc/gfdoc/Structural.html +++ b/lib/resource-1.0/doc/gfdoc/Structural.html @@ -6,17 +6,13 @@

GF Resource Grammar API for Structural Words

-Author:
-Last update: Tue Feb 21 16:23:54 2006 +Last update: Sat Feb 25 22:35:57 2006
+% NOTE: this is a txt2tags file.


- -


@@ -25,8 +21,6 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

GF Resource Grammar API for Structural Words

AR 21/11/2003 -- 30/11/2005

@@ -145,6 +139,6 @@ This is an alphabetical list of structural words

- + diff --git a/lib/resource-1.0/doc/gfdoc/Symbol.html b/lib/resource-1.0/doc/gfdoc/Symbol.html index 7903f9236..997d94c2a 100644 --- a/lib/resource-1.0/doc/gfdoc/Symbol.html +++ b/lib/resource-1.0/doc/gfdoc/Symbol.html @@ -6,20 +6,17 @@

Symbolic expressions

-Author:
-Last update: Tue Feb 21 16:23:56 2006 +Last update: Sat Feb 25 22:36:00 2006
+% NOTE: this is a txt2tags file.


-


@@ -29,17 +26,15 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

Symbolic expressions

Note. This module is not automatically included in the main grammar Lang.

-    abstract Symbol = Cat ** {
+    abstract Symbol = Cat, PredefAbs ** {
 

- +

Noun phrases with symbols and numbers

     fun
@@ -51,7 +46,7 @@ grammar Lang.
       CNSymbNP : Det -> CN -> [Symb] -> NP ; -- (the) (2) numbers x and y
 

- +

Symbol lists

A symbol list has at least two elements. The last two are separated @@ -70,6 +65,6 @@ This produces x, y and z, in English.

- + diff --git a/lib/resource-1.0/doc/gfdoc/Tense.html b/lib/resource-1.0/doc/gfdoc/Tense.html index 79f170e2b..140db9575 100644 --- a/lib/resource-1.0/doc/gfdoc/Tense.html +++ b/lib/resource-1.0/doc/gfdoc/Tense.html @@ -6,17 +6,13 @@

Tense, Polarity, and Anteriority

-Author:
-Last update: Tue Feb 21 16:23:54 2006 +Last update: Sat Feb 25 22:35:57 2006
+% NOTE: this is a txt2tags file.


- -


@@ -25,8 +21,6 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

Tense, Polarity, and Anteriority

This module defines the abstract parameters of tense, polarity, and anteriority, which are used in Tensed to generate different @@ -52,6 +46,6 @@ Romance languages.

- + diff --git a/lib/resource-1.0/doc/gfdoc/Text.html b/lib/resource-1.0/doc/gfdoc/Text.html index 0d28c3e6e..10b8d2c13 100644 --- a/lib/resource-1.0/doc/gfdoc/Text.html +++ b/lib/resource-1.0/doc/gfdoc/Text.html @@ -6,17 +6,13 @@

Texts

-Author:
-Last update: Tue Feb 21 16:23:54 2006 +Last update: Sat Feb 25 22:35:57 2006
+% NOTE: this is a txt2tags file.


- -


@@ -25,8 +21,6 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

Texts

     abstract Text = Cat ** {
     
@@ -40,6 +34,6 @@ gfdoc - a rudimentary GF document generator.
 

- + diff --git a/lib/resource-1.0/doc/gfdoc/Verb.html b/lib/resource-1.0/doc/gfdoc/Verb.html index c1fd5b16b..126d98505 100644 --- a/lib/resource-1.0/doc/gfdoc/Verb.html +++ b/lib/resource-1.0/doc/gfdoc/Verb.html @@ -6,22 +6,19 @@

The construction of verb phrases

-Author:
-Last update: Tue Feb 21 16:23:54 2006 +Last update: Sat Feb 25 22:35:57 2006
+% NOTE: this is a txt2tags file.


-


@@ -31,13 +28,11 @@ Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

- -

The construction of verb phrases

     abstract Verb = Cat ** {
 

- +

Complementization rules

Verb phrases are constructed from verbs by providing their @@ -57,7 +52,7 @@ complements. There is one rule for each verb category. ComplV2A : V2A -> NP -> AP -> VP ; -- paint the house red

- +

Other ways of forming verb phrases

Verb phrases can also be constructed reflexively and from @@ -98,7 +93,7 @@ vs. next to (or before) the verb. Agents of passives are constructed as adverbs with the preposition Structural.8agent_Prep.

- +

Complements to copula

Adjectival phrases, noun phrases, and adverbs can be used. @@ -109,7 +104,7 @@ Adjectival phrases, noun phrases, and adverbs can be used. CompAdv : Adv -> Comp ; -- (be) here

- +

Coercions

Verbs can change subcategorization patterns in systematic ways, @@ -124,6 +119,6 @@ work in all the languages we cover.

- + diff --git a/lib/resource-1.0/doc/index.html b/lib/resource-1.0/doc/index.html index 513397e85..4bf170d26 100644 --- a/lib/resource-1.0/doc/index.html +++ b/lib/resource-1.0/doc/index.html @@ -7,19 +7,20 @@

GF Resource Grammar Library v. 1.0

Author: Aarne Ranta <aarne (at) cs.chalmers.se>
-Last update: Tue Feb 21 16:23:46 2006 +Last update: Sat Feb 25 23:18:51 2006


@@ -29,14 +30,49 @@ Last update: Tue Feb 21 16:23:46 2006

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 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: +

+ + +

+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.

@@ -66,7 +102,7 @@ The documentation of the individual modules:
  • Lang: the main module comprising all the others - +

    The language-dependent APIs

    - -

    Special-purpose APIs

    +

    Special-purpose APIs

    +

    Multimodal

    - +

    Mathematical

    - + diff --git a/lib/resource-1.0/doc/index.txt b/lib/resource-1.0/doc/index.txt index 8b7175aa6..b480c9c18 100644 --- a/lib/resource-1.0/doc/index.txt +++ b/lib/resource-1.0/doc/index.txt @@ -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. diff --git a/src/GF.hs b/src/GF.hs index b1f68f57d..054ff6e89 100644 --- a/src/GF.hs +++ b/src/GF.hs @@ -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 diff --git a/src/GF/Shell/ShellCommands.hs b/src/GF/Shell/ShellCommands.hs index 59500e7fa..56c172037 100644 --- a/src/GF/Shell/ShellCommands.hs +++ b/src/GF/Shell/ShellCommands.hs @@ -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