summaryrefslogtreecommitdiff
path: root/next-lib/src
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-11-03 16:52:54 +0000
committeraarne <aarne@cs.chalmers.se>2008-11-03 16:52:54 +0000
commit9ecc663d00fd91e8c0108785722c735348528f9e (patch)
tree0d448c553699345a6a556c014f3ccfbd6fad5e5d /next-lib/src
parent44ad7596b6e151000ef6155bbdc697c1896c5de8 (diff)
structural words needed for Attempto ; negative items are overgenerating
Diffstat (limited to 'next-lib/src')
-rw-r--r--next-lib/src/abstract/Structural.gf10
-rw-r--r--next-lib/src/api/Constructors.gf4
-rw-r--r--next-lib/src/english/ExtraEng.gf3
-rw-r--r--next-lib/src/english/ExtraEngAbs.gf1
-rw-r--r--next-lib/src/english/StructuralEng.gf10
-rw-r--r--next-lib/src/french/StructuralFre.gf27
-rw-r--r--next-lib/src/german/CatGer.gf2
-rw-r--r--next-lib/src/german/NounGer.gf4
-rw-r--r--next-lib/src/german/ResGer.gf4
-rw-r--r--next-lib/src/german/StructuralGer.gf31
-rw-r--r--next-lib/src/swedish/StructuralSwe.gf18
11 files changed, 101 insertions, 13 deletions
diff --git a/next-lib/src/abstract/Structural.gf b/next-lib/src/abstract/Structural.gf
index d616ba9d5..8ba4486d1 100644
--- a/next-lib/src/abstract/Structural.gf
+++ b/next-lib/src/abstract/Structural.gf
@@ -108,4 +108,14 @@ abstract Structural = Cat ** {
youPl_Pron : Pron ; -- you (plural)
youPol_Pron : Pron ; -- you (polite)
+ no_Quant : Quant ;
+ nobody_but_Predet : Predet ;
+ nothing_but_Predet : Predet ;
+ not_Predet : Predet ;
+ if_then_Conj : Conj ;
+ at_least_AdN : AdN ;
+ at_most_AdN : AdN ;
+ nobody_NP : NP ;
+ nothing_NP : NP ;
+
}
diff --git a/next-lib/src/api/Constructors.gf b/next-lib/src/api/Constructors.gf
index 3f29d4967..a6804b56c 100644
--- a/next-lib/src/api/Constructors.gf
+++ b/next-lib/src/api/Constructors.gf
@@ -1122,8 +1122,10 @@ incomplete resource Constructors = open Grammar in {
mkCard = overload {
mkCard : Numeral -> Card
= NumNumeral ;
- mkNum : Digits -> Card -- 51
+ mkCard : Digits -> Card -- 51
= NumDigits ;
+ mkCard : AdN -> Card -> Card
+ = AdNum
} ;
mkNum = overload {
diff --git a/next-lib/src/english/ExtraEng.gf b/next-lib/src/english/ExtraEng.gf
index 8f3c65b3d..b004f16d3 100644
--- a/next-lib/src/english/ExtraEng.gf
+++ b/next-lib/src/english/ExtraEng.gf
@@ -1,5 +1,5 @@
concrete ExtraEng of ExtraEngAbs = CatEng **
- open ResEng, Coordination, Prelude in {
+ open ResEng, Coordination, Prelude, MorphoEng in {
lin
GenNP np = {s = \\_,_ => np.s ! Gen ; sp = \\_,_,_ => np.s ! Gen} ;
@@ -66,5 +66,6 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
a = RNoAg
} ;
+ each_Det = mkDeterminer Sg "each" ;
}
diff --git a/next-lib/src/english/ExtraEngAbs.gf b/next-lib/src/english/ExtraEngAbs.gf
index 38da65a38..78e735d9d 100644
--- a/next-lib/src/english/ExtraEngAbs.gf
+++ b/next-lib/src/english/ExtraEngAbs.gf
@@ -15,4 +15,5 @@ abstract ExtraEngAbs = Extra ** {
that_RP : RP ; -- "that" as a relational pronoun (IdRP is "which" / "who")
+ each_Det : Det ;
}
diff --git a/next-lib/src/english/StructuralEng.gf b/next-lib/src/english/StructuralEng.gf
index 971eb04f3..995844771 100644
--- a/next-lib/src/english/StructuralEng.gf
+++ b/next-lib/src/english/StructuralEng.gf
@@ -122,5 +122,15 @@ concrete StructuralEng of Structural = CatEng **
youPl_Pron = mkPron "you" "you" "your" "yours" plural P2 human ;
youPol_Pron = mkPron "you" "you" "your" "yours" singular P2 human ;
+ not_Predet = {s = "not" ; lock_Predet = <>} ;
+ nothing_but_Predet = {s = "nothing but" ; lock_Predet = <>} ;
+ nobody_but_Predet = {s = "nobody but" ; lock_Predet = <>} ;
+ no_Quant = mkQuant "no" "no" ;
+ if_then_Conj = {s1 = "if" ; s2 = "then" ; n = singular ; lock_Conj = <>} ;
+ nobody_NP = regNP "nobody" singular ;
+ nothing_NP = regNP "nothing" singular ;
+
+ at_least_AdN = mkAdN "at least" ;
+ at_most_AdN = mkAdN "at most" ;
}
diff --git a/next-lib/src/french/StructuralFre.gf b/next-lib/src/french/StructuralFre.gf
index b1e361ed7..4a0fa4981 100644
--- a/next-lib/src/french/StructuralFre.gf
+++ b/next-lib/src/french/StructuralFre.gf
@@ -146,15 +146,14 @@ lin
s = \\n,g,c =>
prepCase c ++ aagrForms "quel" "quelle" "quels" "quelles" ! aagr g n
} ;
----b whichSg_IDet = {s = \\g,c => prepCase c ++ genForms "quel" "quelle" ! g ; n = Sg} ;
----b whichPl_IDet = {s = \\g,c => prepCase c ++ genForms "quels" "quelles" ! g; n = Pl} ;
+
whoPl_IP = {s = \\c => prepCase c ++ "qui" ; a = aagr Masc Pl} ;
whoSg_IP = {s = \\c => prepCase c ++ "qui" ; a = aagr Masc Sg} ;
why_IAdv = ss "pourquoi" ;
without_Prep = mkPreposition "sans" ;
with_Prep = mkPreposition "avec" ;
yes_Utt = ss "oui" ; --- si
----b yes_Phr = ss "oui" ; --- si
+
youSg_Pron = mkPronoun
"tu" (elision "t") (elision "t") "toi" "ton" (elisPoss "t") "tes"
Masc Sg P2 ;
@@ -163,5 +162,27 @@ lin
"vous" "vous" "vous" "vous" "votre" "votre" "vos"
Masc Pl P2 ;
+ not_Predet = {s = \\a,c => prepCase c ++ "pas" ; c = Nom} ;
+ nothing_but_Predet = {s = \\a,c => prepCase c ++ "rien excepté" ; c = Nom} ;
+ nobody_but_Predet = {s = \\a,c => prepCase c ++ "personne excepté" ; c = Nom} ;
+
+
+ no_Quant =
+ let aucun : ParadigmsFre.Number => ParadigmsFre.Gender => Case => Str = table {
+ Sg => \\g,c => prepCase c ++ genForms "aucun" "aucune" ! g ;
+ Pl => \\g,c => prepCase c ++ genForms "aucuns" "aucunes" ! g ----
+ }
+ in {
+ s = \\_ => aucun ;
+ sp = aucun ;
+ s2 = []
+ } ;
+ if_then_Conj = {s1 = "si" ; s2 = "alors" ; n = Sg ; lock_Conj = <>} ;
+ nobody_NP = pn2np (mkPN ["personne"] Fem) ;
+
+ nothing_NP = pn2np (mkPN "rien" Masc) ;
+ at_least_AdN = ss "au moins" ;
+ at_most_AdN = ss "au plus" ;
+
}
diff --git a/next-lib/src/german/CatGer.gf b/next-lib/src/german/CatGer.gf
index 82a97c854..737b1d0c1 100644
--- a/next-lib/src/german/CatGer.gf
+++ b/next-lib/src/german/CatGer.gf
@@ -57,7 +57,7 @@ concrete CatGer of Cat =
a : Adjf
} ;
Art = {s : Bool => Number => Gender => Case => Str ; a : Adjf} ;
- Predet = {s : Number => Gender => Case => Str} ;
+ Predet = {s : Number => Gender => Case => Str ; c : PredetCase} ;
Num = {s : Gender => Case => Str ; n : Number ; isNum : Bool} ;
Card = {s : Gender => Case => Str ; n : Number} ;
Ord = {s : AForm => Str} ;
diff --git a/next-lib/src/german/NounGer.gf b/next-lib/src/german/NounGer.gf
index 2ebdccd9e..02252afbd 100644
--- a/next-lib/src/german/NounGer.gf
+++ b/next-lib/src/german/NounGer.gf
@@ -23,7 +23,9 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in {
} ;
PredetNP pred np = {
- s = \\c => pred.s ! np.a.n ! Masc ! c ++ np.s ! c ; ---- g
+ s = \\c0 =>
+ let c = case pred.c of {NoCase => c0 ; PredCase k => k} in
+ pred.s ! np.a.n ! Masc ! c0 ++ np.s ! c ; ---- g
a = np.a
} ;
diff --git a/next-lib/src/german/ResGer.gf b/next-lib/src/german/ResGer.gf
index 219749b6f..10c72082c 100644
--- a/next-lib/src/german/ResGer.gf
+++ b/next-lib/src/german/ResGer.gf
@@ -38,6 +38,10 @@ resource ResGer = ParamX ** open Prelude in {
param NPForm = NPCase Case | NPPoss GenNum Case ;
+-- Predeterminers sometimes require a case ("ausser mir"), sometimes not ("nur ich").
+
+ param PredetCase = NoCase | PredCase Case ;
+
--2 For $Adjective$
-- The predicative form of adjectives is not inflected further.
diff --git a/next-lib/src/german/StructuralGer.gf b/next-lib/src/german/StructuralGer.gf
index 6ea52c7b0..0f87fcee7 100644
--- a/next-lib/src/german/StructuralGer.gf
+++ b/next-lib/src/german/StructuralGer.gf
@@ -8,7 +8,7 @@ concrete StructuralGer of Structural = CatGer **
above_Prep = mkPrep "über" Dat ;
after_Prep = mkPrep "nach" Dat ;
- all_Predet = {s = appAdj (regA "all")} ;
+ all_Predet = {s = appAdj (regA "all") ; c = NoCase} ;
almost_AdA, almost_AdN = ss "fast" ;
although_Subj = ss "obwohl" ;
always_AdV = ss "immer" ;
@@ -51,7 +51,7 @@ concrete StructuralGer of Structural = CatGer **
less_CAdv = ss "weniger" ;
many_Det = detLikeAdj Pl "viel" ;
more_CAdv = ss "mehr" ;
- most_Predet = {s = appAdj (regA "meist")} ;
+ most_Predet = {s = appAdj (regA "meist") ; c = NoCase} ;
much_Det = detLikeAdj Sg "viel" ;
must_VV = auxVV
(mkV
@@ -60,7 +60,7 @@ concrete StructuralGer of Structural = CatGer **
"müßte" "gemußt" []
VHaben) ;
--- one_Quant = DEPREC
- only_Predet = {s = \\_,_,_ => "nur"} ;
+ only_Predet = {s = \\_,_,_ => "nur" ; c = NoCase} ;
no_Utt = ss "nein" ;
---b no_Phr = ss "nein" ;
on_Prep = mkPrep "auf" Dat ;
@@ -117,8 +117,6 @@ concrete StructuralGer of Structural = CatGer **
where_IAdv = ss "wo" ;
which_IQuant = {s = \\n => (detLikeAdj n "welch").s} ;
----b whichPl_IDet = detLikeAdj Pl "welch" ;
----b whichSg_IDet = detLikeAdj Sg "welch" ;
whoSg_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Sg} ;
whoPl_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Pl} ;
why_IAdv = ss "warum" ;
@@ -128,6 +126,27 @@ concrete StructuralGer of Structural = CatGer **
youPl_Pron = mkPronPers "ihr" "euch" "euch" "eurer" "euer" Fem Pl P2 ; ---- poss
youPol_Pron = mkPronPers "Sie" "Sie" "Ihnen" "Ihrer" "Ihr" Fem Pl P3 ;
yes_Utt = ss "ja" ;
----b yes_Phr = ss "ja" ;
+
+ not_Predet = {s = \\_,_,_ => "nicht" ; c = NoCase} ;
+ nothing_but_Predet = {s = \\_,_,_ => "nichts ausser" ; c = PredCase Dat} ;
+ nobody_but_Predet = {
+ s = \\_,_,c =>
+ caselist "niemand" "niemanden" "niemandem" "niemands" ! c ++ "ausser" ;
+ c = PredCase Dat
+ } ;
+ no_Quant = let
+ keiner : Number => Gender => Case => Str = table {
+ Sg => \\g,c => "kein" + pronEnding ! GSg g ! c ;
+ Pl => (detLikeAdj Pl "kein").s
+ }
+ in
+ {s = \\_ => keiner ; sp = keiner ; a = Strong} ; ---- sp
+ if_then_Conj = {s1 = "wenn" ; s2 = "dann" ; n = Sg ; lock_Conj = <>} ;
+ nobody_NP =
+ nameNounPhrase {s = caselist "niemand" "niemanden" "niemandem" "niemands"} ;
+ nothing_NP =
+ nameNounPhrase {s = \\_ => "nichts"} ;
+ at_least_AdN = ss "wenigstens" ;
+ at_most_AdN = ss "höchstens" ;
}
diff --git a/next-lib/src/swedish/StructuralSwe.gf b/next-lib/src/swedish/StructuralSwe.gf
index 98d54eb29..97f17402f 100644
--- a/next-lib/src/swedish/StructuralSwe.gf
+++ b/next-lib/src/swedish/StructuralSwe.gf
@@ -123,5 +123,23 @@ concrete StructuralSwe of Structural = CatSwe **
oper
vem = MorphoSwe.mkNP "vem" "vem" "vems" "vems" "vems" SgUtr P3 ;
+lin
+ not_Predet = {s = \\_ => "inte"} ;
+ nothing_but_Predet = {s = \\_ => "inget förutom"} ;
+ nobody_but_Predet = {s = \\_ => "ingen förutom"} ;
+ no_Quant =
+ {s = table {
+ Sg => \\_,_ => genderForms "ingen" "inget" ;
+ Pl => \\_,_,_ => "inga"
+ } ;
+ det = DDef Def
+ } ;
+
+ if_then_Conj = {s1 = "om" ; s2 = "så" ; n = singular} ;
+ nobody_NP = regNP "ingen" "ingens" SgUtr ;
+ nothing_NP = regNP "inget" "ingets" SgNeutr ;
+
+ at_least_AdN = ss "minst" ;
+ at_most_AdN = ss "högst" ;
}