From d014312aa95ac407813332cb20fa44d3dc534a01 Mon Sep 17 00:00:00 2001 From: aarne Date: Sun, 3 Jun 2007 18:42:43 +0000 Subject: [PATCH] determiner examples, Finnish --- lib/resource-1.0/api/Constructors.gf | 44 ++++++++++++------------- lib/resource-1.0/api/examples/Exx.gf | 9 +++++ lib/resource-1.0/api/examples/ExxFin.gf | 7 ++++ lib/resource-1.0/api/examples/ExxI.gf | 24 ++++++++++++++ lib/resource-1.0/english/LexiconEng.gf | 6 ++-- 5 files changed, 65 insertions(+), 25 deletions(-) create mode 100644 lib/resource-1.0/api/examples/ExxFin.gf diff --git a/lib/resource-1.0/api/Constructors.gf b/lib/resource-1.0/api/Constructors.gf index 1a7300935..279cfb5ae 100644 --- a/lib/resource-1.0/api/Constructors.gf +++ b/lib/resource-1.0/api/Constructors.gf @@ -387,32 +387,32 @@ incomplete resource Constructors = open Grammar in { -- determiner also has an optional numeral. mkDet : overload { - mkDet : QuantSg -> Det ; -- this - mkDet : QuantSg -> (Ord) -> Det ; -- this best - mkDet : QuantPl -> Det ; -- these - mkDet : QuantPl -> (Num) -> (Ord) -> Det ; -- these five best + mkDet : QuantSg -> Det ; -- 1. this + mkDet : QuantSg -> (Ord) -> Det ; -- 2. this first + mkDet : QuantPl -> Det ; -- 3. these + mkDet : QuantPl -> (Num) -> (Ord) -> Det ; -- 4. these five best -- Quantifiers that have both singular and plural forms are by default used as -- singular determiners. If a numeral is added, the plural form is chosen. - mkDet : Quant -> Det ; -- this - mkDet : Quant -> Num -> Det ; -- these five + mkDet : Quant -> Det ; -- 5. this + mkDet : Quant -> Num -> Det ; -- 6. these five -- Numerals, their special cases integers and digits, and possessive pronouns can be -- used as determiners. - mkDet : Num -> Det ; -- almost forty-five - mkDet : Numeral -> Det ; -- five - mkDet : Int -> Det ; -- 51 - mkDet : Pron -> Det -- my + mkDet : Num -> Det ; -- 7. almost twenty + mkDet : Numeral -> Det ; -- 8. five + mkDet : Int -> Det ; -- 9. 51 + mkDet : Pron -> Det -- 10. my } ; -- The definite and indefinite articles are commonly used determiners. - defSgDet : Det ; -- the (house) - defPlDet : Det ; -- the (houses) - indefSgDet : Det ; -- a (house) - indefPlDet : Det ; -- (houses) + defSgDet : Det ; -- 11. the (house) + defPlDet : Det ; -- 12. the (houses) + indefSgDet : Det ; -- 13. a (house) + indefPlDet : Det ; -- 14. (houses) --3 Quant, QuantSg, and QuantPl, quantifiers @@ -420,20 +420,20 @@ incomplete resource Constructors = open Grammar in { -- Definite and indefinite articles have both singular and plural forms (even though the -- plural indefinite is empty in most languages). - defQuant : Quant ; -- the - indefQuant : Quant ; -- a + defQuant : Quant ; -- 1. the + indefQuant : Quant ; -- 2. a -- From quantifiers that can have both forms, these constructors build the singular and -- the plural forms. - mkQuantSg : Quant -> QuantSg ; -- (this) - mkQuantPl : Quant -> QuantPl ; -- (these) + mkQuantSg : Quant -> QuantSg ; -- 1. this + mkQuantPl : Quant -> QuantPl ; -- 1. these -- The mass noun phrase constructor is treated as a singular quantifier. - massQuant : QuantSg ; -- (mass terms) + massQuant : QuantSg ; -- 2. (mass terms) --- More quantifiers are available in the $Structural$ module +-- More quantifiers are available in the $Structural$ module. --3 Num, cardinal numerals @@ -442,7 +442,7 @@ incomplete resource Constructors = open Grammar in { -- and from symbolic integers. mkNum : overload { - mkNum : Numeral -> Num ; -- forty-six + mkNum : Numeral -> Num ; -- twenty mkNum : Int -> Num ; -- 51 -- A numeral can be modified by an adnumeral. @@ -461,7 +461,7 @@ incomplete resource Constructors = open Grammar in { -- Also adjectives in the superlative form can appear on ordinal positions. - mkOrd : A -> Ord -- largest + mkOrd : A -> Ord -- best } ; --3 AdN, adnumerals diff --git a/lib/resource-1.0/api/examples/Exx.gf b/lib/resource-1.0/api/examples/Exx.gf index e09e9ff0c..d2060b66e 100644 --- a/lib/resource-1.0/api/examples/Exx.gf +++ b/lib/resource-1.0/api/examples/Exx.gf @@ -28,6 +28,15 @@ fun ex11_NP, ex12_NP, ex13_NP, ex14_NP, ex15_NP, ex16_NP, ex17_NP, ex18_NP, ex19_NP, ex20_NP, ex21_NP, ex22_NP, ex23_NP : NP ; + ex1_Det, ex2_Det, ex3_Det, ex4_Det, ex5_Det, ex6_Det, ex7_Det, ex8_Det, ex9_Det, ex10_Det, + ex11_Det, ex12_Det, ex13_Det, ex14_Det : Det ; + + ex1_Quant, ex2_Quant : Quant ; + + ex1_QuantSg, ex2_QuantSg : QuantSg ; + + ex1_QuantPl : QuantPl ; + -- auxiliary to show VP's diff --git a/lib/resource-1.0/api/examples/ExxFin.gf b/lib/resource-1.0/api/examples/ExxFin.gf new file mode 100644 index 000000000..551be7685 --- /dev/null +++ b/lib/resource-1.0/api/examples/ExxFin.gf @@ -0,0 +1,7 @@ +--# -path=.:..:alltenses:prelude + +concrete ExxFin of Exx = CatFin-[VP] ** ExxI with + (Lang = LangFin), + (Constructors = ConstructorsFin) ; + + diff --git a/lib/resource-1.0/api/examples/ExxI.gf b/lib/resource-1.0/api/examples/ExxI.gf index cf8dcb636..5267df9ed 100644 --- a/lib/resource-1.0/api/examples/ExxI.gf +++ b/lib/resource-1.0/api/examples/ExxI.gf @@ -120,6 +120,30 @@ incomplete concrete ExxI of Exx = Cat-[VP] ** open Lang, Constructors in { ex22_NP = mkNP either7or_DConj john_NP (mkNP i_Pron) ; ex23_NP = mkNP either7or_DConj (mkListNP john_NP (mkListNP (mkNP i_Pron) that_NP)) ; + ex1_Det = mkDet (mkQuantSg this_Quant) ; + ex2_Det = mkDet (mkQuantSg this_Quant) first_Ord ; + ex3_Det = mkDet (mkQuantPl this_Quant) ; + ex4_Det = mkDet (mkQuantPl this_Quant) (mkNum n5_Numeral) (mkOrd good_A) ; + ex5_Det = mkDet this_Quant ; + ex6_Det = mkDet this_Quant (mkNum n5_Numeral) ; + ex7_Det = mkDet (mkNum almost_AdN (mkNum n20_Numeral)) ; + ex8_Det = mkDet n5_Numeral ; +--- ex9_Det = mkDet 51 ; + ex10_Det = mkDet i_Pron ; + ex11_Det = defSgDet ; + ex12_Det = defPlDet ; + ex13_Det = indefSgDet ; + ex14_Det = indefPlDet ; + + ex1_Quant = defQuant ; + ex2_Quant = indefQuant ; + + ex1_QuantSg = mkQuantSg this_Quant ; + + ex1_QuantPl = mkQuantSg this_Quant ; + + ex2_QuantSg = massQuant ; + utt u = mkUtt u ; -- a hack to linearize VPs diff --git a/lib/resource-1.0/english/LexiconEng.gf b/lib/resource-1.0/english/LexiconEng.gf index b5c97aecb..82cee5b28 100644 --- a/lib/resource-1.0/english/LexiconEng.gf +++ b/lib/resource-1.0/english/LexiconEng.gf @@ -14,9 +14,9 @@ lin art_N = regN "art" ; ask_V2Q = mkV2Q (regV "ask") noPrep ; baby_N = regN "baby" ; - bad_A = mkADeg "bad" "badly" "worse" "worst" ; + bad_A = mkADeg "bad" "worse" "worst" "badly" ; bank_N = regN "bank" ; - beautiful_A = regADeg "beautiful" ; + beautiful_A = compoundADeg (regA "beautiful") ; become_VA = mkVA (irregV "become" "became" "become") ; beer_N = regN "beer" ; beg_V2V = mkV2V (regDuplV "beg") noPrep toP ; @@ -84,7 +84,7 @@ lin girl_N = regN "girl" ; glove_N = regN "glove" ; gold_N = regN "gold" ; - good_A = mkADeg "good" "well" "better" "best" ; + good_A = mkADeg "good" "better" "best" "well" ; go_V = mk5V "go" "goes" "went" "gone" "going" ; green_A = regADeg "green" ; harbour_N = regN "harbour" ;