forked from GitHub/gf-rgl
add pronouns, very much WIP (no object forms, possessives)
This commit is contained in:
@@ -51,7 +51,7 @@ concrete CatGla of Cat = CommonX ** open ResGla, Coordination, Prelude in {
|
||||
|
||||
CN = ResGla.LinCN ;
|
||||
NP = ResGla.LinNP ;
|
||||
Pron = SS ; -- NB. Pronouns need enough info to become NP or Quant.
|
||||
Pron = LinPron ;
|
||||
Det = ResGla.LinDet ; -- s : Str , n : Number
|
||||
Predet = SS ;
|
||||
Quant = ResGla.LinQuant ; -- s : Number => Str
|
||||
|
||||
@@ -12,15 +12,15 @@ concrete NounGla of Noun = CatGla ** open ResGla, Prelude in {
|
||||
a = NotPron det.n ;
|
||||
d = det.d
|
||||
} ;
|
||||
{-
|
||||
|
||||
-- : PN -> NP ;
|
||||
-- Assuming that lincat PN = lincat NP
|
||||
UsePN pn = pn ;
|
||||
-- UsePN pn = pn ;
|
||||
|
||||
-- : Pron -> NP ;
|
||||
-- Assuming that lincat Pron = lincat NP
|
||||
UsePron pron = pron ;
|
||||
|
||||
UsePron pron = emptyNP ** pron ;
|
||||
{-
|
||||
-- : Predet -> NP -> NP ; -- only the man
|
||||
PredetNP predet np =
|
||||
|
||||
|
||||
@@ -215,17 +215,22 @@ oper
|
||||
|
||||
|
||||
oper
|
||||
-- TODO: possessive ??????
|
||||
LinPron : Type = {
|
||||
s : Case => Str ;
|
||||
n : Number ;
|
||||
p : Person ;
|
||||
-- g : Gender ; ?? -- we have already he_Pron and she_Pron in abstract syntax, does this affect inflection?
|
||||
a : Agr ;
|
||||
empty : Str ; -- to prevent metavariables
|
||||
} ;
|
||||
|
||||
mkPron : (_ : Str) -> Person -> Number -> LinPron = \str,per,num -> {
|
||||
s = \\_ => str ; -- Pronoun inflection is often irregular, so possibly this constructor requires several forms as argument, even if mkNoun is nice and regular
|
||||
p = per ;
|
||||
n = num ;
|
||||
-- TODO: nicer API where you can give Person, Number, Gender etc.
|
||||
-- not this weird unintuitive Agr param
|
||||
mkPron : (_ : Str) -> Agr -> LinPron = \str,agr -> {
|
||||
s = table {
|
||||
CC Nom => str ;
|
||||
_ => "gam" -- TODO fix this
|
||||
} ;
|
||||
a = agr ;
|
||||
empty = []
|
||||
} ;
|
||||
|
||||
---------------------------------------------
|
||||
@@ -265,7 +270,7 @@ oper
|
||||
empty = [] ;
|
||||
-- n = Sg ;
|
||||
-- p = P3 ;
|
||||
d = Indefinite ;
|
||||
d = Definite ;
|
||||
} ;
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -378,9 +383,10 @@ param
|
||||
Agr = Sg1 | Sg2 | Sg3 Gender | Pl1 | Pl2 | Pl3 | NotPron Number ;
|
||||
|
||||
oper
|
||||
|
||||
LinPrep : Type = {
|
||||
s : Agr => Str ; -- bare: aig 'on', inflected: agam 'on me', agad 'on you', …
|
||||
|
||||
-- TODO: possessive forms
|
||||
c2 : Definiteness => CoreCase ; -- most often dative
|
||||
replacesPron : Bool ; -- NP has to keep track of if it comes from a Pron
|
||||
|
||||
|
||||
@@ -118,17 +118,17 @@ lin to_Prep = ResGla.guPrep ;
|
||||
-------
|
||||
-- Pron
|
||||
|
||||
{-- Pronouns are closed class, no constructor in ParadigmsGla.
|
||||
lin it_Pron =
|
||||
lin i_Pron =
|
||||
lin youPol_Pron =
|
||||
lin youSg_Pron =
|
||||
lin he_Pron =
|
||||
lin she_Pron =
|
||||
lin we_Pron =
|
||||
lin youPl_Pron =
|
||||
lin they_Pron =
|
||||
|
||||
-- Pronouns are closed class, no constructor in ParadigmsGla.
|
||||
--lin it_Pron =
|
||||
lin i_Pron = mkPron "mi" Sg1 ;
|
||||
lin youPol_Pron = mkPron"sibh" Pl2 ;
|
||||
lin youSg_Pron = mkPron "tu" Sg2 ;
|
||||
lin he_Pron = mkPron "e" (Sg3 Masc) ;
|
||||
lin she_Pron = mkPron "i" (Sg3 Fem) ;
|
||||
lin we_Pron = mkPron "sinn" Pl1 ;
|
||||
lin youPl_Pron = mkPron "sibh" Pl2 ;
|
||||
lin they_Pron = mkPron "iad" Pl3 ;
|
||||
{-
|
||||
lin whatPl_IP =
|
||||
lin whatSg_IP =
|
||||
lin whoPl_IP =
|
||||
|
||||
Reference in New Issue
Block a user