diff --git a/src/gaelic/CatGla.gf b/src/gaelic/CatGla.gf index a8032fe97..815d006f6 100644 --- a/src/gaelic/CatGla.gf +++ b/src/gaelic/CatGla.gf @@ -55,8 +55,8 @@ concrete CatGla of Cat = CommonX ** open ResGla, Coordination, Prelude in { Det = ResGla.LinDet ; -- s : Str , n : Number Predet = SS ; Quant = ResGla.LinQuant ; -- s : Number => Str - Num = ResGla.LinDet ; - Card = ResGla.LinDet ; + Num = ResGla.LinNum ; + Card = ResGla.LinNum ; ACard = SS ; Ord = SS ; DAP = SS ; diff --git a/src/gaelic/LexiconGla.gf b/src/gaelic/LexiconGla.gf index 96142b554..b1409c013 100644 --- a/src/gaelic/LexiconGla.gf +++ b/src/gaelic/LexiconGla.gf @@ -33,9 +33,9 @@ lin big_A = mkA "" ; lin bike_N = mkN "" ; lin bird_N = mkN "" ; lin bite_V2 = mkV2 "" ; -lin black_A = mkA "" ; -} -lin blood_N = mkN "blood" ; -{-lin blow_V = mkV "" ; +lin black_A = mkA "" ; +lin blood_N = mkN "" ; +lin blow_V = mkV "" ; lin blue_A = mkA "" ; lin boat_N = mkN "" ; lin bone_N = mkN "" ; @@ -195,11 +195,12 @@ lin know_V2 = mkV2 "" ; lin know_VQ = mkVQ (mkV "") ; lin know_VS = mkV "" ; - +-} ---- -- L -lin lake_N = mkN "" ; +lin lake_N = smartN "loch" "locha" "lochan" Masc ; +{- lin lamp_N = mkN "" ; lin language_N = mkN "" ; lin laugh_V = mkV "" ; diff --git a/src/gaelic/NounGla.gf b/src/gaelic/NounGla.gf index 24507a913..2987be645 100644 --- a/src/gaelic/NounGla.gf +++ b/src/gaelic/NounGla.gf @@ -8,7 +8,8 @@ concrete NounGla of Noun = CatGla ** open ResGla, Prelude in { -- : Det -> CN -> NP DetCN det cn = emptyNP ** { - s = det.s ++ cn.s ! det.n + s = \\c => det.s ++ cn.s ! det.n ! det.d ! c ; + d = det.d } ; {- -- : PN -> NP ; @@ -53,7 +54,7 @@ concrete NounGla of Noun = CatGla ** open ResGla, Prelude in { -} -- MassNP : CN -> NP ; MassNP cn = emptyNP ** { - s = linCN cn + s = cn.s ! Sg ! Indef } ; @@ -65,6 +66,7 @@ concrete NounGla of Noun = CatGla ** open ResGla, Prelude in { -- : Quant -> Num -> Det ; DetQuant quant num = quant ** { s = quant.s ! num.n ++ num.s ; + s2 = "DUMMY" ; -- "teen" from numbers like seventeen n = num.n ; } ; @@ -121,10 +123,10 @@ concrete NounGla of Noun = CatGla ** open ResGla, Prelude in { -} -- : Quant - DefArt = mkQuant "the" "the" ; + DefArt = mkQuant "an" "nan" Def ; -- : Quant - IndefArt = mkQuant "a" [] ; + IndefArt = mkQuant [] [] Indef ; {- -- : Pron -> Quant -- my @@ -136,7 +138,7 @@ concrete NounGla of Noun = CatGla ** open ResGla, Prelude in { --2 Common nouns -- : N -> CN - UseN n = n ; + UseN = useN ; {- -- : N2 -> CN ; diff --git a/src/gaelic/NumeralGla.gf b/src/gaelic/NumeralGla.gf index a7e3af7c1..e56c4ea2f 100644 --- a/src/gaelic/NumeralGla.gf +++ b/src/gaelic/NumeralGla.gf @@ -1,6 +1,6 @@ concrete NumeralGla of Numeral = CatGla [Numeral,Digits] ** open Prelude, ResGla in { - +{- lincat Digit = LinNumeral ; -- 2..9 Sub10, -- 1..9 @@ -112,4 +112,6 @@ concrete NumeralGla of Numeral = CatGla [Numeral,Digits] ** } ; n = Pl ; -- TODO: handle number 1 } ; + + -} } diff --git a/src/gaelic/ParadigmsGla.gf b/src/gaelic/ParadigmsGla.gf index 330df7348..68984f3fd 100644 --- a/src/gaelic/ParadigmsGla.gf +++ b/src/gaelic/ParadigmsGla.gf @@ -117,7 +117,7 @@ oper -- https://inariksit.github.io/gf/2018/05/25/subtyping-gf.html#lock-fields mkN = overload { - mkN : Str -> N = \s -> lin N (ResGla.mkNoun s) ; + mkN : Str -> N = \s -> lin N (ResGla.smartN s (s+"a") (s+"an") Masc) ; -- TODO: more overload instances } ; diff --git a/src/gaelic/ResGla.gf b/src/gaelic/ResGla.gf index 8a47a32c1..d892a148c 100644 --- a/src/gaelic/ResGla.gf +++ b/src/gaelic/ResGla.gf @@ -51,6 +51,21 @@ oper g : Gender } ; + smartN = overload { + smartN : (nom,gen,pl : Str) -> Gender -> LinN = \loch,locha,lochan,g -> { + base, + lenited, + palatalised, + lenited_palatalised, + suffixE = loch ; + lenited_suffixA = lochan ; + suffixAn = lochan ; + g = g + } +-- ; +-- smartN : (…,…,…,… : Str) + } ; + {- @@ -123,7 +138,7 @@ class 3 -} - +oper LinPN : Type = { s : Str ; n : Number ; -- Proper nouns often have already an inherent number; you don't usually say "a Paris / many Parises" @@ -299,25 +314,34 @@ oper s, -- quantifier in a context, e.g. 'this (cat) (is nice)' sp -- quantifier as standalone, e.g. 'this (is nice)' : Number => Str ; + d : Definiteness ; } ; LinDet : Type = { s,s2 : Str ; n : Number ; + d : Definiteness ; + } ; + + LinNum : Type = { + s : Str ; + n : Number ; } ; -- Can you reuse your mkNoun? Do nouns and quantifiers inflect the same way? - mkQuant : Str -> Str -> LinQuant = \this, these -> { + mkQuant : Str -> Str -> Definiteness -> LinQuant = \this,these,d -> { s, sp = table { Sg => this ; _ => these } ; + d = d ; }; mkDet : (seven, teen : Str) -> Number -> LinDet = \aon, deug, num -> { s = aon ; s2 = deug ; - n = num + n = num ; + d = Indef ---- } ; -------------------------------------------------------------------------------- diff --git a/src/gaelic/SentenceGla.gf b/src/gaelic/SentenceGla.gf index 893e105a3..5fe17d4b8 100644 --- a/src/gaelic/SentenceGla.gf +++ b/src/gaelic/SentenceGla.gf @@ -10,7 +10,7 @@ lin -- : NP -> VP -> Cl PredVP np vp = { - subj = np.s ; -- ! Nom, if there are cases + subj = np.s ! Nom ; pred = -- table {something with tense+polarity => vp.s ! TODOVF np.n np.p