mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
Added overloaded mkQuant to ParadigmsEng.
This commit is contained in:
@@ -21,13 +21,6 @@ resource MorphoEng = open Prelude, (Predef=Predef), ResEng in {
|
||||
sp = regGenitiveS s ;
|
||||
n = n} ;
|
||||
|
||||
mkQuant : Str -> Str -> {s : Bool => Number => Str; sp : Bool => Number => Case => Str } = \sg,pl -> mkQuant4 sg pl sg pl ;
|
||||
|
||||
mkQuant4 : Str -> Str -> Str -> Str -> {s : Bool => Number => Str; sp : Bool => Number => Case => Str } = \sg,pl,sg',pl' -> {
|
||||
s = \\_ => table { Sg => sg ; Pl => pl } ;
|
||||
sp = \\_ => table { Sg => regGenitiveS sg' ; Pl => regGenitiveS pl' }
|
||||
} ;
|
||||
|
||||
regGenitiveS : Str -> Case => Str = \s ->
|
||||
table { Gen => genitiveS s; _ => s } ;
|
||||
|
||||
|
||||
@@ -128,6 +128,12 @@ oper
|
||||
mkPN : N -> PN
|
||||
} ;
|
||||
|
||||
--3 Determiners and quantifiers
|
||||
|
||||
mkQuant : overload {
|
||||
mkQuant : (this, these : Str) -> Quant ;
|
||||
mkQuant : (no_sg, no_pl, none_sg, non_pl : Str) -> Quant ;
|
||||
} ;
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
@@ -391,6 +397,17 @@ mkSubj : Str -> Subj = \s -> {s = s ; lock_Subj = <>} ;
|
||||
g = g ; lock_PN = <>} ;
|
||||
nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = <>} ;
|
||||
|
||||
mkQuant = overload {
|
||||
mkQuant : (this, these : Str) -> Quant = \sg,pl -> mkQuantifier sg pl sg pl;
|
||||
mkQuant : (no_sg, no_pl, none_sg, non_pl : Str) -> Quant = mkQuantifier;
|
||||
} ;
|
||||
|
||||
mkQuantifier : Str -> Str -> Str -> Str -> Quant = \sg,pl,sg',pl' -> {
|
||||
s = \\_ => table { Sg => sg ; Pl => pl } ;
|
||||
sp = \\_ => table { Sg => regGenitiveS sg' ; Pl => regGenitiveS pl' } ;
|
||||
lock_Quant = <>
|
||||
} ;
|
||||
|
||||
mk2A a b = mkAdjective a a a b ** {lock_A = <>} ;
|
||||
regA a = case a of {
|
||||
_ + ("a" | "e" | "i" | "o" | "u" | "y") + ? + _ +
|
||||
|
||||
@@ -123,7 +123,7 @@ concrete StructuralEng of Structural = CatEng **
|
||||
youPol_Pron = mkPron "you" "you" "your" "yours" singular P2 human ;
|
||||
|
||||
not_Predet = {s = "not" ; lock_Predet = <>} ;
|
||||
no_Quant = mkQuant4 "no" "no" "none" "none" ;
|
||||
no_Quant = mkQuant "no" "no" "none" "none" ;
|
||||
if_then_Conj = {s1 = "if" ; s2 = "then" ; n = singular ; lock_Conj = <>} ;
|
||||
nobody_NP = regNP "nobody" singular ;
|
||||
nothing_NP = regNP "nothing" singular ;
|
||||
|
||||
Reference in New Issue
Block a user