diff --git a/lib/resource/abstract/Cat.gf b/lib/resource/abstract/Cat.gf index cfc13e52e..885332019 100644 --- a/lib/resource/abstract/Cat.gf +++ b/lib/resource/abstract/Cat.gf @@ -86,8 +86,8 @@ abstract Cat = Common ** { -- Constructed in [Numeral Numeral.html]. - Numeral ; -- cardinal or ordinal, e.g. "five/fifth" - Digits ; -- cardinal or ordinal, e.g. "1,000/1,000th" + Numeral ; -- cardinal or ordinal in words e.g. "five/fifth" + Digits ; -- cardinal or ordinal in digits e.g. "1,000/1,000th" --2 Structural words diff --git a/lib/resource/api/Constructors.gf b/lib/resource/api/Constructors.gf index 20dd467e7..ff51032a1 100644 --- a/lib/resource/api/Constructors.gf +++ b/lib/resource/api/Constructors.gf @@ -77,7 +77,12 @@ incomplete resource Constructors = open Grammar in { mkText : S -> Text ; -- 4. John walked. mkText : Cl -> Text ; -- 5. John walks. mkText : QS -> Text ; -- 6. Did John walk? - mkText : Imp -> Text -- 7. Walk! + mkText : Imp -> Text ; -- 7. Walk! + +-- Finally, two texts can be combined into a text. + + mkText : Text -> Text -> Text ; -- 8. Where? When? Here. Now! + } ; -- A text can also be empty. @@ -1452,7 +1457,8 @@ incomplete resource Constructors = open Grammar in { mkText : Pol -> Imp -> Text = \p,i -> TExclMark (PhrUtt NoPConj (UttImpSg p i) NoVoc) TEmpty; mkText : Phr -> Text -> Text -- John walks. ... - = TFullStop + = TFullStop ; + mkText : Text -> Text -> Text = \t,u -> {s = t.s ++ u.s ; lock_Text = <>} ; } ; mkVP = overload { diff --git a/lib/resource/doc/synopsis.html b/lib/resource/doc/synopsis.html index 3d17d61a2..682a38929 100644 --- a/lib/resource/doc/synopsis.html +++ b/lib/resource/doc/synopsis.html @@ -35,6 +35,7 @@
  • Conj - conjunction
  • DConj - distributed conjunction
  • Det - determiner phrase +
  • Digits - cardinal or ordinal in digits
  • IAdv - interrogative adverb
  • IComp - interrogative complement of copula
  • IDet - interrogative determiner @@ -50,7 +51,7 @@
  • N3 - three-place relational noun
  • NP - noun phrase (subject or object)
  • Num - cardinal number (used with QuantPl) -
  • Numeral +
  • Numeral - cardinal or ordinal in words
  • Ord - ordinal number (used in Det)
  • PConj - phrase-beginning conjunction
  • PN - proper name @@ -62,7 +63,7 @@
  • Punct
  • QCl - question clause, with all tenses
  • QS - question -
  • Quant - quantifier with both sg and pl +
  • Quant - quantifier ('nucleus' of Det)
  • QuantPl
  • QuantSg
  • RCl - relative clause, with all tenses @@ -86,21 +87,21 @@
  • VV - verb-phrase-complement verb
  • Voc - vocative or "please" -
  • Lexical Paradigms +
  • Lexical Paradigms -
  • Browsing the libraries with GF commands -
  • An Example of Usage +
  • Browsing the libraries with GF commands +
  • An Example of Usage

    @@ -187,8 +188,8 @@ each category. - - + + @@ -289,6 +290,11 @@ also in the Paradigms modules. those seven +Digits +cardinal or ordinal in digits +1,000/1,000th + + IAdv interrogative adverb why @@ -339,6 +345,11 @@ also in the Paradigms modules. seven +Numeral +cardinal or ordinal in words +five/fifth + + Ord ordinal number (used in Det) seventh @@ -389,8 +400,8 @@ also in the Paradigms modules. where did she live -Quant -quantifier with both sg and pl +Quant +quantifier ('nucleus' of Det) this/these @@ -1146,12 +1157,12 @@ Lexical category, constructors given in mkDet -Quant -> Det +Quant -> Det this mkDet -Quant -> Num -> Det +Quant -> Num -> Det these five @@ -1161,12 +1172,12 @@ Lexical category, constructors given in mkDet -Numeral -> Det +Numeral -> Det five mkDet -Int -> Det +Digits -> Det 51 @@ -1191,6 +1202,81 @@ Lexical category, constructors given in + +

    Digits - cardinal or ordinal in digits

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FunctionTypeExample
    n1000_DigitsDigitsthousand
    n100_DigitsDigitshundred
    n10_DigitsDigitsten
    n1_DigitsDigitsone
    n20_DigitsDigitstwenty
    n2_DigitsDigitstwo
    n3_DigitsDigitsthree
    n4_DigitsDigitsfour
    n5_DigitsDigitsfive
    n6_DigitsDigitssix
    n7_DigitsDigitsseven
    n8_DigitsDigitseight
    n9_DigitsDigitsnine
    +

    IAdv - interrogative adverb

    @@ -1500,22 +1586,22 @@ Lexical category, constructors given in - + - + - + - + @@ -1625,12 +1711,12 @@ Lexical category, constructors given in - + - + @@ -1641,7 +1727,7 @@ Lexical category, constructors given in
    mkNPNumeral -> N -> NPNumeral -> N -> NP twenty men
    mkNPNumeral -> CN -> NPNumeral -> CN -> NP twenty old men
    mkNPInt -> N -> NPDigits -> N -> NP 45 men
    mkNPInt -> CN -> NPDigits -> CN -> NP 45 old men
    mkNumNumeral -> NumNumeral -> Num twenty
    mkNumInt -> NumDigits -> Num 51
    -

    Numeral

    +

    Numeral - cardinal or ordinal in words

    @@ -1650,67 +1736,67 @@ Lexical category, constructors given in - + - + - + - + - + - + - + - + - + - + - + - + - +
    Function
    n1000_NumeralNumeralNumeral thousand
    n100_NumeralNumeralNumeral hundred
    n10_NumeralNumeralNumeral ten
    n1_NumeralNumeralNumeral one
    n20_NumeralNumeralNumeral twenty
    n2_NumeralNumeralNumeral two
    n3_NumeralNumeralNumeral three
    n4_NumeralNumeralNumeral four
    n5_NumeralNumeralNumeral five
    n6_NumeralNumeralNumeral six
    n7_NumeralNumeralNumeral seven
    n8_NumeralNumeralNumeral eight
    n9_NumeralNumeralNumeral nine
    @@ -1724,18 +1810,13 @@ Lexical category, constructors given in Example -first_Ord -Ord -- - - mkOrd -Numeral -> Ord +Numeral -> Ord twentieth mkOrd -Int -> Ord +Digits -> Ord 51st @@ -2142,7 +2223,7 @@ Lexical category, constructors given in -

    Quant - quantifier with both sg and pl

    +

    Quant - quantifier ('nucleus' of Det)

    @@ -2151,22 +2232,22 @@ Lexical category, constructors given in - + - + - + - +
    Function
    defQuantQuantQuant the
    indefQuantQuantQuant a
    that_QuantQuantQuant -
    this_QuantQuantQuant -
    @@ -2186,7 +2267,7 @@ Lexical category, constructors given in mkQuantPl -Quant -> QuantPl +Quant -> QuantPl these @@ -2226,15 +2307,10 @@ Lexical category, constructors given in mkQuantSg -Quant -> QuantSg +Quant -> QuantSg this -one_Quant -QuantSg -- - - that_QuantSg QuantSg that @@ -2510,6 +2586,11 @@ Lexical category, constructors given in Imp -> Text Walk! + +mkText +Text -> Text -> Text +Where? When? Here. Now! + @@ -2789,9 +2870,9 @@ Lexical category, constructors given in - -

    Lexical Paradigms

    +

    Lexical Paradigms

    +

    Paradigms for Danish

    @@ -3038,7 +3119,7 @@ source http://www.cs.chalmers.se/~aarn - +

    Paradigms for English

    @@ -3269,7 +3350,7 @@ source http://www.cs.chalmers.se/~aar - +

    Paradigms for Finnish

    @@ -3608,7 +3689,7 @@ source http://www.cs.chalmers.se/~aar - +

    Paradigms for French

    @@ -3839,7 +3920,7 @@ source http://www.cs.chalmers.se/~aarn - +

    Paradigms for German

    @@ -4094,7 +4175,7 @@ source http://www.cs.chalmers.se/~aarn - +

    Paradigms for Italian

    @@ -4329,7 +4410,7 @@ source http://www.cs.chalmers.se/~aar - +

    Paradigms for Norwegian

    @@ -4576,7 +4657,7 @@ source http://www.cs.chalmers.se/~a - +

    Paradigms for Russian

    @@ -4647,17 +4728,13 @@ source http://www.cs.chalmers.se/~aar mkN +(nomSg, genSg, datSg, accSg, instSg, preposSg, prepos2Sg, + + +regN Str -> N -mkN -Str -> Gender -> Animacy -> N - - -mkN -(nomSg,_,_,_,_,_,_,_,_,_,_,prepPl : Str) -> Gender -> Animacy -> N - - nMashina Str -> N @@ -4695,7 +4772,7 @@ source http://www.cs.chalmers.se/~aar nChislo -Str -> N +Str -> Str -> N nZhivotnoe @@ -4730,10 +4807,70 @@ source http://www.cs.chalmers.se/~aar Str -> N +nUchitel +Str -> N + + nUroven Str -> N +nSlovar +Str -> N + + +nMusej +Str -> N + + +nDvorec +Str -> N + + +nTovarish +Str -> N + + +nMesjac +Str -> N + + +nGrazhdanin +Str -> N + + +nRebenok +Str -> N + + +nPut +Str -> N + + +nGospodin +Str -> N + + +nDen +Str -> N + + +nDrug +Str -> N + + +nSyn +Str -> N + + +nLes +Str -> N + + +nMost +Str -> N + + mkFun N -> Prep -> N2 @@ -4747,23 +4884,19 @@ source http://www.cs.chalmers.se/~aar mkPN -Str -> PN - - -mkPN Str -> Gender -> Animacy -> PN -mkPN +nounPN N -> PN -mkA -Str -> A +regA +Str -> Str -> A -mkA -Str -> Str -> A +adjInvar +Str -> A AStaruyj @@ -4795,31 +4928,31 @@ source http://www.cs.chalmers.se/~aar mkV -Aspect -> Conjugation -> (stemPrsSgP1,endPrsSgP1,pastSgP1,imp,inf : Str) -> V +Aspect -> (presentSgP1,presentSgP2,presentSgP3, -mkV -Aspect -> (presSgP1,presSgP2,presSgP3,presPlP1,presPlP2,presPlP3,pastSgMasc,imp,inf: Str) -> V - - -mkV2 -V -> V2 +pastSgP1,imperative,infinitive +Str) -> V mkV2 V -> Str -> Case -> V2 -tvDirDir -V -> V3 - - mkV3 V -> Str -> Str -> Case -> Case -> V3 + +dirV2 +V -> V2 + + +tvDirDir +V -> V3 + - +

    Paradigms for Spanish

    @@ -5054,7 +5187,7 @@ source http://www.cs.chalmers.se/~aar - +

    Paradigms for Swedish

    @@ -5297,7 +5430,7 @@ source http://www.cs.chalmers.se/~aar - +

    Browsing the libraries with GF commands

    All of the following assume @@ -5334,7 +5467,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.