From 726d04f00fb8c441ec828a5ae9ba060bf39cf585 Mon Sep 17 00:00:00 2001 From: aarneranta Date: Thu, 18 Apr 2024 10:14:28 +0200 Subject: [PATCH] made lincat LN = NP in Arabic, to deal with all names; also added mkLN Str Gender --- src/arabic/CatAra.gf | 3 ++- src/arabic/DocumentationAra.gf | 4 ++-- src/arabic/NamesAra.gf | 9 ++++----- src/arabic/ParadigmsAra.gf | 16 +++++++++++----- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/arabic/CatAra.gf b/src/arabic/CatAra.gf index 444298bd..8f12a99a 100644 --- a/src/arabic/CatAra.gf +++ b/src/arabic/CatAra.gf @@ -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 diff --git a/src/arabic/DocumentationAra.gf b/src/arabic/DocumentationAra.gf index 09b77a70..2255d0c7 100644 --- a/src/arabic/DocumentationAra.gf +++ b/src/arabic/DocumentationAra.gf @@ -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 { diff --git a/src/arabic/NamesAra.gf b/src/arabic/NamesAra.gf index a362cc02..958829dd 100644 --- a/src/arabic/NamesAra.gf +++ b/src/arabic/NamesAra.gf @@ -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 } diff --git a/src/arabic/ParadigmsAra.gf b/src/arabic/ParadigmsAra.gf index cb374579..3faaeff5 100644 --- a/src/arabic/ParadigmsAra.gf +++ b/src/arabic/ParadigmsAra.gf @@ -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