Merge pull request #98 from odanoburu/romance-ap-copula

(Romance) add copTyp to adjectives
This commit is contained in:
Inari Listenmaa
2018-12-13 10:50:14 +02:00
committed by GitHub
13 changed files with 137 additions and 76 deletions
+6 -3
View File
@@ -142,7 +142,8 @@ concrete ExtendPor of Extend =
lin
PresPartAP vp = {
s = \\af => gerVP vp (aform2aagr af ** {p = P3}) ;
isPre = False
isPre = False ;
copTyp = serCopula
} ;
PastPartAP vps = pastPartAP vps [] ;
@@ -178,7 +179,8 @@ concrete ExtendPor of Extend =
pastPartAP : VPSlash -> Str -> AP ;
pastPartAP vps agent = lin AP {
s = \\af => vps.comp ! (aform2aagr af ** {p = P3}) ++ vps.s.s ! VPart (aform2gender af) (aform2number af) ++ agent ;
isPre = False
isPre = False ;
copTyp = serCopula
} ;
passVPSlash : VPSlash -> Str -> VP ;
@@ -203,7 +205,8 @@ concrete ExtendPor of Extend =
s = \\af => case (aform2aagr af) of {
{n = n} => adj.s ! Posit ! (genNum2Aform noun.g n) ++ "de" ++ noun.s ! n
} ;
isPre = adj.isPre
isPre = adj.isPre ;
copTyp = adj.copTyp
} ;
GerundCN vp = {
+2 -2
View File
@@ -1,7 +1,7 @@
--# -path=.:../romance:../common:../abstract:../../prelude
concrete LexiconPor of Lexicon = CatPor ** open
(M=MorphoPor), ParadigmsPor, BeschPor, Prelude in {
(M=MorphoPor), ParadigmsPor, BeschPor, Prelude, (D = DiffPor) in {
flags
optimize=values ;
@@ -39,7 +39,7 @@ lin
near_A = mkA "perto" ;
new_A = prefA (mkA "novo") ;
old_A = prefA (mkA "velho") ;
ready_A = mkA "pronto" ;
ready_A = adjCopula (mkA "pronto") D.estarCopula ;
red_A = mkA "vermelho" ;
rotten_A = mkA "podre" ;
round_A = mkA "redondo" ;
+34 -19
View File
@@ -184,10 +184,14 @@ oper
--2 Adjectives
compADeg : A -> A ;
compADeg a = {s = table {Posit => a.s ! Posit ;
_ => \\f => "mais" ++
a.s ! Posit ! f} ;
isPre = a.isPre ; lock_A = <>} ;
compADeg a = lin A {
s = table {
Posit => a.s ! Posit ;
_ => \\f => "mais" ++ a.s ! Posit ! f
} ;
isPre = a.isPre ;
copTyp = a.copTyp
} ;
{- superlADeg : A -> A ;
superlADeg a = {s = table {Posit => a.s ! Posit ;
@@ -200,24 +204,32 @@ oper
-- regADeg a = compADeg (regA a) ;
regA : Str -> A ;
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ;
lock_A = <>} ;
regA a = compADeg (lin A {s = \\_ => (mkAdjReg a).s ; isPre = False ; copTyp = serCopula}) ;
mk2A : (único,unicamente : Str) -> A ;
mk2A adj adv = compADeg {s = \\_ => (mkAdj2 adj adv).s ; isPre = False ;
copTyp = serCopula ;
lock_A = <>} ;
mk5A : (preto,preta,pretos,pretas,pretamente : Str) -> A ;
mk5A a b c d e = compADeg {s = \\_ => (mkAdj a b c d e).s ;
isPre = False ; lock_A = <>} ;
isPre = False ; copTyp = serCopula ;
lock_A = <>} ;
adjCopula : A -> CopulaType -> A ;
adjCopula a cop = a ** {copTyp = cop} ;
mkADeg : A -> A -> A ;
mkADeg a b = {s = table {Posit => a.s ! Posit ;
_ => b.s ! Posit
-- Compar => b.s ! Posit ;
-- Superl => "o" ++ b.s ! Posit ;
} ;
isPre = a.isPre ; lock_A = <>} ;
mkADeg a b = lin A {
s = table {
Posit => a.s ! Posit ;
_ => b.s ! Posit
-- Compar => b.s ! Posit ;
-- Superl => "o" ++ b.s ! Posit ;
} ;
isPre = a.isPre ;
copTyp = a.copTyp
} ;
mkNonInflectA : A -> Str -> A ;
mkNonInflectA = \blanco,hueso -> blanco ** {s = \\x,y => blanco.s ! x ! y ++ hueso } ;
@@ -245,7 +257,10 @@ oper
= mkADeg ;
mkA : (blanco : A) -> (hueso : Str) -> A -- noninflecting component after the adjective
= mkNonInflectA ;
= mkNonInflectA ;
mkA : A -> CopulaType -> A -- force copula type
= adjCopula ;
} ;
-- The functions above create postfix adjectives. To switch them to
@@ -256,7 +271,7 @@ oper
prefixA = prefA ;
prefA : A -> A ;
prefA a = {s = a.s ; isPre = True ; lock_A = <>} ;
prefA a = lin A {s = a.s ; isPre = True ; copTyp = a.copTyp} ;
--3 Two-place adjectives
--
@@ -320,7 +335,7 @@ oper
"or" | "ôr" => pôr_Besch ;
_ => comprar_Besch -- hole
}
in verboV (paradigm v) ;
in lin V (verboV (paradigm v)) ;
mkV = overload {
--- [ ] update
@@ -345,8 +360,8 @@ oper
-- "Bescherelle" book. To use them in the category $V$, wrap them with
-- the function
mkV : Verbum -> V = -- import verb constructed with BeschPor
verboV ;
mkV : Verbum -> V = \v -> -- import verb constructed with BeschPor
lin V (verboV v) ;
-- particle verb
mkV : V -> Str -> V =
@@ -516,6 +531,6 @@ oper
isPol = False ;
isNeg = False} ** {lock_NP = <>} ;
reflVerboV : Verbum -> V = \ve -> reflV (verboV ve) ;
reflVerboV : Verbum -> V = \ve -> reflV (lin V (verboV ve)) ;
} ;