summaryrefslogtreecommitdiff
path: root/next-lib/src
diff options
context:
space:
mode:
authorbjorn <bjorn@bringert.net>2008-11-18 15:30:53 +0000
committerbjorn <bjorn@bringert.net>2008-11-18 15:30:53 +0000
commitbd1417e21a12ebf3e9da96b4f02459fee259d676 (patch)
tree48d282d44f6daa54ebc172e7c5a0cbdb9804c5cc /next-lib/src
parentf3f29a46839d7e9ba97b56663a775bbf2d5453e4 (diff)
Added overloaded mkQuant to ParadigmsEng.
Diffstat (limited to 'next-lib/src')
-rw-r--r--next-lib/src/english/MorphoEng.gf7
-rw-r--r--next-lib/src/english/ParadigmsEng.gf17
-rw-r--r--next-lib/src/english/StructuralEng.gf2
3 files changed, 18 insertions, 8 deletions
diff --git a/next-lib/src/english/MorphoEng.gf b/next-lib/src/english/MorphoEng.gf
index fac049210..2025312df 100644
--- a/next-lib/src/english/MorphoEng.gf
+++ b/next-lib/src/english/MorphoEng.gf
@@ -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 } ;
diff --git a/next-lib/src/english/ParadigmsEng.gf b/next-lib/src/english/ParadigmsEng.gf
index 16d04045e..c6c9ba4db 100644
--- a/next-lib/src/english/ParadigmsEng.gf
+++ b/next-lib/src/english/ParadigmsEng.gf
@@ -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") + ? + _ +
diff --git a/next-lib/src/english/StructuralEng.gf b/next-lib/src/english/StructuralEng.gf
index 9c50066a4..873e782b2 100644
--- a/next-lib/src/english/StructuralEng.gf
+++ b/next-lib/src/english/StructuralEng.gf
@@ -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 ;