diff --git a/lib/doc/Makefile b/lib/doc/Makefile index 883542548..b455a6cb3 100644 --- a/lib/doc/Makefile +++ b/lib/doc/Makefile @@ -17,6 +17,7 @@ abstract: exx-script: runghc MkExx.hs api-examples.gfs exx: exx-script + gf -retain -s ../alltenses/TryAfr.gfo api-examples-Afr.txt gf -retain -s ../alltenses/TryBul.gfo api-examples-Bul.txt gf -retain -s ../alltenses/TryCat.gfo api-examples-Cat.txt gf -retain -s ../alltenses/TryDan.gfo api-examples-Dan.txt @@ -27,6 +28,7 @@ exx: exx-script gf -retain -s ../alltenses/TryGer.gfo api-examples-Ger.txt gf -retain -s ../alltenses/TryIta.gfo api-examples-Ita.txt gf -retain -s ../alltenses/TryNor.gfo api-examples-Nor.txt + gf -retain -s ../alltenses/TryPnb.gfo api-examples-Pnb.txt gf -retain -s ../alltenses/TryPol.gfo api-examples-Pol.txt gf -retain -s ../alltenses/TryRon.gfo api-examples-Ron.txt gf -retain -s ../alltenses/TryRus.gfo api-examples-Rus.txt diff --git a/lib/doc/MkSynopsis.hs b/lib/doc/MkSynopsis.hs index 5eb331980..a60b0cf4a 100644 --- a/lib/doc/MkSynopsis.hs +++ b/lib/doc/MkSynopsis.hs @@ -17,7 +17,7 @@ revealedLang = "Eng" -- all languages shown apiExxFiles = ["api-examples-" ++ lang ++ ".txt" | lang <- words - "Bul Cat Dan Dut Eng Fin Fre Ger Ita Nor Pol Ron Rus Spa Swe Urd"] + "Afr Bul Cat Dan Dut Eng Fin Fre Ger Ita Nor Pnb Pol Ron Rus Spa Swe Urd"] main = do xx <- getArgs @@ -80,6 +80,8 @@ main = do title "Lexical Paradigms" mapM_ (putParadigms isLatex cs) paradigmFiles space + include "synopsis-additional.txt" + space include "synopsis-browse.txt" space title "An Example of Usage" @@ -234,6 +236,7 @@ catAPI = srcPath "/abstract/Cat.gf" syntaxAPI = srcPath "/api/Constructors.gf" structuralAPI = srcPath "/abstract/Structural.gf" paradigmFiles = [ + ("Afrikaans", srcPath "/afrikaans/ParadigmsAfr.gf"), ("Bulgarian", srcPath "/bulgarian/ParadigmsBul.gf"), ("Catalan", srcPath "/catalan/ParadigmsCat.gf"), ("Danish", srcPath "/danish/ParadigmsDan.gf"), @@ -246,6 +249,7 @@ paradigmFiles = [ ("Italian", srcPath "/italian/ParadigmsIta.gf"), ("Norwegian", srcPath "/norwegian/ParadigmsNor.gf"), ("Polish", srcPath "/polish/ParadigmsPol.gf"), + ("Punjabi", srcPath "/punjabi/ParadigmsPnb.gf"), ("Romanian", srcPath "/romanian/ParadigmsRon.gf"), ("Russian", srcPath "/russian/ParadigmsRus.gf"), ("Spanish", srcPath "/spanish/ParadigmsSpa.gf"), diff --git a/lib/doc/synopsis-additional.txt b/lib/doc/synopsis-additional.txt new file mode 100644 index 000000000..41ae04784 --- /dev/null +++ b/lib/doc/synopsis-additional.txt @@ -0,0 +1,115 @@ + + + + +=Additional Libraries= + + +==The Prelude module== + +The ``Prelude`` defines commonly used utility functions, in particular for +strings and booleans. + +|| Oper | Type | Explanation || +| ``SS`` | ``Type`` | the type ``{s : Str}`` +| ``ss`` | ``Str -> SS`` | record from string +| ``nonExist`` | ``Str`` | missing form +| ``optStr`` | ``Str -> Str`` | optional string +| ``bothWays`` | ``(x,y : Str) -> Str`` | either ``x ++ y`` or ``y ++ x`` +| ``Bool`` | ``PType`` | values ``True`` and ``False`` +| ``andB`` | ``(_,_ : Bool) -> Bool`` | conjunction +| ``orB`` | ``(_,_ : Bool) -> Bool`` | disjunction +| ``notB`` | ``Bool -> Bool`` | negation +| ``if_then_else`` | ``(A:Type)->Bool->A->A->A`` | conditional +| ``init`` | ``Str -> Str`` | drop last character +| ``last`` | ``Str -> Str`` | return last character +| ``glue`` | ``Str -> Str -> Str`` | glue tokens together + + +==The Predefined module== + +These functions are hard-coded in GF. They are available without explicit opening, by the used of qualified names, e.g. ``Predef.tk``. + +|| operation | type | explanation || +| ``PBool`` | ``PType`` | ``PTrue | PFalse`` +| ``Error`` | ``Type`` | the empty type +| ``Integer`` | ``Type`` | the type of integers +| ``Ints`` | ``Integer -> Type`` | integers from 0 to n +| ``error`` | ``Str -> Error`` | forms error message +| ``length`` | ``Str -> Int`` | length of string +| ``drop`` | ``Integer -> Str -> Str`` | drop prefix of length +| ``take`` | ``Integer -> Str -> Str`` | take prefix of length +| ``tk`` | ``Integer -> Str -> Str`` | drop suffix of length +| ``dp`` | ``Integer -> Str -> Str`` | take suffix of length +| ``eqInt`` | ``Integer -> Integer -> PBool`` | test if equal integers +| ``lessInt`` | ``Integer -> Integer -> PBool`` | test order of integers +| ``plus`` | ``Integer -> Integer -> Integer`` | add integers +| ``eqStr`` | ``Str -> Str -> PBool`` | test if equal strings +| ``occur`` | ``Str -> Str -> PBool`` | test if occurs as substring +| ``occurs`` | ``Str -> Str -> PBool`` | test if any char occurs +| ``show`` | ``(P : Type) -> P -> Str`` | convert param to string +| ``toStr`` | ``(L : Type) -> L -> Str`` | find the "first" string + + + +==The Formal module== + +This module is used for defining formal languages, in particular ones that +use precedence levels and parentheses for grouping subexpressions. + +|| Oper | Type | Explanation || +| ``Prec`` | ``PType`` | precedence levels 0..4 +| ``TermPrec`` | ``Type`` | string with precedence +| ``mkPrec`` | ``Prec -> Str -> TermPrec`` | construct a ``TermPrec`` +| ``top`` | ``TermPrec -> Str`` | top term (lowest prec.) +| ``constant`` | ``Str -> TermPrec`` | atomic (highest prec.) +| ``infixl`` | ``Prec->Str->(_,_:TermPrec)->TermPrec`` | left-assoc. infix +| ``infixr`` | ``Prec->Str->(_,_:TermPrec)->TermPrec`` | right-assoc. infix +| ``infixn`` | ``Prec->Str->(_,_:TermPrec)->TermPrec`` | non-assoc. infix +| ``usePrec`` | ``Prec -> TermPrec -> Str`` | use term on given level + + +==The Symbolic module== + +This module is used for embedding symbolic notation in natural-language +text constructed by the resource grammar API. It works for all resource +languages. + +|| Function | Type | Example || +| ``symb`` | ``Str -> NP`` | //x// +| ``symb`` | ``Int -> NP`` | //23// +| ``symb`` | ``Float -> NP`` | //0.99// +| ``symb`` | ``CN -> Numeral -> NP`` | //level four// +| ``symb`` | ``Det -> N+ -> Numeral -> NP`` | //the level four// +| ``symb`` | ``Det -> CN -> [Symb] -> NP`` | //the levels i, j and k// +| ``symb`` | ``Symb -> S`` | //A// (formula) +| ``symb`` | ``Symb -> Card`` | //n// (number) +| ``mkSymb`` | ``Str -> Symb`` | //x// + + +==The Combinators module== + +This module gives shortcuts for defining predicates (``pred``) and function +expressions (``app``). It works for all resource languages. + +|| Function | Type | Example || +| ``pred`` | ``V -> NP -> Cl`` | //x converges// +| ``pred`` | ``V2 -> NP -> NP -> Cl`` | //x intersects y// +| ``pred`` | ``V -> NP -> NP -> Cl`` | //x and y intersect// +| ``pred`` | ``A -> NP -> Cl`` | //x is even// +| ``pred`` | ``A2 -> NP -> NP -> Cl`` | //x is divisible by y// +| ``pred`` | ``A -> NP -> NP -> Cl`` | //x and y are equal// +| ``pred`` | ``N -> NP -> Cl`` | //x is a maximum// +| ``pred`` | ``N -> NP -> NP -> Cl`` | //x and y are inverses// +| ``pred`` | ``Adv -> NP -> Cl`` | //x is in scope// +| ``pred`` | ``Prep -> NP -> NP -> Cl`` | //x is outside y// +| ``app`` | ``N -> NP`` | //the bottom// +| ``app`` | ``N2 -> NP -> NP`` | //the successor of x// +| ``app`` | ``N3 -> NP -> NP -> NP`` | //the distance from x to y// +| ``app`` | ``N2 -> NP -> NP -> NP`` | //the sum of x and y// +| ``app`` | ``N2 -> N -> CN`` | //set of integers// +| ``app`` | ``N2 -> NP -> CN`` | //divisor of x// +| ``app`` | ``N3 -> NP -> NP -> CN`` | //path from x to y// +| ``app`` | ``N2 -> NP -> NP -> CN`` | //path between x and y// + + diff --git a/lib/doc/synopsis-browse.txt b/lib/doc/synopsis-browse.txt index 4d26fc600..d64403183 100644 --- a/lib/doc/synopsis-browse.txt +++ b/lib/doc/synopsis-browse.txt @@ -7,28 +7,17 @@ **New**: Browsing by syntax editor [directly on the web ../../../demos/resource-api/editor.html]. -All of the following assume -``` - cd $GF_LIB_PATH -``` +All of the following assume that +``GF_LIB_PATH`` points to the directory ``GF/lib`` with compiled libraries. + To try out inflection paradigms: ``` - > i -path=alltenses -retain alltenses/ParadigmsGer.gfo + > i -retain alltenses/ParadigmsGer.gfo > cc mkN "Farbe" ``` To try out overloaded syntax, test lexicon, and inflection paradigms: ``` - > i -path=alltenses -retain alltenses/TryGer.gfo + > i -retain alltenses/TryGer.gfo > cc mkCl (mkNP this_Quant (mkN "Farbe")) (mkA "dunkel") ``` -% To look for a syntax tree in the overload API by parsing: -% ``` -% > i -path=alltenses alltenses/OverLangEng.gf -% > p -cat=S -overload "this grammar is too big" -% ``` -% To view linearizations in all languages by parsing from English: -% ``` -% > i alltenses/langs.gfcm -% > p -cat=S -lang=LangEng "this grammar is too big" | tb -% ``` diff --git a/lib/doc/synopsis-intro.txt b/lib/doc/synopsis-intro.txt index 1f4651b72..ad2ead3b8 100644 --- a/lib/doc/synopsis-intro.txt +++ b/lib/doc/synopsis-intro.txt @@ -23,11 +23,12 @@ constructing trees in them. - [Chapter 2 #toc5]: syntactic construction functions, with cross-links and examples. - [Chapter 3 #toc83]: morphological paradigms. -- [Chapter 4 #toc100]: how to "browse" the library by +- [Chapter 4 #toc102]: additional libraries. +- [Chapter 5 #toc108]: how to "browse" the library by loading the grammars into the ``gf`` command editor. -- [Chapter 5 #toc101]: a brief example of how application grammars can +- [Chapter 6 #toc109]: a brief example of how application grammars can use the resource modules. -- [Detailed table of contents #toc102]. +- [Detailed table of contents #toc110]. Many examples in [Chapter 2 #toc5] can be seen in multiple languages by hovering the diff --git a/lib/doc/synopsis.html b/lib/doc/synopsis.html index 3600259d5..5106163e9 100644 --- a/lib/doc/synopsis.html +++ b/lib/doc/synopsis.html @@ -1,18 +1,20 @@ - + GF Resource Grammar Library: Synopsis -

GF Resource Grammar Library: Synopsis

- -B. Bringert, T. Hallgren, and A. Ranta
-
+
+

GF Resource Grammar Library: Synopsis

+B. Bringert, T. Hallgren, and A. Ranta
+
+

Introduction

+

The GF Resource Grammar Library is the standard library for Grammatical Framework. It covers the morphology and basic syntax of currently 16 languages. @@ -28,17 +30,19 @@ possible format.

The main contents are:

+

@@ -51,6 +55,7 @@ mouse over the example, as shown in the following screenshot:

Other relevant documents:

+
  • status.html: the current status of different languages and the authors of each grammar @@ -70,14 +75,17 @@ Other relevant documents:

    Categories

    +

    Source 1: ../src/abstract/Common.gf

    Source 2: ../src/abstract/Cat.gf

    +

    A hierarchic view

    +

    The chart below shows the categories in a hierarchical top-down order. The edges do not define the complete dependency structure; if they did, @@ -87,7 +95,8 @@ of C that takes D as an argument. What the constructors exactly ar and what other arguments they take, is described by separate tables for each category.

    - + +
    @@ -150,9 +159,11 @@ each category. The rectangular boxes mark open lexical categories, which have constructors also in the Paradigms modules.

    +

    Explanations

    -
    + +
    @@ -477,27 +488,34 @@ also in the Paradigms modules.

    Syntax Rules and Structural Words

    +

    Source 1: ../src/api/Constructors.gf

    Source 2: ../src/abstract/Structural.gf

    +

    A - one-place adjective

    +

    Lexical category, constructors given in lexical paradigms.

    +

    A2 - two-place adjective

    +

    Lexical category, constructors given in lexical paradigms.

    +

    AP - adjectival phrase

    -
    Category Explanation
    + +
    @@ -506,88 +524,89 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    Function Type
    comparAP A -> AP
    warmer
    warmer
    mkAP A -> AP
    warm
    warm
    mkAP A -> NP -> AP
    warmer than Paris
    warmer than Paris
    mkAP A2 -> NP -> AP
    married to her
    married to her
    mkAP A2 -> AP
    married
    married
    mkAP AP -> S -> AP
    it is good that she sleeps
    it is good that she sleeps
    mkAP AP -> QS -> AP
    it is uncertain who sleeps
    it is uncertain who sleeps
    mkAP AP -> VP -> AP
    she is ready to sleep
    she is ready to sleep
    mkAP AP -> SC -> AP
    she is ready to sleep
    she is ready to sleep
    mkAP AdA -> A -> AP
    very old
    very old
    mkAP AdA -> AP -> AP
    very very old
    very very old
    mkAP Conj -> AP -> AP -> AP
    old or young
    old or young
    mkAP Conj -> ListAP -> AP
    old , big and warm
    old , big and warm
    mkAP Ord -> AP
    oldest
    oldest
    mkAP CAdv -> AP -> NP -> AP
    as old as she
    as old as she
    reflAP A2 -> AP
    married to itself
    married to itself

    AdA - adjective-modifying adverb

    - + +
    @@ -596,33 +615,34 @@ Lexical category, constructors given in - + - + - + - + - +
    Function Type
    almost_AdA AdA
    almost red
    almost red
    quite_Adv AdA
    quite
    quite
    so_AdA AdA
    so
    so
    too_AdA AdA
    too
    too
    very_AdA AdA
    very
    very

    AdN - numeral-modifying adverb

    - + +
    @@ -631,28 +651,29 @@ Lexical category, constructors given in - + - + - + - +
    Function Type
    almost_AdN AdN
    atomic term almostAdN
    atomic term almostAdN
    at_least_AdN AdN
    at least eight
    at least eight
    at_most_AdN AdN
    at most eight
    at most eight
    mkAdN CAdv -> AdN
    more than eight
    more than eight

    AdV - adverb directly attached to verb

    - + +
    @@ -661,13 +682,14 @@ Lexical category, constructors given in - +
    Function Type
    always_AdV AdV
    always
    always

    Adv - verb-phrase-modifying adverb

    - + +
    @@ -676,88 +698,89 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    Function Type
    everywhere_Adv Adv
    everywhere
    everywhere
    here7from_Adv Adv
    from here
    from here
    here7to_Adv Adv
    to here
    to here
    here_Adv Adv
    here
    here
    mkAdv A -> Adv
    warmly
    warmly
    mkAdv Prep -> NP -> Adv
    in the house
    in the house
    mkAdv Subj -> S -> Adv
    when she sleeps
    when she sleeps
    mkAdv CAdv -> A -> NP -> Adv
    more warmly than he
    more warmly than he
    mkAdv CAdv -> A -> S -> Adv
    more warmly than he runs
    more warmly than he runs
    mkAdv AdA -> Adv -> Adv
    very warmly
    very warmly
    mkAdv Conj -> Adv -> Adv -> Adv
    here and now
    here and now
    mkAdv Conj -> ListAdv -> Adv
    with her , here and now
    with her , here and now
    somewhere_Adv Adv
    somewhere
    somewhere
    there7from_Adv Adv
    from there
    from there
    there7to_Adv Adv
    there
    there
    there_Adv Adv
    there
    there

    Ant - anteriority

    - + +
    @@ -766,18 +789,19 @@ Lexical category, constructors given in - + - +
    Function Type
    anteriorAnt Ant
    she has slept
    she has slept
    simultaneousAnt Ant
    she sleeps
    she sleeps

    CAdv - comparative adverb

    - + +
    @@ -786,23 +810,24 @@ Lexical category, constructors given in - + - + - +
    Function Type
    as_CAdv CAdv
    as
    as
    less_CAdv CAdv
    less
    less
    more_CAdv CAdv
    more
    more

    CN - common noun (without determiner)

    - + +
    @@ -811,103 +836,104 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    Function Type
    mkCN N -> CN
    house
    house
    mkCN N2 -> NP -> CN
    mother of the king
    mother of the king
    mkCN N3 -> NP -> NP -> CN
    distance from this city to Paris
    distance from this city to Paris
    mkCN N2 -> CN
    mother
    mother
    mkCN N3 -> CN
    distance
    distance
    mkCN A -> N -> CN
    big house
    big house
    mkCN A -> CN -> CN
    big blue house
    big blue house
    mkCN AP -> N -> CN
    very big house
    very big house
    mkCN AP -> CN -> CN
    very big blue house
    very big blue house
    mkCN N -> RS -> CN
    man whom she loves
    man whom she loves
    mkCN CN -> RS -> CN
    old man whom she loves
    old man whom she loves
    mkCN N -> Adv -> CN
    house on the hill
    house on the hill
    mkCN CN -> Adv -> CN
    big house on the hill
    big house on the hill
    mkCN CN -> S -> CN
    almost five
    almost five
    mkCN CN -> QS -> CN
    almost five
    almost five
    mkCN CN -> VP -> CN
    reason to sleep
    reason to sleep
    mkCN CN -> SC -> CN
    reason to sleep
    reason to sleep
    mkCN N -> NP -> CN
    king John
    king John
    mkCN CN -> NP -> CN
    old king John
    old king John

    Card - cardinal number

    - + +
    @@ -921,7 +947,7 @@ Lexical category, constructors given in - + @@ -937,7 +963,8 @@ Lexical category, constructors given in

    Cl - declarative clause, with all tenses

    -
    Function Type
    mkCard Numeral -> Card
    seven
    seven
    mkCard
    + +
    @@ -946,122 +973,122 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1071,38 +1098,39 @@ Lexical category, constructors given in - + - + - + - + - + - +
    Function Type
    genericCl VP -> Cl
    one sleeps
    one sleeps
    mkCl NP -> V -> Cl
    she sleeps
    she sleeps
    mkCl NP -> V2 -> NP -> Cl
    she loves him
    she loves him
    mkCl NP -> V3 -> NP -> NP -> Cl
    she sends it to him
    she sends it to him
    mkCl NP -> VV -> VP -> Cl
    she wants to sleep
    she wants to sleep
    mkCl NP -> VS -> S -> Cl
    she says that I sleep
    she says that I sleep
    mkCl NP -> VQ -> QS -> Cl
    she wonders who sleeps
    she wonders who sleeps
    mkCl NP -> VA -> A -> Cl
    she becomes old
    she becomes old
    mkCl NP -> VA -> AP -> Cl
    she becomes very old
    she becomes very old
    mkCl NP -> V2A -> NP -> A -> Cl
    she paints it red
    she paints it red
    mkCl NP -> V2A -> NP -> AP -> Cl
    she paints it red
    she paints it red
    mkCl NP -> V2S -> NP -> S -> Cl
    she answers to him that we sleep
    she answers to him that we sleep
    mkCl NP -> V2Q -> NP -> QS -> Cl
    she asks him who sleeps
    she asks him who sleeps
    mkCl NP -> V2V -> NP -> VP -> Cl
    she begs him to sleep
    she begs him to sleep
    mkCl NP -> A -> Cl
    she is old
    she is old
    mkCl NP -> A -> NP -> Cl
    she is older than he
    she is older than he
    mkCl NP -> A2 -> NP -> Cl
    she is married to him
    she is married to him
    mkCl NP -> AP -> Cl
    she is very old
    she is very old
    mkCl NP -> NP -> Cl
    she is the woman
    she is the woman
    mkCl NP -> N -> Cl
    she is a woman
    she is a woman
    mkCl NP -> CN -> Cl
    she is an old woman
    she is an old woman
    mkCl NP -> Adv -> Cl
    she is here
    she is here
    mkCl NP -> VP -> Cl
    she always sleeps
    she always sleeps
    mkCl N -> Cl
    there is a house
    there is a house
    mkCl
    mkCl NP -> Cl
    there are many houses
    there are many houses
    mkCl NP -> RS -> Cl
    it is she who sleeps
    it is she who sleeps
    mkCl Adv -> S -> Cl
    it is here that she sleeps
    it is here that she sleeps
    mkCl V -> Cl
    it rains
    it rains
    mkCl VP -> Cl
    it is raining
    it is raining
    mkCl SC -> VP -> Cl
    that she sleeps is good
    that she sleeps is good

    ClSlash

    - + +
    @@ -1111,38 +1139,39 @@ Lexical category, constructors given in - + - + - + - + - + - +
    Function Type
    mkClSlash NP -> VPSlash -> ClSlash
    whom does she see
    whom does she see
    mkClSlash NP -> V2 -> ClSlash
    whom does she see
    whom does she see
    mkClSlash NP -> VV -> V2 -> ClSlash
    whom does she want to see
    whom does she want to see
    mkClSlash Cl -> Prep -> ClSlash
    with whom does she sleep
    with whom does she sleep
    mkClSlash ClSlash -> Adv -> ClSlash
    whom does she see today
    whom does she see today
    mkClSlash NP -> VS -> SSlash -> ClSlash
    whom does she know that we hadn't seen
    whom does she know that we hadn't seen

    Comp - complement of copula, such as AP

    - + +
    @@ -1151,23 +1180,24 @@ Lexical category, constructors given in - + - + - +
    Function Type
    mkComp AP -> Comp
    old
    old
    mkComp NP -> Comp
    this man
    this man
    mkComp Adv -> Comp
    here
    here

    Conj - conjunction

    - + +
    @@ -1176,33 +1206,34 @@ Lexical category, constructors given in - + - + - + - + - +
    Function Type
    and_Conj Conj
    here and now
    here and now
    both7and_DConj Conj
    both here and there
    both here and there
    either7or_DConj Conj
    either here or there
    either here or there
    if_then_Conj Conj
    if here then there
    if here then there
    or_Conj Conj
    here or there
    here or there

    Det - determiner phrase

    - + +
    @@ -1211,62 +1242,62 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + @@ -1286,63 +1317,64 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - +
    Function Type
    aPl_Det Det
    women
    women
    aSg_Det Det
    a woman
    a woman
    a_Det Det
    a house
    a house
    every_Det Det
    every
    every
    few_Det Det
    few
    few
    many_Det Det
    many houses
    many houses
    mkDet Quant -> Det
    this
    this
    mkDet Quant -> Card -> Det
    these five
    these five
    mkDet Quant -> Ord -> Det
    the fifth
    the fifth
    mkDet Quant -> Num -> Ord -> Det
    the five best
    the five best
    mkDet Quant -> Num -> Det
    these
    these
    mkDet Card -> Det
    five
    five
    mkDet
    mkDet Pron -> Num -> Det
    my five
    my five
    much_Det Det
    much
    much
    somePl_Det Det
    some
    some
    someSg_Det Det
    some
    some
    that_Det Det
    that woman
    that woman
    thePl_Det Det
    the houses
    the houses
    theSg_Det Det
    the house
    the house
    the_Det Det
    the house
    the house
    these_Det Det
    these women
    these women
    this_Det Det
    this woman
    this woman
    those_Det Det
    those women
    those women

    Dig

    - + +
    @@ -1402,7 +1434,8 @@ Lexical category, constructors given in

    Digits - cardinal or ordinal in digits

    -
    Function Type
    + +
    @@ -1416,18 +1449,19 @@ Lexical category, constructors given in - + - +
    Function Type
    mkDigits Dig -> Digits
    4
    4
    mkDigits Dig -> Digits -> Digits
    1 , 2 3 3 , 4 8 6
    1 , 2 3 3 , 4 8 6

    IAdv - interrogative adverb

    - + +
    @@ -1436,43 +1470,44 @@ Lexical category, constructors given in - + - + - + - + - + - + - +
    Function Type
    how8much_IAdv IAdv
    how much
    how much
    how_IAdv IAdv
    how
    how
    mkIAdv Prep -> IP -> IAdv
    in which city
    in which city
    mkIAdv IAdv -> Adv -> IAdv
    where in Paris
    where in Paris
    when_IAdv IAdv
    when
    when
    where_IAdv IAdv
    where
    where
    why_IAdv IAdv
    why
    why

    IComp - interrogative complement of copula

    - + +
    @@ -1492,7 +1527,8 @@ Lexical category, constructors given in

    IDet - interrogative determiner

    -
    Function Type
    + +
    @@ -1501,33 +1537,34 @@ Lexical category, constructors given in - + - + - + - + - +
    Function Type
    how8many_IDet IDet
    how many houses
    how many houses
    mkIDet IQuant -> Num -> IDet
    which houses
    which houses
    mkIDet IQuant -> IDet
    which house
    which house
    whichPl_IDet IDet
    which houses
    which houses
    which_IDet IDet
    which house
    which house

    IP - interrogative pronoun

    - + +
    @@ -1536,73 +1573,74 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + - +
    Function Type
    mkIP IDet -> CN -> IP
    which five big cities
    which five big cities
    mkIP IDet -> N -> IP
    which five cities
    which five cities
    mkIP IDet -> IP
    which five
    which five
    mkIP IQuant -> CN -> IP
    which big city
    which big city
    mkIP IQuant -> Num -> CN -> IP
    which five big cities
    which five big cities
    mkIP IQuant -> N -> IP
    which city
    which city
    mkIP IP -> Adv -> IP
    who in Paris
    who in Paris
    whatPl_IP IP
    what
    what
    whatSg_IP IP
    what
    what
    what_IP IP
    what
    what
    whoPl_IP IP
    who
    who
    whoSg_IP IP
    who
    who
    who_IP IP
    who
    who

    IQuant

    - + +
    @@ -1611,13 +1649,14 @@ Lexical category, constructors given in - +
    Function Type
    which_IQuant IQuant
    which house
    which house

    Imp - imperative

    - + +
    @@ -1626,23 +1665,24 @@ Lexical category, constructors given in - + - + - +
    Function Type
    mkImp VP -> Imp
    come to my house
    come to my house
    mkImp V -> Imp
    come
    come
    mkImp V2 -> NP -> Imp
    buy it
    buy it

    ImpForm

    - + +
    @@ -1651,29 +1691,32 @@ Lexical category, constructors given in - + - + - +
    Function Type
    pluralImpForm ImpForm
    be men
    be men
    politeImpForm ImpForm
    be a man
    be a man
    singularImpForm ImpForm
    be a man
    be a man

    Interj - interjection

    +

    Lexical category, constructors given in lexical paradigms.

    +

    ListAP

    - + +
    @@ -1693,7 +1736,8 @@ Lexical category, constructors given in

    ListAdv

    -
    Function Type
    + +
    @@ -1713,7 +1757,8 @@ Lexical category, constructors given in

    ListNP

    -
    Function Type
    + +
    @@ -1733,7 +1778,8 @@ Lexical category, constructors given in

    ListRS

    -
    Function Type
    + +
    @@ -1753,7 +1799,8 @@ Lexical category, constructors given in

    ListS

    -
    Function Type
    + +
    @@ -1773,25 +1820,32 @@ Lexical category, constructors given in

    N - common noun

    +

    Lexical category, constructors given in lexical paradigms.

    +

    N2 - relational noun

    +

    Lexical category, constructors given in lexical paradigms.

    +

    N3 - three-place relational noun

    +

    Lexical category, constructors given in lexical paradigms.

    +

    NP - noun phrase (subject or object)

    -
    Function Type
    + +
    @@ -1800,77 +1854,77 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1885,153 +1939,154 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    Function Type
    everybody_NP NP
    everybody
    everybody
    everything_NP NP
    everything
    everything
    he_NP NP
    he
    he
    i_NP NP
    I
    I
    it_NP NP
    it
    it
    mkNP Quant -> N -> NP
    this man
    this man
    mkNP Quant -> CN -> NP
    this old man
    this old man
    mkNP Quant -> Num -> CN -> NP
    these five old men
    these five old men
    mkNP Quant -> Num -> N -> NP
    these five men
    these five men
    mkNP Det -> CN -> NP
    the five old men
    the five old men
    mkNP Det -> N -> NP
    the five men
    the five men
    mkNP Numeral -> CN -> NP
    fifty old men
    fifty old men
    mkNP Numeral -> N -> NP
    fifty men
    fifty men
    mkNP Digits -> CN -> NP
    5 1 old men
    5 1 old men
    mkNP Digits -> N -> NP
    5 1 men
    5 1 men
    mkNP
    mkNP Pron -> CN -> NP
    my old man
    my old man
    mkNP Pron -> N -> NP
    my man
    my man
    mkNP PN -> NP
    Paris
    Paris
    mkNP Pron -> NP
    we
    we
    mkNP Quant -> NP
    this
    this
    mkNP Quant -> Num -> NP
    these five
    these five
    mkNP Det -> NP
    the five best
    the five best
    mkNP CN -> NP
    old beer
    old beer
    mkNP N -> NP
    beer
    beer
    mkNP Predet -> NP -> NP
    only this woman
    only this woman
    mkNP NP -> V2 -> NP
    the man seen
    the man seen
    mkNP NP -> Adv -> NP
    Paris today
    Paris today
    mkNP NP -> RS -> NP
    John , who walks
    John , who walks
    mkNP Conj -> NP -> NP -> NP
    this woman or John
    this woman or John
    mkNP Conj -> ListNP -> NP
    this woman , John or I
    this woman , John or I
    nobody_NP NP
    nobody
    nobody
    nothing_NP NP
    nothing
    nothing
    she_NP NP
    she
    she
    somebody_NP NP
    somebody
    somebody
    something_NP NP
    something
    something
    that_NP NP
    that
    that
    these_NP NP
    these
    these
    they_NP NP
    they
    they
    this_NP NP
    this
    this
    those_NP NP
    those
    those
    we_NP NP
    we
    we
    youPl_NP NP
    you
    you
    youPol_NP NP
    you
    you
    you_NP NP
    you
    you

    Num - number determining element

    - + +
    @@ -2045,12 +2100,12 @@ Lexical category, constructors given in - + - + @@ -2060,12 +2115,12 @@ Lexical category, constructors given in - + - + @@ -2081,7 +2136,8 @@ Lexical category, constructors given in

    Numeral - cardinal or ordinal in words

    -
    Function Type
    mkNum Numeral -> Num
    twenty
    twenty
    mkNum Digits -> Num
    2 1
    2 1
    mkNum
    mkNum Card -> Num
    almost five
    almost five
    mkNum AdN -> Card -> Num
    almost five
    almost five
    pluralNum
    + +
    @@ -2100,12 +2156,12 @@ Lexical category, constructors given in - + - + @@ -2115,13 +2171,14 @@ Lexical category, constructors given in - +
    Function Type
    mkNumeral Sub1000 -> Numeral
    nine hundred and ninety - nine
    nine hundred and ninety - nine
    mkNumeral Sub1000 -> Sub1000 -> Numeral
    nine hundred and ninety - nine thousand nine hundred and ninety - nine
    nine hundred and ninety - nine thousand nine hundred and ninety - nine
    mkNumeral
    thousandfoldNumeral Sub1000 -> Numeral
    nine hundred and ninety - nine thousand
    nine hundred and ninety - nine thousand

    Ord - ordinal number (used in Det)

    - + +
    @@ -2145,13 +2202,14 @@ Lexical category, constructors given in - +
    Function Type
    mkOrd A -> Ord
    smallest
    smallest

    PConj - phrase-beginning conjunction

    - + +
    @@ -2160,34 +2218,37 @@ Lexical category, constructors given in - + - + - + - +
    Function Type
    but_PConj PConj
    but
    but
    mkPConj Conj -> PConj
    and now
    and now
    otherwise_PConj PConj
    otherwise
    otherwise
    therefore_PConj PConj
    therefore
    therefore

    PN - proper name

    +

    Lexical category, constructors given in lexical paradigms.

    +

    Phr - phrase in a text

    - + +
    @@ -2196,33 +2257,34 @@ Lexical category, constructors given in - + - + - + - + - +
    Function Type
    mkPhr (PConj) -> Utt -> (Voc) -> Phr
    but sleep , my friend
    but sleep , my friend
    mkPhr S -> Phr
    she won't sleep
    she won't sleep
    mkPhr Cl -> Phr
    she sleeps
    she sleeps
    mkPhr QS -> Phr
    would she sleep
    would she sleep
    mkPhr Imp -> Phr
    sleep
    sleep

    Pol - polarity

    - + +
    @@ -2231,18 +2293,19 @@ Lexical category, constructors given in - + - +
    Function Type
    negativePol Pol
    she doesn't sleep
    she doesn't sleep
    positivePol Pol
    she sleeps
    she sleeps

    Predet - predeterminer (prefixed Quant)

    - + +
    @@ -2251,28 +2314,29 @@ Lexical category, constructors given in - + - + - + - +
    Function Type
    all_Predet Predet
    all the men
    all the men
    most_Predet Predet
    most
    most
    not_Predet Predet
    not everybody
    not everybody
    only_Predet Predet
    only
    only

    Prep - preposition, or just case

    - + +
    @@ -2281,113 +2345,114 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    Function Type
    above_Prep Prep
    above it
    above it
    after_Prep Prep
    after it
    after it
    before_Prep Prep
    before it
    before it
    behind_Prep Prep
    behind it
    behind it
    between_Prep Prep
    between you and me
    between you and me
    by8agent_Prep Prep
    by it
    by it
    by8means_Prep Prep
    by it
    by it
    during_Prep Prep
    during it
    during it
    except_Prep Prep
    except it
    except it
    for_Prep Prep
    for it
    for it
    from_Prep Prep
    from it
    from it
    in8front_Prep Prep
    in front of it
    in front of it
    in_Prep Prep
    in it
    in it
    on_Prep Prep
    on it
    on it
    part_Prep Prep
    of it
    of it
    possess_Prep Prep
    of it
    of it
    through_Prep Prep
    through it
    through it
    to_Prep Prep
    to it
    to it
    under_Prep Prep
    under it
    under it
    with_Prep Prep
    with it
    with it
    without_Prep Prep
    without it
    without it

    Pron - personal pronoun

    - + +
    @@ -2396,53 +2461,54 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - +
    Function Type
    he_Pron Pron
    he
    he
    i_Pron Pron
    I
    I
    it_Pron Pron
    it
    it
    she_Pron Pron
    she
    she
    they_Pron Pron
    they
    they
    we_Pron Pron
    we
    we
    youPl_Pron Pron
    you
    you
    youPol_Pron Pron
    you
    you
    youSg_Pron Pron
    you
    you

    Punct

    - + +
    @@ -2451,23 +2517,24 @@ Lexical category, constructors given in - + - + - +
    Function Type
    exclMarkPunct Punct
    yes !
    yes !
    fullStopPunct Punct
    yes .
    yes .
    questMarkPunct Punct
    yes ?
    yes ?

    QCl - question clause, with all tenses

    - + +
    @@ -2476,158 +2543,159 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    Function Type
    mkQCl Cl -> QCl
    does she sleep
    does she sleep
    mkQCl IP -> VP -> QCl
    who always sleeps
    who always sleeps
    mkQCl IP -> V -> QCl
    who sleeps
    who sleeps
    mkQCl IP -> V2 -> NP -> QCl
    who loves her
    who loves her
    mkQCl IP -> V3 -> NP -> NP -> QCl
    who sends it to her
    who sends it to her
    mkQCl IP -> VV -> VP -> QCl
    who wants to sleep
    who wants to sleep
    mkQCl IP -> VS -> S -> QCl
    who says that I sleep
    who says that I sleep
    mkQCl IP -> VQ -> QS -> QCl
    who wonders who sleeps
    who wonders who sleeps
    mkQCl IP -> VA -> A -> QCl
    who becomes old
    who becomes old
    mkQCl IP -> VA -> AP -> QCl
    who becomes very old
    who becomes very old
    mkQCl IP -> V2A -> NP -> A -> QCl
    who paints it red
    who paints it red
    mkQCl IP -> V2A -> NP -> AP -> QCl
    who paints it very red
    who paints it very red
    mkQCl IP -> V2S -> NP -> S -> QCl
    who answers to him that we sleep
    who answers to him that we sleep
    mkQCl IP -> V2Q -> NP -> QS -> QCl
    who asks him who sleeps
    who asks him who sleeps
    mkQCl IP -> V2V -> NP -> VP -> QCl
    who begs him to sleep
    who begs him to sleep
    mkQCl IP -> A -> QCl
    who is old
    who is old
    mkQCl IP -> A -> NP -> QCl
    who is older than he
    who is older than he
    mkQCl IP -> A2 -> NP -> QCl
    who is married to him
    who is married to him
    mkQCl IP -> AP -> QCl
    who is very old
    who is very old
    mkQCl IP -> NP -> QCl
    who is the woman
    who is the woman
    mkQCl IP -> N -> QCl
    who is a woman
    who is a woman
    mkQCl IP -> CN -> QCl
    who is an old woman
    who is an old woman
    mkQCl IP -> Adv -> QCl
    who is here
    who is here
    mkQCl IP -> NP -> V2 -> QCl
    who is her
    who is her
    mkQCl IP -> ClSlash -> QCl
    whom does she love today
    whom does she love today
    mkQCl IAdv -> Cl -> QCl
    why does she sleep
    why does she sleep
    mkQCl Prep -> IP -> Cl -> QCl
    with whom does she sleep
    with whom does she sleep
    mkQCl IAdv -> NP -> QCl
    where is she
    where is she
    mkQCl IComp -> NP -> QCl
    who is this man
    who is this man
    mkQCl IP -> QCl
    which city is there
    which city is there

    QS - question

    - + +
    @@ -2636,18 +2704,19 @@ Lexical category, constructors given in - + - +
    Function Type
    mkQS (Tense) -> (Ant) -> (Pol) -> QCl -> QS
    who wouldn't have slept
    who wouldn't have slept
    mkQS Cl -> QS
    does she sleep
    does she sleep

    Quant - quantifier ('nucleus' of Det)

    - + +
    @@ -2656,38 +2725,39 @@ Lexical category, constructors given in - + - + - + - + - + - +
    Function Type
    a_Quant Quant
    a house
    a house
    mkQuant Pron -> Quant
    my house
    my house
    no_Quant Quant
    no house
    no house
    that_Quant Quant
    that house
    that house
    the_Quant Quant
    the house
    the house
    this_Quant Quant
    this house
    this house

    RCl - relative clause, with all tenses

    - + +
    @@ -2696,122 +2766,122 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -2822,7 +2892,8 @@ Lexical category, constructors given in

    RP - relative pronoun

    -
    Function Type
    mkRCl RP -> VP -> RCl
    woman who always sleeps
    woman who always sleeps
    mkRCl RP -> V -> RCl
    woman who sleeps
    woman who sleeps
    mkRCl RP -> V2 -> NP -> RCl
    woman who loves him
    woman who loves him
    mkRCl RP -> V3 -> NP -> NP -> RCl
    woman who sends it to him
    woman who sends it to him
    mkRCl RP -> VV -> VP -> RCl
    woman who wants to sleep
    woman who wants to sleep
    mkRCl RP -> VS -> S -> RCl
    woman who says that I sleep
    woman who says that I sleep
    mkRCl RP -> VQ -> QS -> RCl
    woman who wonders who sleeps
    woman who wonders who sleeps
    mkRCl RP -> VA -> A -> RCl
    woman who becomes old
    woman who becomes old
    mkRCl RP -> VA -> AP -> RCl
    woman who becomes very old
    woman who becomes very old
    mkRCl RP -> V2A -> NP -> A -> RCl
    woman who paints it red
    woman who paints it red
    mkRCl RP -> V2A -> NP -> AP -> RCl
    woman who paints it very red
    woman who paints it very red
    mkRCl RP -> V2S -> NP -> S -> RCl
    woman who answers to him that we sleep
    woman who answers to him that we sleep
    mkRCl RP -> V2Q -> NP -> QS -> RCl
    woman who asks him who sleeps
    woman who asks him who sleeps
    mkRCl RP -> V2V -> NP -> VP -> RCl
    woman who begs him to sleep
    woman who begs him to sleep
    mkRCl RP -> A -> RCl
    woman who is old
    woman who is old
    mkRCl RP -> A -> NP -> RCl
    woman who is older than he
    woman who is older than he
    mkRCl RP -> A2 -> NP -> RCl
    woman who is married to him
    woman who is married to him
    mkRCl RP -> AP -> RCl
    woman who is very old
    woman who is very old
    mkRCl RP -> NP -> RCl
    woman who is the woman
    woman who is the woman
    mkRCl RP -> N -> RCl
    student who is a woman
    student who is a woman
    mkRCl RP -> CN -> RCl
    student who is an old woman
    student who is an old woman
    mkRCl RP -> Adv -> RCl
    woman who is here
    woman who is here
    mkRCl RP -> NP -> V2 -> RCl
    woman whom we love
    woman whom we love
    mkRCl RP -> ClSlash -> RCl
    woman whom she loves today
    woman whom she loves today
    mkRCl
    + +
    @@ -2831,7 +2902,7 @@ Lexical category, constructors given in - + @@ -2842,7 +2913,8 @@ Lexical category, constructors given in

    RS - relative

    -
    Function Type
    mkRP Prep -> NP -> RP -> RP
    all the cities in whom
    all the cities in whom
    which_RP
    + +
    @@ -2851,7 +2923,7 @@ Lexical category, constructors given in - + @@ -2861,7 +2933,7 @@ Lexical category, constructors given in - + @@ -2872,7 +2944,8 @@ Lexical category, constructors given in

    S - declarative sentence

    -
    Function Type
    mkRS (Tense) -> (Ant) -> (Pol) -> RCl -> RS
    woman who wouldn't have slept
    woman who wouldn't have slept
    mkRS
    mkRS Conj -> RS -> RS -> RS
    woman who sleeps or whom we love
    woman who sleeps or whom we love
    mkRS
    + +
    @@ -2881,7 +2954,7 @@ Lexical category, constructors given in - + @@ -2891,23 +2964,24 @@ Lexical category, constructors given in - + - + - +
    Function Type
    mkS (Tense) -> (Ant) -> (Pol) -> Cl -> S
    she wouldn't have slept
    she wouldn't have slept
    mkS
    mkS Conj -> S -> S -> S
    she sleeps and I run
    she sleeps and I run
    mkS Conj -> ListS -> S
    she sleeps , I run and you walk
    she sleeps , I run and you walk
    mkS Adv -> S -> S
    today , she sleeps
    today , she sleeps

    SC - embedded sentence or question

    - + +
    @@ -2916,23 +2990,24 @@ Lexical category, constructors given in - + - + - +
    Function Type
    mkSC S -> SC
    that she sleeps
    that she sleeps
    mkSC QS -> SC
    who sleeps
    who sleeps
    mkSC VP -> SC
    to sleep
    to sleep

    SSlash

    - + +
    @@ -2941,13 +3016,14 @@ Lexical category, constructors given in - +
    Function Type
    mkSSlash Temp -> Pol -> ClSlash -> SSlash
    she hadn't seen
    she hadn't seen

    Sub100

    - + +
    @@ -2956,23 +3032,24 @@ Lexical category, constructors given in - + - + - +
    Function Type
    mkSub100 Unit -> Sub100
    eight
    eight
    mkSub100 Unit -> Unit -> Sub100
    eighty - three
    eighty - three
    tenfoldSub100 Unit -> Sub100
    eight
    eight

    Sub1000

    - + +
    @@ -2981,23 +3058,24 @@ Lexical category, constructors given in - + - + - +
    Function Type
    mkSub1000 Sub100 -> Sub1000
    ninety - nine
    ninety - nine
    mkSub1000 Unit -> Sub1000
    nine hundred
    nine hundred
    mkSub1000 Unit -> Sub100 -> Sub1000
    nine hundred and ninety - nine
    nine hundred and ninety - nine

    Subj - subjunction

    - + +
    @@ -3006,33 +3084,34 @@ Lexical category, constructors given in - + - + - + - + - +
    Function Type
    although_Subj Subj
    although she sleeps
    although she sleeps
    because_Subj Subj
    because she sleeps
    because she sleeps
    if_Subj Subj
    if she sleeps
    if she sleeps
    that_Subj Subj
    that she sleeps
    that she sleeps
    when_Subj Subj
    when she sleeps
    when she sleeps

    Temp - temporal and aspectual features

    - + +
    @@ -3047,7 +3126,8 @@ Lexical category, constructors given in

    Tense - tense

    -
    Function Type
    + +
    @@ -3056,28 +3136,29 @@ Lexical category, constructors given in - + - + - + - +
    Function Type
    conditionalTense Tense
    she would sleep
    she would sleep
    futureTense Tense
    she will sleep
    she will sleep
    pastTense Tense
    she slept
    she slept
    presentTense Tense
    she sleeps
    she sleeps

    Text - text consisting of several phrases

    - + +
    @@ -3091,43 +3172,44 @@ Lexical category, constructors given in - + - + - + - + - + - + - +
    Function Type
    mkText Phr -> (Punct) -> (Text) -> Text
    does she sleep ? yes .
    does she sleep ? yes .
    mkText Utt -> Text
    yes .
    yes .
    mkText S -> Text
    she slept .
    she slept .
    mkText Cl -> Text
    she sleeps .
    she sleeps .
    mkText QS -> Text
    did she sleep ?
    did she sleep ?
    mkText (Pol) -> Imp -> Text
    don't sleep !
    don't sleep !
    mkText Text -> Text -> Text
    where ? here . when ? now !
    where ? here . when ? now !

    Unit

    - + +
    @@ -3136,53 +3218,54 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - +
    Function Type
    n1_Unit Unit
    one
    one
    n2_Unit Unit
    two
    two
    n3_Unit Unit
    three
    three
    n4_Unit Unit
    four
    four
    n5_Unit Unit
    five
    five
    n6_Unit Unit
    six
    six
    n7_Unit Unit
    seven
    seven
    n8_Unit Unit
    eight
    eight
    n9_Unit Unit
    nine
    nine

    Utt - sentence, question, word...

    - + +
    @@ -3191,94 +3274,97 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    Function Type
    lets_Utt VP -> Utt
    let's sleep
    let's sleep
    mkUtt S -> Utt
    she slept
    she slept
    mkUtt Cl -> Utt
    she sleeps
    she sleeps
    mkUtt QS -> Utt
    who didn't sleep
    who didn't sleep
    mkUtt QCl -> Utt
    who sleeps
    who sleeps
    mkUtt (ImpForm) -> (Pol) -> Imp -> Utt
    don't be men
    don't be men
    mkUtt IP -> Utt
    who
    who
    mkUtt IAdv -> Utt
    why
    why
    mkUtt NP -> Utt
    this man
    this man
    mkUtt Adv -> Utt
    here
    here
    mkUtt VP -> Utt
    to sleep
    to sleep
    mkUtt CN -> Utt
    beer
    beer
    mkUtt AP -> Utt
    good
    good
    mkUtt Card -> Utt
    five
    five
    no_Utt Utt
    no
    no
    yes_Utt Utt
    yes
    yes

    V - one-place verb

    +

    Lexical category, constructors given in lexical paradigms.

    +

    V2 - two-place verb

    - + +
    @@ -3287,49 +3373,62 @@ Lexical category, constructors given in - +
    Function Type
    have_V2 V2
    to have it
    to have it

    V2A - verb with NP and AP complement

    +

    Lexical category, constructors given in lexical paradigms.

    +

    V2Q - verb with NP and Q complement

    +

    Lexical category, constructors given in lexical paradigms.

    +

    V2S - verb with NP and S complement

    +

    Lexical category, constructors given in lexical paradigms.

    +

    V2V - verb with NP and V complement

    +

    Lexical category, constructors given in lexical paradigms.

    +

    V3 - three-place verb

    +

    Lexical category, constructors given in lexical paradigms.

    +

    VA - adjective-complement verb

    +

    Lexical category, constructors given in lexical paradigms.

    +

    VP - verb phrase

    - + +
    @@ -3338,142 +3437,142 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -3484,7 +3583,8 @@ Lexical category, constructors given in

    VPSlash - verb phrase missing complement

    -
    Function Type
    mkVP V -> VP
    to sleep
    to sleep
    mkVP V2 -> NP -> VP
    to love him
    to love him
    mkVP V3 -> NP -> NP -> VP
    to send it to him
    to send it to him
    mkVP VV -> VP -> VP
    to want to sleep
    to want to sleep
    mkVP VS -> S -> VP
    to know that she sleeps
    to know that she sleeps
    mkVP VQ -> QS -> VP
    to wonder who sleeps
    to wonder who sleeps
    mkVP VA -> AP -> VP
    to become red
    to become red
    mkVP V2A -> NP -> AP -> VP
    to paint it red
    to paint it red
    mkVP V2S -> NP -> S -> VP
    to answer to him that she sleeps
    to answer to him that she sleeps
    mkVP V2Q -> NP -> QS -> VP
    to ask him who sleeps
    to ask him who sleeps
    mkVP V2V -> NP -> VP -> VP
    to beg him to sleep
    to beg him to sleep
    mkVP A -> VP
    to be old
    to be old
    mkVP A -> NP -> VP
    to be older than he
    to be older than he
    mkVP A2 -> NP -> VP
    to be married to him
    to be married to him
    mkVP AP -> VP
    to be very old
    to be very old
    mkVP N -> VP
    to be a woman
    to be a woman
    mkVP CN -> VP
    to be an old woman
    to be an old woman
    mkVP NP -> VP
    to be the woman
    to be the woman
    mkVP Adv -> VP
    to be here
    to be here
    mkVP VP -> Adv -> VP
    to sleep here
    to sleep here
    mkVP AdV -> VP -> VP
    always to sleep
    always to sleep
    mkVP VPSlash -> NP -> VP
    to paint it black
    to paint it black
    mkVP VPSlash -> VP
    to paint itself black
    to paint itself black
    mkVP Comp -> VP
    to be warm
    to be warm
    passiveVP V2 -> VP
    to be loved
    to be loved
    passiveVP V2 -> NP -> VP
    to be loved by her
    to be loved by her
    progressiveVP VP -> VP
    to be sleeping
    to be sleeping
    reflexiveVP V2 -> VP
    to love itself
    to love itself
    reflexiveVP
    + +
    @@ -3493,60 +3593,65 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - +
    Function Type
    mkVPSlash V2 -> VPSlash
    whom does she see
    whom does she see
    mkVPSlash V3 -> NP -> VPSlash
    to whom does she send it
    to whom does she send it
    mkVPSlash V2A -> AP -> VPSlash
    whom does she paint red
    whom does she paint red
    mkVPSlash V2Q -> QS -> VPSlash
    atomic term where_Idv
    atomic term where_Idv
    mkVPSlash V2S -> S -> VPSlash
    to whom does she answer that I sleep
    to whom does she answer that I sleep
    mkVPSlash V2V -> VP -> VPSlash
    whom does she beg to sleep
    whom does she beg to sleep
    mkVPSlash VV -> VPSlash -> VPSlash
    whom does she want to see
    whom does she want to see
    mkVPSlash V2V -> NP -> VPSlash -> VPSlash
    whom does she beg me to see
    whom does she beg me to see

    VQ - question-complement verb

    +

    Lexical category, constructors given in lexical paradigms.

    +

    VS - sentence-complement verb

    +

    Lexical category, constructors given in lexical paradigms.

    +

    VV - verb-phrase-complement verb

    - + +
    @@ -3555,28 +3660,29 @@ Lexical category, constructors given in - + - + - + - +
    Function Type
    can8know_VV VV
    to be able to sleep
    to be able to sleep
    can_VV VV
    to be able to sleep
    to be able to sleep
    must_VV VV
    have to
    have to
    want_VV VV
    want
    want

    Voc - vocative or "please"

    - + +
    @@ -3585,26 +3691,232 @@ Lexical category, constructors given in - + - +
    Function Type
    mkVoc NP -> Voc
    yes , my friend
    yes , my friend
    please_Voc Voc
    please
    please

    Lexical Paradigms

    + +

    Paradigms for Afrikaans

    + +

    + +

    +

    +source ../src/afrikaans/ParadigmsAfr.gf +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FunctionTypeExplanation
    deGendernon-neutrum
    hetGenderneutrum
    --dieGender-
    mkN(muis : Str) -> Nde muis-muisen, with some predictable exceptions
    mkN(bit : Str) -> Gender -> Nif gender is not predictable
    mkN(gat,gaten : Str) -> Gender -> Nworst-case for nouns
    mkN2N -> N2relational noun with preposition van
    mkN2N -> Prep -> N2other preposition than van
    mkN3N -> Prep -> Prep -> N3e.g. afstand + van + naar
    mkPNStr -> PNproper name
    mkA(vers : Str) -> Aregular adjective
    mkA(sag, sagte : Str) -> A --"semi-irregular"-
    mkA(goed,goede,goeds,beter,best : Str) -> Airregular adjective
    invarAStr -> Aadjective with just one form
    mkA2A -> Prep -> A2e.g. getrouwd + met
    mkAdvStr -> Adv-
    mkPrepStr -> Prep-
    van_PrepPrep-
    te_PrepPrep-
    mkV(aaien : Str) -> Vregular verb
    mkV(breken,brak,gebroken : Str) -> Vtheme of irregular verb
    mkV(breken,brak,braken,gebroken : Str) -> Valso past plural irregular
    mkV(aai,aait,aaien,aaide,aaide,aaiden,geaaid : Str) -> Vworst-case verb
    mkVStr -> V -> Vadd movable suffix, e.g. af + stappen
    zijnVV -> Vforce zijn as auxiliary (default hebben)
    reflVV -> Vreflexive verb e.g. zich afvragen
    mkV3V -> V3geven,(accusative),(dative)
    mkV3V -> Prep -> V3sturen,(accusative),naar
    mkV3V -> Prep -> Prep -> V3praten, met, over
    mkVSV -> VS-
    mkV2SV -> Prep -> V2S-
    mkVVV -> VV-
    mkV2VV -> Prep -> V2V-
    mkVAV -> VA-
    mkV2AV -> Prep -> V2A-
    mkVQV -> VQ-
    mkV2QV -> Prep -> V2Q-
    + +

    Paradigms for Bulgarian

    +

    source ../src/bulgarian/ParadigmsBul.gf

    - + +
    @@ -4457,15 +4769,17 @@ source +

    Paradigms for Catalan

    +

    source ../src/catalan/ParadigmsCat.gf

    -
    Function Type
    + +
    @@ -4708,15 +5022,17 @@ source +

    Paradigms for Danish

    +

    source ../src/danish/ParadigmsDan.gf

    -
    Function Type
    + +
    @@ -4934,15 +5250,17 @@ source +

    Paradigms for Dutch

    +

    source ../src/dutch/ParadigmsDut.gf

    -
    Function Type
    + +
    @@ -5125,15 +5443,17 @@ source +

    Paradigms for English

    +

    source ../src/english/ParadigmsEng.gf

    -
    Function Type
    + +
    @@ -5391,15 +5711,17 @@ source +

    Paradigms for Finnish

    +

    source ../src/finnish/ParadigmsFin.gf

    -
    Function Type
    + +
    @@ -5752,15 +6074,17 @@ source +

    Paradigms for French

    +

    source ../src/french/ParadigmsFre.gf

    -
    Function Type
    + +
    @@ -5983,15 +6307,17 @@ source +

    Paradigms for German

    +

    source ../src/german/ParadigmsGer.gf

    -
    Function Type
    + +
    @@ -6294,15 +6620,17 @@ source +

    Paradigms for Italian

    +

    source ../src/italian/ParadigmsIta.gf

    -
    Function Type
    + +
    @@ -6575,15 +6903,17 @@ source +

    Paradigms for Norwegian

    +

    source ../src/norwegian/ParadigmsNor.gf

    -
    Function Type
    + +
    @@ -6826,15 +7156,17 @@ source +

    Paradigms for Polish

    +

    source ../src/polish/ParadigmsPol.gf

    -
    Function Type
    + +
    @@ -7437,15 +7769,230 @@ source + +

    Paradigms for Punjabi

    + +

    + +

    +

    +source ../src/punjabi/ParadigmsPnb.gf +

    + +
    Function Type
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FunctionTypeExplanation
    masculineGender-
    feminineGender-
    singularNumber;-
    pluralNumber;-
    mkN2N -> Prep -> Str -> N2;-
    mkN3N -> Prep -> Str -> Str-> N3-
    mkCmpdNounStr -> N -> N-
    mkPNStr -> PN =-
    mkPNStr -> Gender -> PN =-
    personalPNStr -> Str -> Str -> Str -> Str -> Number -> Gender -> PPerson -> Pron =-
    demoPNStr -> Str -> Str -> Quant =-
    mkDetStr -> Str -> Str -> Str -> Number -> Det =-
    mkIP(x1,x2,x3,x4:Str) -> Number -> Gender -> IP =-
    mkAdNStr -> AdN = \s -> ss s-
    mkAStr-> A-
    mkAStr -> Str -> A2-
    mkVStr -> V-
    mkV2Str -> V2-
    mkV2V -> V2-
    mkV2V -> Str -> V2-
    mkV3V -> Str -> Str -> V3;-
    mkV2VV -> Str -> Str -> Bool -> V2V-
    compoundVStr -> V -> V = \s,v -> {s = \\vf => s ++ v.s ! vf lock_V = <>}-
    compoundVStr -> V2 -> V = \s,v -> {s = \\vf => s ++ v.s ! vf lock_V = <>}-
    mkAdvStr -> Adv = \str -> {s =\\ _ => str lock_Adv = <>};-
    mkPrepStr -> Prep-
    mkQuant1Pron -> Quant-
    mkIQuantStr -> Str -> Str -> Str -> IQuant-
    mkQuant1Pron -> Quant = \p -> {s = \\_,_,c => p.s!c ;a = p.a lock_Quant = <>};-
    mkConjStr -> Conjand (plural agreement)
    mkConjStr -> Number -> Conjor (agrement number given as argument)
    mkConjStr -> Str -> Conjboth ... and (plural)
    mkConjStr -> Str -> Number -> Conjeither ... or (agrement number given as argument)
    mkConjStr -> Conj = \y -> mk2Conj [] y plural-
    mkConjStr -> Number -> Conj = \y,n -> mk2Conj [] y n-
    mkConjStr -> Str -> Conj = \x,y -> mk2Conj x y plural-
    mkConjStr -> Str -> Number -> Conj = mk2Conj-
    mk2ConjStr -> Str -> Number -> Conj = \x,y,n ->-
    mkVVV -> VV = \v -> lin VV (v ** {isAux = False});-
    + +

    Paradigms for Romanian

    +

    source ../src/romanian/ParadigmsRon.gf

    - + +
    @@ -7688,15 +8235,17 @@ source +

    Paradigms for Russian

    +

    source ../src/russian/ParadigmsRus.gf

    -
    Function Type
    + +
    @@ -7859,15 +8408,17 @@ source +

    Paradigms for Spanish

    +

    source ../src/spanish/ParadigmsSpa.gf

    -
    Function Type
    + +
    @@ -8120,15 +8671,17 @@ source +

    Paradigms for Swedish

    +

    source ../src/swedish/ParadigmsSwe.gf

    -
    Function Type
    + +
    @@ -8361,15 +8914,17 @@ source +

    Paradigms for Urdu

    +

    source ../src/urdu/ParadigmsUrd.gf

    -
    Function Type
    + +
    @@ -8567,41 +9122,463 @@ source + +

    Additional Libraries

    + + +

    The Prelude module

    + +

    +The Prelude defines commonly used utility functions, in particular for +strings and booleans. +

    + +
    Function Type
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    OperTypeExplanation
    SSTypethe type {s : Str}
    ssStr -> SSrecord from string
    nonExistStrmissing form
    optStrStr -> Stroptional string
    bothWays(x,y : Str) -> Streither x ++ y or y ++ x
    BoolPTypevalues True and False
    andB(_,_ : Bool) -> Boolconjunction
    orB(_,_ : Bool) -> Booldisjunction
    notBBool -> Boolnegation
    if_then_else(A:Type)->Bool->A->A->Aconditional
    initStr -> Strdrop last character
    lastStr -> Strreturn last character
    glueStr -> Str -> Strglue tokens together
    + + +

    The Predefined module

    + +

    +These functions are hard-coded in GF. They are available without explicit opening, by the used of qualified names, e.g. Predef.tk. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    operationtypeexplanation
    PBoolPTypePTrue | PFalse
    ErrorTypethe empty type
    IntegerTypethe type of integers
    IntsInteger -> Typeintegers from 0 to n
    errorStr -> Errorforms error message
    lengthStr -> Intlength of string
    dropInteger -> Str -> Strdrop prefix of length
    takeInteger -> Str -> Strtake prefix of length
    tkInteger -> Str -> Strdrop suffix of length
    dpInteger -> Str -> Strtake suffix of length
    eqIntInteger -> Integer -> PBooltest if equal integers
    lessIntInteger -> Integer -> PBooltest order of integers
    plusInteger -> Integer -> Integeradd integers
    eqStrStr -> Str -> PBooltest if equal strings
    occurStr -> Str -> PBooltest if occurs as substring
    occursStr -> Str -> PBooltest if any char occurs
    show(P : Type) -> P -> Strconvert param to string
    toStr(L : Type) -> L -> Strfind the "first" string
    + + +

    The Formal module

    + +

    +This module is used for defining formal languages, in particular ones that +use precedence levels and parentheses for grouping subexpressions. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    OperTypeExplanation
    PrecPTypeprecedence levels 0..4
    TermPrecTypestring with precedence
    mkPrecPrec -> Str -> TermPrecconstruct a TermPrec
    topTermPrec -> Strtop term (lowest prec.)
    constantStr -> TermPrecatomic (highest prec.)
    infixlPrec->Str->(_,_:TermPrec)->TermPrecleft-assoc. infix
    infixrPrec->Str->(_,_:TermPrec)->TermPrecright-assoc. infix
    infixnPrec->Str->(_,_:TermPrec)->TermPrecnon-assoc. infix
    usePrecPrec -> TermPrec -> Struse term on given level
    + + +

    The Symbolic module

    + +

    +This module is used for embedding symbolic notation in natural-language +text constructed by the resource grammar API. It works for all resource +languages. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FunctionTypeExample
    symbStr -> NPx
    symbInt -> NP23
    symbFloat -> NP0.99
    symbCN -> Numeral -> NPlevel four
    symbDet -> N+ -> Numeral -> NPthe level four
    symbDet -> CN -> [Symb] -> NPthe levels i, j and k
    symbSymb -> SA (formula)
    symbSymb -> Cardn (number)
    mkSymbStr -> Symbx
    + + +

    The Combinators module

    + +

    +This module gives shortcuts for defining predicates (pred) and function +expressions (app). It works for all resource languages. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FunctionTypeExample
    predV -> NP -> Clx converges
    predV2 -> NP -> NP -> Clx intersects y
    predV -> NP -> NP -> Clx and y intersect
    predA -> NP -> Clx is even
    predA2 -> NP -> NP -> Clx is divisible by y
    predA -> NP -> NP -> Clx and y are equal
    predN -> NP -> Clx is a maximum
    predN -> NP -> NP -> Clx and y are inverses
    predAdv -> NP -> Clx is in scope
    predPrep -> NP -> NP -> Clx is outside y
    appN -> NPthe bottom
    appN2 -> NP -> NPthe successor of x
    appN3 -> NP -> NP -> NPthe distance from x to y
    appN2 -> NP -> NP -> NPthe sum of x and y
    appN2 -> N -> CNset of integers
    appN2 -> NP -> CNdivisor of x
    appN3 -> NP -> NP -> CNpath from x to y
    appN2 -> NP -> NP -> CNpath between x and y
    + +

    Browsing the libraries with GF commands

    +

    New: Browsing by syntax editor directly on the web.

    -All of the following assume +All of the following assume that +GF_LIB_PATH points to the directory GF/lib with compiled libraries.

    -
    -    cd $GF_LIB_PATH
    -

    To try out inflection paradigms:

    +
    -    > i -path=alltenses -retain alltenses/ParadigmsGer.gfo
    +    > i -retain alltenses/ParadigmsGer.gfo
         > cc mkN "Farbe"
     
    +

    To try out overloaded syntax, test lexicon, and inflection paradigms:

    +
    -    > i -path=alltenses -retain alltenses/TryGer.gfo
    +    > i -retain alltenses/TryGer.gfo
         > cc mkCl (mkNP this_Quant (mkN "Farbe")) (mkA "dunkel")
     
    -

    - + +

    An Example of Usage

    +

    The standard way of building an application has the following modules.

    An abstract syntax:

    +
         abstract Music = {    
         cat 
    @@ -8613,9 +9590,11 @@ An abstract syntax:
           American : Property ;
         }
     
    +

    A domain lexicon interface:

    +
         interface LexMusic = open Cat in {
         oper
    @@ -8623,9 +9602,11 @@ A domain lexicon interface:
           american_A : A ;
         }
     
    +

    A functor on Syntax and the domain lexicon interface:

    +
         incomplete concrete MusicI of Music = open Syntax, MusicLex in {
         lincat 
    @@ -8637,9 +9618,11 @@ A functor on Syntax and the domain lexicon interface:
           American = mkAP american_A ;
         }
     
    +

    For each language, an instance of the domain lexicon:

    +
         instance LexMusicGer of LexMusic = CatGer ** open ParadigmsGer in {    
         oper
    @@ -8647,9 +9630,11 @@ For each language, an instance of the domain lexicon:
           american_A = mkA "amerikanisch" ;
         }
     
    +

    For each language, an instantiation of the functor:

    +
         --# -path=.:present:prelude
       
    @@ -8657,9 +9642,11 @@ For each language, an instantiation of the functor:
           (Syntax = SyntaxGer),
           (LexMusic = LexMusicGer) ;
     
    -

    - + +

    Table of Contents

    + +
  • Lexical Paradigms -
  • Browsing the libraries with GF commands -
  • An Example of Usage -
  • Table of Contents +
  • Additional Libraries + +
  • Browsing the libraries with GF commands +
  • An Example of Usage +
  • Table of Contents
-

- - +