diff --git a/src/arabic/CatAra.gf b/src/arabic/CatAra.gf index 444298bd..8f12a99a 100644 --- a/src/arabic/CatAra.gf +++ b/src/arabic/CatAra.gf @@ -92,7 +92,8 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in { N = ResAra.Noun ; N2 = ResAra.Noun2 ; N3 = ResAra.Noun3 ; - GN, SN, LN, PN = {s : Case => Str; g : Gender; h : Species} ; + GN, SN, PN = {s : Case => Str; g : Gender; h : Species} ; + LN = ResAra.NP ; linref diff --git a/src/arabic/DocumentationAra.gf b/src/arabic/DocumentationAra.gf index 09b77a70..2255d0c7 100644 --- a/src/arabic/DocumentationAra.gf +++ b/src/arabic/DocumentationAra.gf @@ -1,4 +1,4 @@ ---# -path=.:../abstract:../common + --# -path=.:../abstract:../common -- documenting Arabic inflection ---- so far with English titles and tags, AR 2024-01-31 @@ -32,7 +32,7 @@ lin ) } ; - InflectionPN, InflectionLN, InflectionGN, InflectionSN = \pn -> { ---- TODO: special for LN, GN, SN + InflectionPN, InflectionGN, InflectionSN = \pn -> { ---- TODO: special for LN, GN, SN t = "pn" ; s1 = heading1 ("Proper Name" ++ case pn.g of { diff --git a/src/arabic/NamesAra.gf b/src/arabic/NamesAra.gf index a362cc02..958829dd 100644 --- a/src/arabic/NamesAra.gf +++ b/src/arabic/NamesAra.gf @@ -9,11 +9,10 @@ lin FullName gn sn = emptyNP ** { a = {pgn = Per3 gn.g Sg ; isPron = False} ; } ; -lin UseLN pn = emptyNP ** { - s = pn.s ; - a = {pgn = Per3 pn.g Sg ; isPron = False} ; - } ; +lin UseLN ln = ln ; -lin InLN n = A.PrepNP S.in_Prep (N.UsePN n) ; ---- TODO: alternative prepositions +lin PlainLN ln = ln ; + +lin InLN n = A.PrepNP S.in_Prep n ; ---- TODO: alternative prepositions } diff --git a/src/arabic/ParadigmsAra.gf b/src/arabic/ParadigmsAra.gf index cb374579..3faaeff5 100644 --- a/src/arabic/ParadigmsAra.gf +++ b/src/arabic/ParadigmsAra.gf @@ -30,6 +30,7 @@ resource ParadigmsAra = open ResAra, OrthoAra, (A=AdjectiveAra), + (N=NounAra), CatAra in { @@ -97,12 +98,17 @@ resource ParadigmsAra = open mkLN = overload { mkLN : Str -> LN -- Predictable LN from a Str: fem hum if ends in ة, otherwise masc hum. - = \s -> lin LN (smartPN s) ; + = \s -> lin LN (N.UsePN (smartPN s)) ; + mkLN : Str -> Gender -> LN + = \s, g -> lin LN (N.UsePN (smartPN s ** {g = g})) ; mkLN : N -> LN -- Make a LN out of N. The LN is in construct state. - = \n -> lin LN (n ** { - s = \\c => n.s ! Sg ! Const ! c - ++ n.s2 ! Sg ! Def ! c -- NB this hack works for idaafa constructions (if you used mkN : N -> N -> N), but wrong for mkN : N -> A -> N. /IL - }) ; + = \n -> lin LN (N.MassNP (N.UseN n)) ; + ----(n ** { ---- cannot get this to compile AR 2024-04-18 + ---- s = \\c => n.s ! Sg ! Const ! c + ---- ++ n.s2 ! Sg ! Def ! c -- NB this hack works for idaafa constructions (if you used mkN : N -> N -> N), but wrong for mkN : N -> A -> N. /IL +---- }))) ; + mkLN : NP -> LN + = \np -> np ; } ; --3 Relational nouns diff --git a/src/croatian/AdverbHrv.gf b/src/croatian/AdverbHrv.gf index 4c2a20f7..4b9a6fe8 100644 --- a/src/croatian/AdverbHrv.gf +++ b/src/croatian/AdverbHrv.gf @@ -6,4 +6,6 @@ lin s = prep.s ++ np.prep ! prep.c } ; AdnCAdv a = a ; + + SubjS subj s = {s = subj.s ++ s.s} ; } diff --git a/src/croatian/CatHrv.gf b/src/croatian/CatHrv.gf index 16745d89..0b4c9c40 100644 --- a/src/croatian/CatHrv.gf +++ b/src/croatian/CatHrv.gf @@ -18,7 +18,7 @@ concrete CatHrv of Cat = RS = {s : Agr => Str} ; RCl = {subj,clit,compl : Agr => Str ; verb : VerbForms} ; ---- RAgr with composite RP - RP = AdjForms ; + RP = {s : Gender => Number => Case => Str} ; -- same as AP VP = {verb : VerbForms ; clit,compl : Agr => Str} ; ---- more fields probably needed VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ---- @@ -33,10 +33,12 @@ concrete CatHrv of Cat = AdA = {s : Str} ; N = ResHrv.NounForms ** {g : Gender} ; + N2 = ResHrv.NounForms ** {g : Gender ; c : ComplementCase} ; CN = ResHrv.Noun ; -- {s : Number => Case => Str ; g : Gender} NP = {s,clit,prep : Case => Str ; a : Agr ; hasClit : Bool} ; -- clit,prep differ for pronouns PN = {s : Case => Str ; g : Gender} ; Det = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ; -- can contain a numeral, therefore NumSize + Predet = {s : Gender => Number => Case => Str} ; -- same as AP Quant = {s : Gender => Number => Case => Str} ; -- same as AP Num = Determiner ; Card = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ; diff --git a/src/croatian/ExtendHrv.gf b/src/croatian/ExtendHrv.gf index 8eba3b1f..646f744c 100644 --- a/src/croatian/ExtendHrv.gf +++ b/src/croatian/ExtendHrv.gf @@ -3,6 +3,7 @@ concrete ExtendHrv of Extend = CatHrv ** --- ReflPossPron CardCNCard ---- constant not found (yet) + ,GenRP ,youPolFem_Pron ,UttVPShort ,UttAccIP @@ -32,14 +33,19 @@ concrete ExtendHrv of Extend = CatHrv ** with (Grammar = GrammarHrv) ** open - ResHrv + ResHrv, ParadigmsHrv in { ---lin ReflPossPron = justDemPronFormsAdjective reflPossessivePron ; -lin CardCNCard card cn = { - s = \\g,c => card.s ! g ! c ++ numSizeForm cn.s card.size c ; - size = NS_20_ - } ; +lin + CardCNCard card cn = { + s = \\g,c => card.s ! g ! c ++ numSizeForm cn.s card.size c ; + size = NS_20_ + } ; + + GenRP num cn = { + s = \\g, n, c => (adjFormsAdjective (mkA "čiji").posit).s ! g ! n ! c ++ num.s ! cn.g ! c ++ cn.s ! n ! c + } ; } diff --git a/src/croatian/IdiomHrv.gf b/src/croatian/IdiomHrv.gf index 7c4e4baa..11c0f869 100644 --- a/src/croatian/IdiomHrv.gf +++ b/src/croatian/IdiomHrv.gf @@ -10,4 +10,13 @@ lin ExistNPAdv np adv = ExistNP np ** {compl = adv.s} ; + ImpersCl vp = + let npa = Ag Neutr Sg P3 in { + subj = "" ; + verb = vp.verb ; + clit = vp.clit ! npa ; + compl = vp.compl ! npa ; + a = npa ; + } ; + } diff --git a/src/croatian/MissingHrv.gf b/src/croatian/MissingHrv.gf index ab1a214a..38041248 100644 --- a/src/croatian/MissingHrv.gf +++ b/src/croatian/MissingHrv.gf @@ -6,12 +6,10 @@ oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ; oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ; oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ; oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ; -oper AdvS : Adv -> S -> S = notYet "AdvS" ; oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ; oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ; oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ; oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ; -oper CompCN : CN -> Comp = notYet "CompCN" ; oper CompIAdv : IAdv -> IComp = notYet "CompIAdv" ; oper CompIP : IP -> IComp = notYet "CompIP" ; oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ; @@ -34,14 +32,12 @@ oper IdetIP : IDet -> IP = notYet "IdetIP" ; oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ; oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ; oper ImpVP : VP -> Imp = notYet "ImpVP" ; -oper ImpersCl : VP -> Cl = notYet "ImpersCl" ; oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ; oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ; oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ; oper PassV2 : V2 -> VP = notYet "PassV2" ; oper PositAdvAdj : A -> Adv = notYet "PositAdvAdj" ; oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ; -oper PredetNP : Predet -> NP -> NP = notYet "PredetNP" ; oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ; oper ProgrVP : VP -> VP = notYet "ProgrVP" ; oper QuestIAdv : IAdv -> Cl -> QCl = notYet "QuestIAdv" ; @@ -66,7 +62,6 @@ oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ; oper SlashVP : NP -> VPSlash -> ClSlash = notYet "SlashVP" ; oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ; oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ; -oper SubjS : Subj -> S -> Adv = notYet "SubjS" ; oper TCond : Tense = notYet "TCond" ; oper TFut : Tense = notYet "TFut" ; oper Use2N3 : N3 -> N2 = notYet "Use2N3" ; diff --git a/src/croatian/NounHrv.gf b/src/croatian/NounHrv.gf index 7a83d73a..755a39f9 100644 --- a/src/croatian/NounHrv.gf +++ b/src/croatian/NounHrv.gf @@ -62,6 +62,15 @@ lin s = \\n,c => preOrPost (notB ap.isPost) (ap.s ! cn.g ! n ! c) (cn.s ! n ! c) ; g = cn.g } ; + + PredetNP predet np = + case np.a of { + Ag g n _ => { + s,clit,prep = \\c => predet.s ! g ! n ! c ++ np.s ! c ; + a = np.a ; + hasClit = False + } + } ; RelCN cn rs = { s = \\n,c => cn.s ! n ! c ++ rs.s ! Ag cn.g n P3 ; diff --git a/src/croatian/RelativeHrv.gf b/src/croatian/RelativeHrv.gf index 88abb14d..7a7353a2 100644 --- a/src/croatian/RelativeHrv.gf +++ b/src/croatian/RelativeHrv.gf @@ -6,13 +6,12 @@ concrete RelativeHrv of Relative = CatHrv ** open lin RelVP rp vp = vp ** { subj = - let rel = (adjFormsAdjective rp).s + let rel = rp.s in \\a => case a of { Ag g n _ => rel ! g ! n ! Nom } } ; - IdRP = (mkA "koji").posit ; - + IdRP = adjFormsAdjective (mkA "koji").posit ; } diff --git a/src/croatian/SentenceHrv.gf b/src/croatian/SentenceHrv.gf index 7b2e580d..9e21a9ea 100644 --- a/src/croatian/SentenceHrv.gf +++ b/src/croatian/SentenceHrv.gf @@ -28,5 +28,9 @@ lin pol.s ++ verbAgr rcl.verb a CTPres ++ rcl.compl ! a ; } ; ---- TODO tenses + + + AdvS adv s = {s = adv.s ++ s.s} ; + ExtAdvS adv s = {s = adv.s ++ Predef.BIND ++ "," ++ s.s} ; } diff --git a/src/croatian/StructuralHrv.gf b/src/croatian/StructuralHrv.gf index d0690d89..58553643 100644 --- a/src/croatian/StructuralHrv.gf +++ b/src/croatian/StructuralHrv.gf @@ -31,4 +31,17 @@ lin somewhere_Adv = mkAdv "negdje" ; + if_Subj = lin Subj {s = "ako"} ; + every_Det = {s = \\g, c => (adjFormsAdjective (velikA "svaki")).s ! g ! Sg ! c ; size = NS_1} ; + all_Predet = adjFormsAdjective (velikA "svi") ; + that_Subj = lin Subj {s = "da"} ; + someSg_Det = {s = \\g, c => (adjFormsAdjective (velikA "neki")).s ! g ! Sg ! c ; size = NS_1} ; + at_least_AdN = lin AdN {s = "najmanje"} ; + part_Prep = mkPrep genitive ; + + +-- ExtAdvS +-- mkN2 +-- mkA2 + } diff --git a/src/croatian/VerbHrv.gf b/src/croatian/VerbHrv.gf index 06bb2872..3e10e7df 100644 --- a/src/croatian/VerbHrv.gf +++ b/src/croatian/VerbHrv.gf @@ -37,6 +37,12 @@ lin s = \\a_ => np.s ! Nom ; } ; + CompCN cn = { + s = \\a => case a of { + Ag _ n _ => cn.s ! n ! Nom + } ; + } ; + CompAdv adv = { s = \\a_ => adv.s } ; diff --git a/src/finnish/CatFin.gf b/src/finnish/CatFin.gf index 849e8ad6..b492a102 100644 --- a/src/finnish/CatFin.gf +++ b/src/finnish/CatFin.gf @@ -104,7 +104,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in { linref SSlash = \ss -> ss.s ++ ss.c2.s.p1 ; ClSlash = \cls -> cls.s ! Pres ! Simul ! Pos ++ cls.c2.s.p1 ; - NP = \np -> np.s ! NPAcc ; ----NPSep ; + NP = \np -> np.s ! NPCase Nom ; ----NPSep ; CN = cnRef ; VP = vpRef ;