From fe49c9f1bf7251e44199ff2e71e6ca05367ea7ec Mon Sep 17 00:00:00 2001 From: bringert Date: Mon, 5 Nov 2007 10:48:58 +0000 Subject: [PATCH] Added anchors to category constructors in synopsis, and links form the explanations table. The categories in function types should also be links, but that is a bit difficult with the current MkSynopsis implementation which inspects the generated txt2tags code to make the section headr for each category. --- lib/resource-1.0/doc/MkSynopsis.hs | 5 +- lib/resource-1.0/doc/synopsis.html | 319 ++++++++++++----------------- 2 files changed, 137 insertions(+), 187 deletions(-) diff --git a/lib/resource-1.0/doc/MkSynopsis.hs b/lib/resource-1.0/doc/MkSynopsis.hs index f6b7a1c0b..6535a8a8f 100644 --- a/lib/resource-1.0/doc/MkSynopsis.hs +++ b/lib/resource-1.0/doc/MkSynopsis.hs @@ -127,7 +127,7 @@ mkCatTable isBeg rs = (if isBeg then ("|| Category | Explanation | Example ||" :) else id) (map mk1 rs) where - mk1 (name,typ,ex) = unwords ["|", ttf name, "|", typ, "|", typo ex, "|"] + mk1 (name,typ,ex) = unwords ["|", showCat name, "|", typ, "|", typo ex, "|"] typo ex = if take 1 ex == "\"" then itf (init (tail ex)) else ex synopsis = "synopsis.txt" @@ -197,5 +197,6 @@ sortVal = sortBy (\t u -> compare (hd t) (hd u)) where printBack hd tb = unlines $ subtitle (valRow (head tb)) : "\n" : [hd] ++ tb -subtitle cat = "==" ++ cat ++ "==" +subtitle cat = "==" ++ cat ++ "==" ++ "[" ++ cat ++ "]" +showCat cat = "[" ++ cat ++ " #" ++ cat ++ "]" \ No newline at end of file diff --git a/lib/resource-1.0/doc/synopsis.html b/lib/resource-1.0/doc/synopsis.html index 1dfd7af9f..fe7dd94e9 100644 --- a/lib/resource-1.0/doc/synopsis.html +++ b/lib/resource-1.0/doc/synopsis.html @@ -20,44 +20,44 @@
  • Syntax Rules
  • Structural Words
  • Paradigms for Danish @@ -122,7 +122,6 @@ each category. -

    The rectangular boxes mark open lexical categories, which have constructors also in the Paradigms modules. @@ -136,294 +135,293 @@ also in the Paradigms modules. Example -A +A one-place adjective warm -A2 +A2 two-place adjective divisible -AP +AP adjectival phrase very warm -AdA +AdA adjective-modifying adverb, very -AdN +AdN numeral-modifying adverb, more than -AdV +AdV adverb directly attached to verb always -Adv +Adv verb-phrase-modifying adverb, in the house -Ant +Ant anteriority simultaneous, anterior -CAdv +CAdv comparative adverb more -CN +CN common noun (without determiner) red house -Cl +Cl declarative clause, with all tenses she looks at this -Comp +Comp complement of copula, such as AP very warm -Conj +Conj conjunction, and -DConj +DConj distributed conj. both - and -Det +Det determiner phrase those seven -IAdv +IAdv interrogative adverb why -IComp +IComp interrogative complement of copula where -IDet +IDet interrogative determiner which -IP +IP interrogative pronoun who -Imp +Imp imperative look at this -N +N common noun house -N2 +N2 relational noun son -N3 +N3 three-place relational noun connection -NP +NP noun phrase (subject or object) the red house -Num +Num cardinal number (used with QuantPl) seven -Ord +Ord ordinal number (used in Det) seventh -PConj +PConj phrase-beginning conj. therefore -PN +PN proper name Paris -Phr +Phr phrase in a text but be quiet please -Pol +Pol polarity positive, negative -Predet +Predet predeterminer (prefixed Quant) all -Prep +Prep preposition, or just case in -Pron +Pron personal pronoun she -QCl +QCl question clause, with all tenses why does she walk -QS +QS question where did she live -Quant +Quant quantifier with both sg and pl this/these -RCl +RCl relative clause, with all tenses in which she lives -RP +RP relative pronoun in which -RS +RS relative in which she lived -S +S declarative sentence she lived here -SC +SC embedded sentence or question that it rains -Slash +Slash clause missing NP (S/NP in GPSG) she looks at -Subj +Subj subjunction, if -Tense +Tense tense present, past, future -Text +Text text consisting of several phrases He is here. Why? -Utt +Utt sentence, question, word... be quiet -V +V one-place verb sleep -V2 +V2 two-place verb love -V2A +V2A verb with NP and AP complement paint -V3 +V3 three-place verb show -VA +VA adjective-complement verb look -VP +VP verb phrase is very warm -VQ +VQ question-complement verb ask -VS +VS sentence-complement verb claim -VV +VV verb-phrase-complement verb want -Voc +Voc vocative or "please" my darling -

    Syntax Rules

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

    - +

    AP

    @@ -498,8 +496,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    AdN

    @@ -514,8 +511,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    Adv

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

    -
    +

    Ant

    @@ -596,8 +591,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    CN

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

    -
    +

    Cl

    @@ -833,8 +826,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    Det

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

    -
    +

    IAdv

    @@ -930,8 +921,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    IP

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

    -
    +

    Imp

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

    -
    +

    ImpForm

    @@ -1008,8 +996,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    ListAP

    @@ -1029,8 +1016,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    ListAdv

    @@ -1050,8 +1036,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    ListNP

    @@ -1071,8 +1056,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    ListS

    @@ -1092,8 +1076,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    NP

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

    -
    +

    Num

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

    -
    +

    Numeral

    @@ -1320,8 +1301,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    Ord

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

    -
    +

    PConj

    @@ -1362,8 +1341,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    Phr

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

    -
    +

    Pol

    @@ -1424,8 +1401,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    Punct

    @@ -1450,8 +1426,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    QCl

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

    -
    +

    QS

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

    -
    +

    Quant

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

    -
    +

    QuantPl

    @@ -1584,8 +1556,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    QuantSg

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

    -
    +

    RCl

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

    -
    +

    RP

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

    -
    +

    RS

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

    -
    +

    S

    @@ -1744,8 +1711,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    Slash

    @@ -1775,8 +1741,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    Tense

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

    -
    +

    Text

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

    -
    +

    Utt

    @@ -1923,8 +1886,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    VP

    @@ -2044,8 +2006,7 @@ Source: http://www.cs.chalmers.se/~aarne/
    -

    -
    +

    Voc

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

    Structural Words

    @@ -2457,7 +2417,6 @@ Source: http://www.cs.chalmers.se/~aar -

    Paradigms for Danish

    @@ -2702,7 +2661,6 @@ source http://www.cs.chalmers.se/~aarn -

    Paradigms for English

    @@ -2931,7 +2889,6 @@ source http://www.cs.chalmers.se/~aar -

    Paradigms for Finnish

    @@ -3268,7 +3225,6 @@ source http://www.cs.chalmers.se/~aar -

    Paradigms for French

    @@ -3497,7 +3453,6 @@ source http://www.cs.chalmers.se/~aarn -

    Paradigms for German

    @@ -3750,7 +3705,6 @@ source http://www.cs.chalmers.se/~aarn -

    Paradigms for Italian

    @@ -3983,7 +3937,6 @@ source http://www.cs.chalmers.se/~aar -

    Paradigms for Norwegian

    @@ -4228,7 +4181,6 @@ source http://www.cs.chalmers.se/~a -

    Paradigms for Russian

    @@ -4469,7 +4421,6 @@ source http://www.cs.chalmers.se/~aar -

    Paradigms for Spanish

    @@ -4566,7 +4517,7 @@ source http://www.cs.chalmers.se/~aar mkA -(solo,sola,solos,solas,solamiento : Str) -> A +(solo,sola,solos,solas,solamente : Str) -> A mkA @@ -4702,7 +4653,6 @@ source http://www.cs.chalmers.se/~aar -

    Paradigms for Swedish

    @@ -4943,7 +4893,6 @@ source http://www.cs.chalmers.se/~aar -

    Browsing the libraries with GF commands

    @@ -5046,6 +4995,6 @@ For each language, an instantiation of the functor:

    - +