mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
determiner examples, Finnish
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
7
lib/resource-1.0/api/examples/ExxFin.gf
Normal file
7
lib/resource-1.0/api/examples/ExxFin.gf
Normal file
@@ -0,0 +1,7 @@
|
||||
--# -path=.:..:alltenses:prelude
|
||||
|
||||
concrete ExxFin of Exx = CatFin-[VP] ** ExxI with
|
||||
(Lang = LangFin),
|
||||
(Constructors = ConstructorsFin) ;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" ;
|
||||
|
||||
Reference in New Issue
Block a user