From ae7192f46feb4baa0b9b20bfc4d48836f6a6006f Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 24 Apr 2008 07:23:50 +0000 Subject: [PATCH] exper/french compiles but is incomplete --- lib/resource/exper/french/StructuralFre.gf | 12 ++++++---- lib/resource/exper/romance/AdverbRomance.gf | 2 +- lib/resource/exper/romance/CatRomance.gf | 13 +++++++---- lib/resource/exper/romance/NounRomance.gf | 23 +++++++++++-------- lib/resource/exper/romance/QuestionRomance.gf | 4 ++-- lib/resource/exper/romance/SentenceRomance.gf | 6 +++-- lib/resource/exper/romance/VerbRomance.gf | 2 +- 7 files changed, 37 insertions(+), 25 deletions(-) diff --git a/lib/resource/exper/french/StructuralFre.gf b/lib/resource/exper/french/StructuralFre.gf index 466a0f96b..12a7dc3fa 100644 --- a/lib/resource/exper/french/StructuralFre.gf +++ b/lib/resource/exper/french/StructuralFre.gf @@ -84,7 +84,7 @@ lin someSg_Det = {s = \\_,c => prepCase c ++ elision "quelqu" ; n = Sg} ; something_NP = pn2np (mkPN ["quelque chose"] Masc) ; somewhere_Adv = ss ["quelque part"] ; --- ne - pas - that_Quant = {s = \\_ => + that_Quant = {s = table { Sg => \\g,c => prepCase c ++ genForms "ce" "cette" ! g ; ---- cet ; lą Pl => \\_,_ => "ces" @@ -99,7 +99,7 @@ lin they_Pron = mkPronoun "ils" "les" "leur" "eux" "leur" "leur" "leurs" Masc Pl P3 ; - this_Quant = {s = \\_ => + this_Quant = {s = table { Sg => \\g,c => prepCase c ++ @@ -127,8 +127,12 @@ lin when_IAdv = ss "quand" ; when_Subj = ss "quand" ** {m = Indic} ; where_IAdv = ss "oł" ; - whichSg_IDet = {s = \\g,c => prepCase c ++ genForms "quel" "quelle" ! g ; n = Sg} ; - whichPl_IDet = {s = \\g,c => prepCase c ++ genForms "quels" "quelles" ! g; n = Pl} ; + which_IQuant = { + 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" ; diff --git a/lib/resource/exper/romance/AdverbRomance.gf b/lib/resource/exper/romance/AdverbRomance.gf index 8f818f023..4fe30e707 100644 --- a/lib/resource/exper/romance/AdverbRomance.gf +++ b/lib/resource/exper/romance/AdverbRomance.gf @@ -19,7 +19,7 @@ incomplete concrete AdverbRomance of Adverb = SubjS subj s = { s = subj.s ++ s.s ! subj.m } ; - AdvSC s = s ; +---b AdvSC s = s ; AdnCAdv cadv = {s = cadv.s ++ conjThan} ; diff --git a/lib/resource/exper/romance/CatRomance.gf b/lib/resource/exper/romance/CatRomance.gf index 2e57bcdb8..6d277cd1b 100644 --- a/lib/resource/exper/romance/CatRomance.gf +++ b/lib/resource/exper/romance/CatRomance.gf @@ -28,10 +28,11 @@ incomplete concrete CatRomance of Cat = -- Question - QCl = {s : RTense => Anteriority => Polarity => QForm => Str} ; - IP = {s : Case => Str ; a : AAgr} ; - IComp = {s : AAgr => Str} ; - IDet = {s : Gender => Case => Str ; n : Number} ; + QCl = {s : RTense => Anteriority => Polarity => QForm => Str} ; + IP = {s : Case => Str ; a : AAgr} ; + IComp = {s : AAgr => Str} ; + IDet = {s : Gender => Case => Str ; n : Number} ; + IQuant = {s : Number => Gender => Case => Str} ; -- Relative @@ -58,9 +59,11 @@ incomplete concrete CatRomance of Cat = Det = {s : Gender => Case => Str ; n : Number} ; --- QuantSg = {s : Gender => Case => Str} ; --- QuantPl = {s : Bool => Gender => Case => Str} ; - Quant = {s : Bool => Number => Gender => Case => Str} ; + Quant = {s : Number => Gender => Case => Str} ; + Art = {s : Bool => Number => Gender => Case => Str} ; Predet = {s : AAgr => Case => Str ; c : Case} ; -- c : la plupart de Num = {s : Gender => Str ; isNum : Bool ; n : Number} ; + Card = {s : Gender => Str ; n : Number} ; Ord = {s : AAgr => Str} ; -- Numeral diff --git a/lib/resource/exper/romance/NounRomance.gf b/lib/resource/exper/romance/NounRomance.gf index 609676e60..1b70b6cc3 100644 --- a/lib/resource/exper/romance/NounRomance.gf +++ b/lib/resource/exper/romance/NounRomance.gf @@ -38,6 +38,7 @@ incomplete concrete NounRomance of Noun = hasClit = False } ; +{---b DetSg quant ord = { s = \\g,c => quant.s ! False ! Sg ! g ! c ++ ord.s ! aagr g Sg ; n = Sg @@ -47,20 +48,19 @@ incomplete concrete NounRomance of Noun = ord.s ! aagr g Pl ; n = num.n } ; - ---- DEPREC SgQuant q = {s = q.s ! False ! Sg} ; ---- DEPREC PlQuant q = {s = \\b,g,c => q.s ! b ! Pl ! g ! c} ; - --- part app: cf NounScand. AR 8/7/2007 +-} PossPron p = { - s = \\_,n,g,c => possCase g n c ++ p.s ! Poss (aagr g n) ---- il mio! + s = \\n,g,c => possCase g n c ++ p.s ! Poss (aagr g n) ---- il mio! } ; - NoNum = {s = \\_ => [] ; isNum = False ; n = Pl} ; - NoOrd = {s = \\_ => []} ; + NumSg = {s = \\_ => [] ; isNum = False ; n = Sg} ; + NumPl = {s = \\_ => [] ; isNum = False ; n = Pl} ; +---b NoNum = {s = \\_ => [] ; isNum = False ; n = Pl} ; +---b NoOrd = {s = \\_ => []} ; - NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ; - OrdInt n = {s = \\_ => n.s ++ "."} ; --- +---b NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ; +---b OrdInt n = {s = \\_ => n.s ++ "."} ; --- NumDigits nu = {s = \\g => nu.s ! NCard g ; isNum = True ; n = nu.n} ; OrdDigits nu = {s = \\a => nu.s ! NOrd a.g a.n} ; @@ -80,16 +80,19 @@ incomplete concrete NounRomance of Noun = s = \\b,n,g,c => if_then_Str b [] (artIndef g n c) ; } ; +{---b MassDet = { s = \\b,n,g,c => case of { => partitive g c ; _ => prepCase genitive ---- } } ; +-} -- This is based on record subtyping. - UseN, UseN2, UseN3 = \noun -> noun ; + UseN, UseN2 = \noun -> noun ; +---b UseN3 = \noun -> noun ; ComplN2 f x = { s = \\n => f.s ! n ++ appCompl f.c2 x.s ; diff --git a/lib/resource/exper/romance/QuestionRomance.gf b/lib/resource/exper/romance/QuestionRomance.gf index bb878abe9..3e14a6644 100644 --- a/lib/resource/exper/romance/QuestionRomance.gf +++ b/lib/resource/exper/romance/QuestionRomance.gf @@ -60,7 +60,7 @@ incomplete concrete QuestionRomance of Question = s = \\c => ip.s ! c ++ adv.s ; a = ip.a } ; - +{- ---b IDetCN idet num ord cn = let g = cn.g ; @@ -70,7 +70,7 @@ incomplete concrete QuestionRomance of Question = s = \\c => idet.s ! g ! c ++ num.s ! g ++ ord.s ! a ++ cn.s ! n ; a = a } ; - +-} CompIAdv a = {s = \\_ => a.s} ; } diff --git a/lib/resource/exper/romance/SentenceRomance.gf b/lib/resource/exper/romance/SentenceRomance.gf index 60d8d4df1..ecfe25a86 100644 --- a/lib/resource/exper/romance/SentenceRomance.gf +++ b/lib/resource/exper/romance/SentenceRomance.gf @@ -14,6 +14,7 @@ incomplete concrete SentenceRomance of Sentence = } } ; +{---- OK but inefficient SlashVP np v2 = {s = \\d,ag =>case of { => @@ -24,7 +25,7 @@ incomplete concrete SentenceRomance of Sentence = c2 = v2.c2 } ; -{---b +---b SlashV2 np v2 = {s = \\d,ag =>case of { => @@ -54,6 +55,7 @@ incomplete concrete SentenceRomance of Sentence = c2 = {s = prep.s ; c = prep.c ; isDir = False} } ; +{---- OK but inefficient SlashVS np vs slash = {s = \\d,ag => (mkClause @@ -63,7 +65,7 @@ incomplete concrete SentenceRomance of Sentence = ).s ! d ; c2 = slash.c2 } ; - +-} EmbedS s = {s = conjThat ++ s.s ! Indic} ; --- mood EmbedQS qs = {s = qs.s ! QIndir} ; EmbedVP vp = {s = infVP vp (agrP3 Masc Sg)} ; --- agr ---- compl diff --git a/lib/resource/exper/romance/VerbRomance.gf b/lib/resource/exper/romance/VerbRomance.gf index 51e68df14..4cccd21b1 100644 --- a/lib/resource/exper/romance/VerbRomance.gf +++ b/lib/resource/exper/romance/VerbRomance.gf @@ -56,6 +56,6 @@ incomplete concrete VerbRomance of Verb = PassV2 v = insertComplement (\\a => v.s ! VPart a.g a.n) (predV auxPassive) ; - UseVS, UseVQ = \vv -> {s = vv.s ; c2 = complAcc ; vtyp = vv.vtyp} ; +---b UseVS, UseVQ = \vv -> {s = vv.s ; c2 = complAcc ; vtyp = vv.vtyp} ; }