add pronouns, very much WIP (no object forms, possessives)

This commit is contained in:
Inari Listenmaa
2025-08-22 16:47:03 +02:00
parent c85e7a514b
commit d4056e7db3
4 changed files with 31 additions and 25 deletions

View File

@@ -51,7 +51,7 @@ concrete CatGla of Cat = CommonX ** open ResGla, Coordination, Prelude in {
CN = ResGla.LinCN ; CN = ResGla.LinCN ;
NP = ResGla.LinNP ; NP = ResGla.LinNP ;
Pron = SS ; -- NB. Pronouns need enough info to become NP or Quant. Pron = LinPron ;
Det = ResGla.LinDet ; -- s : Str , n : Number Det = ResGla.LinDet ; -- s : Str , n : Number
Predet = SS ; Predet = SS ;
Quant = ResGla.LinQuant ; -- s : Number => Str Quant = ResGla.LinQuant ; -- s : Number => Str

View File

@@ -12,15 +12,15 @@ concrete NounGla of Noun = CatGla ** open ResGla, Prelude in {
a = NotPron det.n ; a = NotPron det.n ;
d = det.d d = det.d
} ; } ;
{-
-- : PN -> NP ; -- : PN -> NP ;
-- Assuming that lincat PN = lincat NP -- Assuming that lincat PN = lincat NP
UsePN pn = pn ; -- UsePN pn = pn ;
-- : Pron -> NP ; -- : Pron -> NP ;
-- Assuming that lincat Pron = lincat NP -- Assuming that lincat Pron = lincat NP
UsePron pron = pron ; UsePron pron = emptyNP ** pron ;
{-
-- : Predet -> NP -> NP ; -- only the man -- : Predet -> NP -> NP ; -- only the man
PredetNP predet np = PredetNP predet np =

View File

@@ -215,17 +215,22 @@ oper
oper oper
-- TODO: possessive ??????
LinPron : Type = { LinPron : Type = {
s : Case => Str ; s : Case => Str ;
n : Number ; a : Agr ;
p : Person ; empty : Str ; -- to prevent metavariables
-- g : Gender ; ?? -- we have already he_Pron and she_Pron in abstract syntax, does this affect inflection?
} ; } ;
mkPron : (_ : Str) -> Person -> Number -> LinPron = \str,per,num -> { -- TODO: nicer API where you can give Person, Number, Gender etc.
s = \\_ => str ; -- Pronoun inflection is often irregular, so possibly this constructor requires several forms as argument, even if mkNoun is nice and regular -- not this weird unintuitive Agr param
p = per ; mkPron : (_ : Str) -> Agr -> LinPron = \str,agr -> {
n = num ; s = table {
CC Nom => str ;
_ => "gam" -- TODO fix this
} ;
a = agr ;
empty = []
} ; } ;
--------------------------------------------- ---------------------------------------------
@@ -265,7 +270,7 @@ oper
empty = [] ; empty = [] ;
-- n = Sg ; -- n = Sg ;
-- p = P3 ; -- p = P3 ;
d = Indefinite ; d = Definite ;
} ; } ;
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@@ -378,9 +383,10 @@ param
Agr = Sg1 | Sg2 | Sg3 Gender | Pl1 | Pl2 | Pl3 | NotPron Number ; Agr = Sg1 | Sg2 | Sg3 Gender | Pl1 | Pl2 | Pl3 | NotPron Number ;
oper oper
LinPrep : Type = { LinPrep : Type = {
s : Agr => Str ; -- bare: aig 'on', inflected: agam 'on me', agad 'on you', … s : Agr => Str ; -- bare: aig 'on', inflected: agam 'on me', agad 'on you', …
-- TODO: possessive forms
c2 : Definiteness => CoreCase ; -- most often dative c2 : Definiteness => CoreCase ; -- most often dative
replacesPron : Bool ; -- NP has to keep track of if it comes from a Pron replacesPron : Bool ; -- NP has to keep track of if it comes from a Pron

View File

@@ -118,17 +118,17 @@ lin to_Prep = ResGla.guPrep ;
------- -------
-- Pron -- Pron
{-- Pronouns are closed class, no constructor in ParadigmsGla. -- Pronouns are closed class, no constructor in ParadigmsGla.
lin it_Pron = --lin it_Pron =
lin i_Pron = lin i_Pron = mkPron "mi" Sg1 ;
lin youPol_Pron = lin youPol_Pron = mkPron"sibh" Pl2 ;
lin youSg_Pron = lin youSg_Pron = mkPron "tu" Sg2 ;
lin he_Pron = lin he_Pron = mkPron "e" (Sg3 Masc) ;
lin she_Pron = lin she_Pron = mkPron "i" (Sg3 Fem) ;
lin we_Pron = lin we_Pron = mkPron "sinn" Pl1 ;
lin youPl_Pron = lin youPl_Pron = mkPron "sibh" Pl2 ;
lin they_Pron = lin they_Pron = mkPron "iad" Pl3 ;
{-
lin whatPl_IP = lin whatPl_IP =
lin whatSg_IP = lin whatSg_IP =
lin whoPl_IP = lin whoPl_IP =