From ffc10a32c918e6f17426836c1cd3ba178379ae5d Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Thu, 6 Nov 2025 13:47:58 +0100 Subject: [PATCH] guessed VocNP, UttCN, UttAP --- src/gaelic/NounGla.gf | 4 ++++ src/gaelic/PhraseGla.gf | 12 ++++++------ src/gaelic/ResGla.gf | 2 ++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/gaelic/NounGla.gf b/src/gaelic/NounGla.gf index 2a622364..a315be5f 100644 --- a/src/gaelic/NounGla.gf +++ b/src/gaelic/NounGla.gf @@ -13,6 +13,10 @@ concrete NounGla of Noun = CatGla ** open ResGla, Prelude in { DDef n sp => cn.s ! c ! sp ! n ; DPoss n _ => cn.s ! c ! Def ! n -- ???????????????? } ; + voc = case det.dt of { + DDef n sp => cn.voc ! n ; -- ???????????????? guessed + DPoss n _ => cn.voc ! n -- ???????????????? + } ; a = NotPron det.dt ; } ; diff --git a/src/gaelic/PhraseGla.gf b/src/gaelic/PhraseGla.gf index a267dd89..851a5322 100644 --- a/src/gaelic/PhraseGla.gf +++ b/src/gaelic/PhraseGla.gf @@ -15,16 +15,16 @@ concrete PhraseGla of Phrase = CatGla ** open Prelude, ResGla in { UttImpSg pol imp = { s = pol.s ++ imp.s ! Sg ! pol.p } ; UttImpPl pol imp = UttImpPol pol imp = {s = pol.s ++ imp.s ! Sg ! pol.p} ; - UttVP vp = {s = linVP vp} ; - UttAP ap = { s = ap.s } ; - UttAdv adv = {s = } ; - UttCN n = {s = } ; - UttCard n = {s = } ; -} + UttVP vp = {s = linVP vp} ; -} + UttAP ap = { s = ap.s ! ASg NOM Masc } ; + UttAdv adv = {s = adv.s} ; + UttCN n = {s = n.s ! NOM ! Indef ! Sg} ; +-- UttCard n = {s = } ; UttInterj i = i ; NoPConj = {s = []} ; -- PConjConj conj = {s = conj.s1 ++ conj.s2 ! …} ; NoVoc = {s = []} ; --- VocNP np = { s = "," ++ np.s ! … } ; + VocNP np = {s = "," ++ np.art ! NOM ++ np.voc} ; --guessed } diff --git a/src/gaelic/ResGla.gf b/src/gaelic/ResGla.gf index 40a1149c..aa652904 100644 --- a/src/gaelic/ResGla.gf +++ b/src/gaelic/ResGla.gf @@ -169,6 +169,7 @@ oper -- or do we have an exhaustive list of prepositions that merge, and we can make that into a param and put on a LHS here? s : Case => Str ; -- TODO: is lenition a separate dimension from case? + voc : Str ; empty : Str ; -- to avoid metavariables a : Agr ; -- includes whether it's pron and whether it's definite. TODO: probably can make even leaner (wasn't a prio so far). } ; @@ -177,6 +178,7 @@ oper emptyNP : LinNP = { s,art = \\_ => [] ; + voc = [] ; a = NotPron (DDef Sg Indef) ; -- we assume pronouns are definite by default. also it just matters for PrepNP. empty = [] ; } ;