1
0
forked from GitHub/gf-core

structural words needed for Attempto ; negative items are overgenerating

This commit is contained in:
aarne
2008-11-03 16:52:54 +00:00
parent 44ad7596b6
commit 9ecc663d00
11 changed files with 101 additions and 13 deletions

View File

@@ -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 ;
}

View File

@@ -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 {

View File

@@ -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" ;
}

View File

@@ -15,4 +15,5 @@ abstract ExtraEngAbs = Extra ** {
that_RP : RP ; -- "that" as a relational pronoun (IdRP is "which" / "who")
each_Det : Det ;
}

View File

@@ -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" ;
}

View File

@@ -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" ;
}

View File

@@ -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} ;

View File

@@ -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
} ;

View File

@@ -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.

View File

@@ -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" ;
}

View File

@@ -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" ;
}