mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
made lincat LN = NP in Arabic, to deal with all names; also added mkLN Str Gender
This commit is contained in:
@@ -92,7 +92,8 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
|
|||||||
N = ResAra.Noun ;
|
N = ResAra.Noun ;
|
||||||
N2 = ResAra.Noun2 ;
|
N2 = ResAra.Noun2 ;
|
||||||
N3 = ResAra.Noun3 ;
|
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
|
linref
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:../abstract:../common
|
--# -path=.:../abstract:../common
|
||||||
|
|
||||||
-- documenting Arabic inflection
|
-- documenting Arabic inflection
|
||||||
---- so far with English titles and tags, AR 2024-01-31
|
---- 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" ;
|
t = "pn" ;
|
||||||
s1 = heading1 ("Proper Name" ++
|
s1 = heading1 ("Proper Name" ++
|
||||||
case pn.g of {
|
case pn.g of {
|
||||||
|
|||||||
@@ -9,11 +9,10 @@ lin FullName gn sn = emptyNP ** {
|
|||||||
a = {pgn = Per3 gn.g Sg ; isPron = False} ;
|
a = {pgn = Per3 gn.g Sg ; isPron = False} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
lin UseLN pn = emptyNP ** {
|
lin UseLN ln = ln ;
|
||||||
s = pn.s ;
|
|
||||||
a = {pgn = Per3 pn.g Sg ; isPron = False} ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ resource ParadigmsAra = open
|
|||||||
ResAra,
|
ResAra,
|
||||||
OrthoAra,
|
OrthoAra,
|
||||||
(A=AdjectiveAra),
|
(A=AdjectiveAra),
|
||||||
|
(N=NounAra),
|
||||||
CatAra
|
CatAra
|
||||||
in {
|
in {
|
||||||
|
|
||||||
@@ -97,12 +98,17 @@ resource ParadigmsAra = open
|
|||||||
|
|
||||||
mkLN = overload {
|
mkLN = overload {
|
||||||
mkLN : Str -> LN -- Predictable LN from a Str: fem hum if ends in ة, otherwise masc hum.
|
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.
|
mkLN : N -> LN -- Make a LN out of N. The LN is in construct state.
|
||||||
= \n -> lin LN (n ** {
|
= \n -> lin LN (N.MassNP (N.UseN n)) ;
|
||||||
s = \\c => n.s ! Sg ! Const ! c
|
----(n ** { ---- cannot get this to compile AR 2024-04-18
|
||||||
++ 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
|
---- 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
|
--3 Relational nouns
|
||||||
|
|||||||
Reference in New Issue
Block a user