made lincat LN = NP in Arabic, to deal with all names; also added mkLN Str Gender

This commit is contained in:
aarneranta
2024-04-18 10:14:28 +02:00
parent a251318dad
commit 726d04f00f
4 changed files with 19 additions and 13 deletions

View File

@@ -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

View File

@@ -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 {

View File

@@ -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
}

View File

@@ -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