diff --git a/lib/resource-1.0/doc/MkSynopsis.hs b/lib/resource-1.0/doc/MkSynopsis.hs index 945770eb1..be57e852b 100644 --- a/lib/resource-1.0/doc/MkSynopsis.hs +++ b/lib/resource-1.0/doc/MkSynopsis.hs @@ -119,10 +119,9 @@ inChunks i f = concat . intersperse ["\n\n"] . map f . chunks i where -- Makes one table per result category. -- Adds a subsection header for each table. mkSplitTables :: Bool -> Bool -> Cats -> Rules -> [String] -mkSplitTables hasEx isLatex cs rs = concatMap t (sortRules rs) - where t xs = [subtitle c expl] ++ mkTable hasEx isLatex cs xs - where c = resultCat (head xs) - expl = case [e | (n,e,_) <- cs, n == c] of +mkSplitTables hasEx isLatex cs = concatMap t . addLexicalCats cs . sortRules + where t (c, xs) = [subtitle c expl] ++ mkTable hasEx isLatex cs xs + where expl = case [e | (n,e,_) <- cs, n == c] of [] -> "" e:_ -> e @@ -191,6 +190,11 @@ sortRules = groupBy sameCat . sortBy compareRules compareRules r1@(n1,_,_) r2@(n2,_,_) = compare (resultCat r1,n1) (resultCat r2,n2) +addLexicalCats :: Cats -> [Rules] -> [(String,Rules)] +addLexicalCats cs rss = + sortBy (\x y -> compare (fst x) (fst y)) $ + [ (resultCat r, rs) | rs@(r:_) <- rss] ++ [(n,[]) | (n,_,_) <- cs] + resultCat :: (String,String,String) -> String resultCat (_,t,_) = last (words t) diff --git a/lib/resource-1.0/doc/synopsis.html b/lib/resource-1.0/doc/synopsis.html index 6395bd1f8..df484bfc6 100644 --- a/lib/resource-1.0/doc/synopsis.html +++ b/lib/resource-1.0/doc/synopsis.html @@ -20,58 +20,114 @@
  • Syntax Rules -
  • Structural Words -
  • Paradigms for Danish -
  • Paradigms for English -
  • Paradigms for Finnish -
  • Paradigms for French -
  • Paradigms for German -
  • Paradigms for Italian -
  • Paradigms for Norwegian -
  • Paradigms for Russian -
  • Paradigms for Spanish -
  • Paradigms for Swedish -
  • Browsing the libraries with GF commands -
  • An Example of Usage +
  • Structural Words +
  • Paradigms for Danish +
  • Paradigms for English +
  • Paradigms for Finnish +
  • Paradigms for French +
  • Paradigms for German +
  • Paradigms for Italian +
  • Paradigms for Norwegian +
  • Paradigms for Russian +
  • Paradigms for Spanish +
  • Paradigms for Swedish +
  • Browsing the libraries with GF commands +
  • An Example of Usage

    @@ -421,6 +477,10 @@ also in the Paradigms modules.

    Source: http://www.cs.chalmers.se/~aarne/GF/lib/resource/api/Constructors.gf

    + +

    A - one-place adjective

    + +

    A2 - two-place adjective

    AP - adjectival phrase

    @@ -496,6 +556,10 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    AP - adjectival phrase

    + +

    AdA - adjective-modifying adverb

    AdN - numeral-modifying adverb

    @@ -511,6 +575,10 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    AdN - numeral-modifying adverb

    + +

    AdV - adverb directly attached to verb

    Adv - verb-phrase-modifying adverb

    @@ -571,6 +639,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    Adv - verb-phrase-modifying adverb

    Ant - anteriority

    @@ -591,6 +661,10 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    Ant - anteriority

    + +

    CAdv - comparative adverb

    CN - common noun (without determiner)

    @@ -691,6 +765,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    CN - common noun (without determiner)

    Cl - declarative clause, with all tenses

    @@ -826,6 +902,14 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    Cl - declarative clause, with all tenses

    + +

    Comp - complement of copula, such as AP

    + +

    Conj - conjunction,

    + +

    DConj - distributed conjunction

    Det - determiner phrase

    @@ -906,6 +990,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    Det - determiner phrase

    IAdv - interrogative adverb

    @@ -921,6 +1007,12 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    IAdv - interrogative adverb

    + +

    IComp - interrogative complement of copula

    + +

    IDet - interrogative determiner

    IP - interrogative pronoun

    @@ -946,6 +1038,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    IP - interrogative pronoun

    Imp - imperative

    @@ -971,6 +1065,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    Imp - imperative

    ImpForm

    @@ -1076,6 +1172,12 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    N - common noun

    + +

    N2 - relational noun

    + +

    N3 - three-place relational noun

    NP - noun phrase (subject or object)

    @@ -1201,6 +1303,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    NP - noun phrase (subject or object)

    Num - cardinal number (used with QuantPl)

    @@ -1226,6 +1330,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    Num - cardinal number (used with QuantPl)

    Numeral

    @@ -1326,6 +1432,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    Ord - ordinal number (used in Det)

    PConj - phrase-beginning conjunction

    @@ -1341,6 +1449,10 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    PConj - phrase-beginning conjunction

    + +

    PN - proper name

    Phr - phrase in a text

    @@ -1381,6 +1493,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    Phr - phrase in a text

    Pol - polarity

    @@ -1401,6 +1515,14 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    Pol - polarity

    + +

    Predet - predeterminer (prefixed Quant)

    + +

    Prep - preposition, or just case

    + +

    Pron - personal pronoun

    Punct

    @@ -1476,6 +1598,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    QCl - question clause, with all tenses

    QS - question

    @@ -1501,6 +1625,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    QS - question

    Quant - quantifier with both sg and pl

    @@ -1521,6 +1647,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    Quant - quantifier with both sg and pl

    QuantPl

    @@ -1626,6 +1754,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    RCl - relative clause, with all tenses

    RP - relative pronoun

    @@ -1646,6 +1776,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    RP - relative pronoun

    RS - relative

    @@ -1666,6 +1798,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    RS - relative

    S - declarative sentence

    @@ -1711,6 +1845,10 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    S - declarative sentence

    + +

    SC - embedded sentence or question

    Slash - clause missing NP (S/NP in GPSG)

    @@ -1741,6 +1879,10 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    Slash - clause missing NP (S/NP in GPSG)

    + +

    Subj - subjunction,

    Tense - tense

    @@ -1771,6 +1913,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    Tense - tense

    Text - text consisting of several phrases

    @@ -1821,6 +1965,8 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    Text - text consisting of several phrases

    Utt - sentence, question, word...

    @@ -1886,6 +2032,18 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    Utt - sentence, question, word...

    + +

    V - one-place verb

    + +

    V2 - two-place verb

    + +

    V2A - verb with NP and AP complement

    + +

    V3 - three-place verb

    + +

    VA - adjective-complement verb

    VP - verb phrase

    @@ -2006,6 +2164,14 @@ Source: http://www.cs.chalmers.se/~aarne/
    + +

    VP - verb phrase

    + +

    VQ - question-complement verb

    + +

    VS - sentence-complement verb

    + +

    VV - verb-phrase-complement verb

    Voc - vocative or "please"

    @@ -2021,7 +2187,9 @@ Source: http://www.cs.chalmers.se/~aarne/
    - + +

    Voc - vocative or "please"

    +

    Structural Words

    Source: http://www.cs.chalmers.se/~aarne/GF/lib/resource/abstract/Structural.gf @@ -2417,7 +2585,7 @@ Source: http://www.cs.chalmers.se/~aar - +

    Paradigms for Danish

    source http://www.cs.chalmers.se/~aarne/GF/lib/resource/danish/ParadigmsDan.gf @@ -2661,7 +2829,7 @@ source http://www.cs.chalmers.se/~aarn - +

    Paradigms for English

    source http://www.cs.chalmers.se/~aarne/GF/lib/resource/english/ParadigmsEng.gf @@ -2889,7 +3057,7 @@ source http://www.cs.chalmers.se/~aar - +

    Paradigms for Finnish

    source http://www.cs.chalmers.se/~aarne/GF/lib/resource/finnish/ParadigmsFin.gf @@ -3225,7 +3393,7 @@ source http://www.cs.chalmers.se/~aar - +

    Paradigms for French

    source http://www.cs.chalmers.se/~aarne/GF/lib/resource/french/ParadigmsFre.gf @@ -3453,7 +3621,7 @@ source http://www.cs.chalmers.se/~aarn - +

    Paradigms for German

    source http://www.cs.chalmers.se/~aarne/GF/lib/resource/german/ParadigmsGer.gf @@ -3705,7 +3873,7 @@ source http://www.cs.chalmers.se/~aarn - +

    Paradigms for Italian

    source http://www.cs.chalmers.se/~aarne/GF/lib/resource/italian/ParadigmsIta.gf @@ -3937,7 +4105,7 @@ source http://www.cs.chalmers.se/~aar - +

    Paradigms for Norwegian

    source http://www.cs.chalmers.se/~aarne/GF/lib/resource/norwegian/ParadigmsNor.gf @@ -4181,7 +4349,7 @@ source http://www.cs.chalmers.se/~a - +

    Paradigms for Russian

    source http://www.cs.chalmers.se/~aarne/GF/lib/resource/russian/ParadigmsRus.gf @@ -4421,7 +4589,7 @@ source http://www.cs.chalmers.se/~aar - +

    Paradigms for Spanish

    source http://www.cs.chalmers.se/~aarne/GF/lib/resource/spanish/ParadigmsSpa.gf @@ -4653,7 +4821,7 @@ source http://www.cs.chalmers.se/~aar - +

    Paradigms for Swedish

    source http://www.cs.chalmers.se/~aarne/GF/lib/resource/swedish/ParadigmsSwe.gf @@ -4893,7 +5061,7 @@ source http://www.cs.chalmers.se/~aar - +

    Browsing the libraries with GF commands

    All of the following assume @@ -4930,7 +5098,7 @@ To view linearizations in all languages by parsing from English: > p -cat=S -lang=LangEng "this grammar is too big" | tb

    - +

    An Example of Usage

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