romanian_modified

This commit is contained in:
ra.monique
2009-09-14 01:33:06 +00:00
parent a81def4168
commit 18d01be869
15 changed files with 928 additions and 938 deletions

View File

@@ -1,11 +1,10 @@
resource BeschRon = open Prelude, MorphoRon,CatRon in {
flags optimize=noexpand ; -- faster and smaller than =all
flags optimize=noexpand ;
oper VerbeN = {s: VForm => Str ; isRefl : Agr => RAgr; nrClit : VClit} ;
oper mkNV : Verbe -> V = \ve -> {s = ve.s ; isRefl = \\_ => RNoAg ; nrClit = VNone ;lock_V = <> } ;
oper mkRVAcc : Verbe -> V = \ve -> {s = ve.s ; isRefl = \\a => aRefl a; nrClit = VRefl ;lock_V = <>} ;
oper mkRVDat : Verbe -> V = \ve -> {s = ve.s ; isRefl = \\a => dRefl a; nrClit = VRefl ;lock_V = <>};
oper mkNV : Verbe -> V = \ve -> {s = ve.s ; isRefl = \\_ => RNoAg ; nrClit = VNone; pReflClit = Composite ;lock_V = <> } ;
oper mkRVAcc : Verbe -> V = \ve -> {s = ve.s ; isRefl = \\a => aRefl a; nrClit = VRefl; pReflClit = Short ;lock_V = <>} ;
oper mkRVDat : Verbe -> V = \ve -> {s = ve.s ; isRefl = \\a => dRefl a; nrClit = VRefl; pReflClit = Composite ;lock_V = <>};
-- for Group 1 - verbs ending in a (last sylablle) - the default behaviour is conjugation with "ez"
-- with small mutation, depending on the second last letter (80 % verbs - especially neological)
@@ -23,149 +22,146 @@ oper mkRVDat : Verbe -> V = \ve -> {s = ve.s ; isRefl = \\a => dRefl a; nrClit =
oper conj : Str -> Verbe = mkV6 ;
oper v_besch6 : Str -> VerbeN = \s -> mkNV (mkV6 s) ;
oper v_besch7 : Str -> VerbeN = \s -> mkNV (mkV7 s) ;
oper v_besch8 : Str -> VerbeN = \s -> mkNV (mkV8 s) ;
oper v_besch9 : Str -> VerbeN = \s -> mkNV (mkV9 s) ;
oper v_besch10 : Str -> VerbeN = \s -> mkNV (mkV10 s) ;
oper v_besch11 : Str -> VerbeN = \s -> mkNV (mkV11 s) ;
oper v_besch12 : Str -> VerbeN = \s -> mkNV (mkV12 s) ;
oper v_besch13 : Str -> VerbeN = \s -> mkNV (mkV13 s) ;
oper v_besch14 : Str -> VerbeN = \s -> mkNV (mkV14 s) ;
oper v_besch15 : Str -> VerbeN = \s -> mkNV (mkV15 s) ;
oper v_besch16 : Str -> VerbeN = \s -> mkNV (mkV16 s) ;
oper v_besch17 : Str -> VerbeN = \s -> mkNV (mkV17 s) ;
oper v_besch18 : Str -> VerbeN = \s -> mkNV (mkV18 s) ;
oper v_besch19 : Str -> VerbeN = \s -> mkNV (mkV19 s) ;
oper v_besch20 : Str -> VerbeN = \s -> mkNV (mkV20 s) ;
oper v_besch21 : Str -> VerbeN = \s -> mkNV (mkV21 s) ;
oper v_besch22 : Str -> VerbeN = \s -> mkNV (mkV22 s) ;
oper v_besch23 : Str -> VerbeN = \s -> mkNV (mkV23 s) ;
oper v_besch24 : Str -> VerbeN = \s -> mkNV (mkV24 s) ;
oper v_besch25 : Str -> VerbeN = \s -> mkNV (mkV25 s) ;
oper v_besch26 : Str -> VerbeN = \s -> mkNV (mkV26 s) ;
oper v_besch27 : Str -> VerbeN = \s -> mkNV (mkV27 s) ;
oper v_besch28 : Str -> VerbeN = \s -> mkNV (mkV28 s) ;
oper v_besch29 : Str -> VerbeN = \s -> mkNV (mkV29 s) ;
oper v_besch30 : Str -> VerbeN = \s -> mkNV (mkV30 s) ;
oper v_besch31 : Str -> VerbeN = \s -> mkNV (mkV31 s) ;
oper v_besch32 : Str -> VerbeN = \s -> mkNV (mkV32 s) ;
oper v_besch33 : Str -> VerbeN = \s -> mkNV (mkV33 s) ;
oper v_besch34 : Str -> VerbeN = \s -> mkNV (mkV34 s) ;
oper v_besch35 : Str -> VerbeN = \s -> mkNV (mkV35 s) ;
oper v_besch36 : Str -> VerbeN = \s -> mkNV (mkV36 s) ;
oper v_besch37 : Str -> VerbeN = \s -> mkNV (mkV37 s) ;
oper v_besch38 : Str -> VerbeN = \s -> mkNV (mkV38 s) ;
oper v_besch39 : Str -> VerbeN = \s -> mkNV (mkV39 s) ;
oper v_besch40 : Str -> VerbeN = \s -> mkNV (mkV40 s) ;
oper v_besch41 : Str -> VerbeN = \s -> mkNV (mkV41 s) ;
oper v_besch42 : Str -> VerbeN = \s -> mkNV (mkV42 s) ;
oper v_besch43 : Str -> VerbeN = \s -> mkNV (mkV43 s) ;
oper v_besch44 : Str -> VerbeN = \s -> mkNV (mkV44 s) ;
oper v_besch45 : Str -> VerbeN = \s -> mkNV (mkV45 s) ;
oper v_besch46 : Str -> VerbeN = \s -> mkNV (mkV46 s) ;
oper v_besch47 : Str -> VerbeN = \s -> mkNV (mkV47 s) ;
oper v_besch48 : Str -> VerbeN = \s -> mkNV (mkV48 s) ;
oper v_besch49 : Str -> VerbeN = \s -> mkNV (mkV49 s) ;
oper v_besch50 : Str -> VerbeN = \s -> mkNV (mkV50 s) ;
oper v_besch51 : Str -> VerbeN = \s -> mkNV (mkV51 s) ;
oper v_besch52 : Str -> VerbeN = \s -> mkNV (mkV52 s) ;
oper v_besch53 : Str -> VerbeN = \s -> mkNV (mkV53 s) ;
oper v_besch54 : Str -> VerbeN = \s -> mkNV (mkV54 s) ;
oper v_besch55 : Str -> VerbeN = \s -> mkNV (mkV55 s) ;
oper v_besch56 : Str -> VerbeN = \s -> mkNV (mkV56 s) ;
oper v_besch57 : Str -> VerbeN = \s -> mkNV (mkV57 s) ;
oper v_besch58 : Str -> VerbeN = \s -> mkNV (mkV58 s) ;
oper v_besch59 : Str -> VerbeN = \s -> mkNV (mkV59 s) ;
oper v_besch60 : Str -> VerbeN = \s -> mkNV (mkV60 s) ;
oper v_besch61 : Str -> VerbeN = \s -> mkNV (mkV61 s) ;
oper v_besch62 : Str -> VerbeN = \s -> mkNV (mkV62 s) ;
--oper v_besch63 : Str -> VerbeN = \s -> mkNV (mkV63 s) ;
oper v_besch64 : Str -> VerbeN = \s -> mkNV (mkV64 s) ;
oper v_besch65 : Str -> VerbeN = \s -> mkNV (mkV65 s) ;
oper v_besch66 : Str -> VerbeN = \s -> mkNV (mkV66 s) ;
oper v_besch67 : Str -> VerbeN = \s -> mkNV (mkV67 s) ;
oper v_besch68 : Str -> VerbeN = \s -> mkNV (mkV68 s) ;
oper v_besch69 : Str -> VerbeN = \s -> mkNV (mkV69 s) ;
oper v_besch70 : Str -> VerbeN = \s -> mkNV (mkV70 s) ;
oper v_besch71 : Str -> VerbeN = \s -> mkNV (mkV71 s) ;
oper v_besch72 : Str -> VerbeN = \s -> mkNV (mkV72 s) ;
oper v_besch73 : Str -> VerbeN = \s -> mkNV (mkV73 s) ;
oper v_besch74 : Str -> VerbeN = \s -> mkNV (mkV74 s) ;
--oper v_besch75 : Str -> VerbeN = \s -> mkNV (mkV75 s) ;
oper v_besch76 : Str -> VerbeN = \s -> mkNV (mkV76 s) ;
oper v_besch77 : Str -> VerbeN = \s -> mkNV (mkV77 s) ;
oper v_besch78 : Str -> VerbeN = \s -> mkNV (mkV78 s) ;
oper v_besch79 : Str -> VerbeN = \s -> mkNV (mkV79 s) ;
oper v_besch80 : Str -> VerbeN = \s -> mkNV (mkV80 s) ;
oper v_besch81 : Str -> VerbeN = \s -> mkNV (mkV81 s) ;
oper v_besch82 : Str -> VerbeN = \s -> mkNV (mkV82 s) ;
oper v_besch83 : Str -> VerbeN = \s -> mkNV (mkV83 s) ;
oper v_besch84 : Str -> VerbeN = \s -> mkNV (mkV84 s) ;
oper v_besch85 : Str -> VerbeN = \s -> mkNV (mkV85 s) ;
oper v_besch86 : Str -> VerbeN = \s -> mkNV (mkV86 s) ;
oper v_besch87 : Str -> VerbeN = \s -> mkNV (mkV87 s) ;
oper v_besch88 : Str -> VerbeN = \s -> mkNV (mkV88 s) ;
oper v_besch89 : Str -> VerbeN = \s -> mkNV (mkV89 s) ;
oper v_besch90 : Str -> VerbeN = \s -> mkNV (mkV90 s) ;
oper v_besch91 : Str -> VerbeN = \s -> mkNV (mkV91 s) ;
oper v_besch92 : Str -> VerbeN = \s -> mkNV (mkV92 s) ;
oper v_besch93 : Str -> VerbeN = \s -> mkNV (mkV93 s) ;
oper v_besch94 : Str -> VerbeN = \s -> mkNV (mkV94 s) ;
oper v_besch95 : Str -> VerbeN = \s -> mkNV (mkV95 s) ;
oper v_besch96 : Str -> VerbeN = \s -> mkNV (mkV96 s) ;
oper v_besch97 : Str -> VerbeN = \s -> mkNV (mkV97 s) ;
oper v_besch98 : Str -> VerbeN = \s -> mkNV (mkV98 s) ;
oper v_besch99 : Str -> VerbeN = \s -> mkNV (mkV99 s) ;
oper v_besch100 : Str -> VerbeN = \s -> mkNV (mkV100 s) ;
oper v_besch101 : Str -> VerbeN = \s -> mkNV (mkV101 s) ;
oper v_besch102 : Str -> VerbeN = \s -> mkNV (mkV102 s) ;
oper v_besch103 : Str -> VerbeN = \s -> mkNV (mkV103 s) ;
oper v_besch104 : Str -> VerbeN = \s -> mkNV (mkV104 s) ;
oper v_besch105 : Str -> VerbeN = \s -> mkNV (mkV105 s) ;
oper v_besch106 : Str -> VerbeN = \s -> mkNV (mkV106 s) ;
--oper v_besch107 : Str -> VerbeN = \s -> mkNV (mkV107 s) ;
oper v_besch108 : Str -> VerbeN = \s -> mkNV (mkV108 s) ;
oper v_besch109 : Str -> VerbeN = \s -> mkNV (mkV109 s) ;
oper v_besch110 : Str -> VerbeN = \s -> mkNV (mkV110 s) ;
--oper v_besch111 : Str -> VerbeN = \s -> mkNV (mkV111 s) ;
oper v_besch112 : Str -> VerbeN = \s -> mkNV (mkV112 s) ;
oper v_besch113 : Str -> VerbeN = \s -> mkNV (mkV113 s) ;
--oper v_besch114 : Str -> VerbeN = \s -> mkNV (mkV114 s) ;
oper v_besch115 : Str -> VerbeN = \s -> mkNV (mkV115 s) ;
oper v_besch116 : Str -> VerbeN = \s -> mkNV (mkV116 s) ;
oper v_besch117 : Str -> VerbeN = \s -> mkNV (mkV117 s) ;
oper v_besch118 : Str -> VerbeN = \s -> mkNV (mkV118 s) ;
oper v_besch119 : Str -> VerbeN = \s -> mkNV (mkV119 s) ;
oper v_besch120 : Str -> VerbeN = \s -> mkNV (mkV120 s) ;
oper v_besch121 : Str -> VerbeN = \s -> mkNV (mkV121 s) ;
oper v_besch122 : Str -> VerbeN = \s -> mkNV (mkV122 s) ;
oper v_besch123 : Str -> VerbeN = \s -> mkNV (mkV123 s) ;
oper v_besch124 : Str -> VerbeN = \s -> mkNV (mkV124 s) ;
oper v_besch125 : Str -> VerbeN = \s -> mkNV (mkV125 s) ;
oper v_besch126 : Str -> VerbeN = \s -> mkNV (mkV126 s) ;
oper v_besch127 : Str -> VerbeN = \s -> mkNV (mkV127 s) ;
oper v_besch128 : Str -> VerbeN = \s -> mkNV (mkV128 s) ;
oper v_besch129 : Str -> VerbeN = \s -> mkNV (mkV129 s) ;
oper v_besch130 : Str -> VerbeN = \s -> mkNV (mkV130 s) ;
oper v_besch131 : Str -> VerbeN = \s -> mkNV (mkV131 s) ;
oper v_besch132 : Str -> VerbeN = \s -> mkNV (mkV132 s) ;
oper v_besch133 : Str -> VerbeN = \s -> mkNV (mkV133 s) ;
oper v_besch134 : Str -> VerbeN = \s -> mkNV (mkV134 s) ;
oper v_besch135 : Str -> VerbeN = \s -> mkNV (mkV135 s) ;
oper v_besch136 : Str -> VerbeN = \s -> mkNV (mkV136 s) ;
oper v_besch137 : Str -> VerbeN = \s -> mkNV (mkV137 s) ;
oper v_besch138 : Str -> VerbeN = \s -> mkNV (mkV138 s) ;
oper v_besch139 : Str -> VerbeN = \s -> mkNV (mkV139 s) ;
oper v_besch140 : Str -> VerbeN = \s -> mkNV (mkV140 s) ;
oper v_besch141 : Str -> VerbeN = \s -> mkNV (mkV141 s) ;
oper v_besch142 : Str -> VerbeN = \s -> mkNV (mkV142 s) ;
oper v_besch143 : Str -> VerbeN = \s -> mkNV (mkV143 s) ;
oper v_besch144 : Str -> VerbeN = \s -> mkNV (mkV144 s) ;
oper v_have : VerbeN = mkNV (mkV1 "avea") ;
oper v_besch6 : Str -> V = \s -> mkNV (mkV6 s) ;
oper v_besch7 : Str -> V = \s -> mkNV (mkV7 s) ;
oper v_besch8 : Str -> V = \s -> mkNV (mkV8 s) ;
oper v_besch9 : Str -> V = \s -> mkNV (mkV9 s) ;
oper v_besch10 : Str -> V = \s -> mkNV (mkV10 s) ;
oper v_besch11 : Str -> V = \s -> mkNV (mkV11 s) ;
oper v_besch12 : Str -> V = \s -> mkNV (mkV12 s) ;
oper v_besch13 : Str -> V = \s -> mkNV (mkV13 s) ;
oper v_besch14 : Str -> V = \s -> mkNV (mkV14 s) ;
oper v_besch15 : Str -> V = \s -> mkNV (mkV15 s) ;
oper v_besch16 : Str -> V = \s -> mkNV (mkV16 s) ;
oper v_besch17 : Str -> V = \s -> mkNV (mkV17 s) ;
oper v_besch18 : Str -> V = \s -> mkNV (mkV18 s) ;
oper v_besch19 : Str -> V = \s -> mkNV (mkV19 s) ;
oper v_besch20 : Str -> V = \s -> mkNV (mkV20 s) ;
oper v_besch21 : Str -> V = \s -> mkNV (mkV21 s) ;
oper v_besch22 : Str -> V = \s -> mkNV (mkV22 s) ;
oper v_besch23 : Str -> V = \s -> mkNV (mkV23 s) ;
oper v_besch24 : Str -> V = \s -> mkNV (mkV24 s) ;
oper v_besch25 : Str -> V = \s -> mkNV (mkV25 s) ;
oper v_besch26 : Str -> V = \s -> mkNV (mkV26 s) ;
oper v_besch27 : Str -> V = \s -> mkNV (mkV27 s) ;
oper v_besch28 : Str -> V = \s -> mkNV (mkV28 s) ;
oper v_besch29 : Str -> V = \s -> mkNV (mkV29 s) ;
oper v_besch30 : Str -> V = \s -> mkNV (mkV30 s) ;
oper v_besch31 : Str -> V = \s -> mkNV (mkV31 s) ;
oper v_besch32 : Str -> V = \s -> mkNV (mkV32 s) ;
oper v_besch33 : Str -> V = \s -> mkNV (mkV33 s) ;
oper v_besch34 : Str -> V = \s -> mkNV (mkV34 s) ;
oper v_besch35 : Str -> V = \s -> mkNV (mkV35 s) ;
oper v_besch36 : Str -> V = \s -> mkNV (mkV36 s) ;
oper v_besch37 : Str -> V = \s -> mkNV (mkV37 s) ;
oper v_besch38 : Str -> V = \s -> mkNV (mkV38 s) ;
oper v_besch39 : Str -> V = \s -> mkNV (mkV39 s) ;
oper v_besch40 : Str -> V = \s -> mkNV (mkV40 s) ;
oper v_besch41 : Str -> V = \s -> mkNV (mkV41 s) ;
oper v_besch42 : Str -> V = \s -> mkNV (mkV42 s) ;
oper v_besch43 : Str -> V = \s -> mkNV (mkV43 s) ;
oper v_besch44 : Str -> V = \s -> mkNV (mkV44 s) ;
oper v_besch45 : Str -> V = \s -> mkNV (mkV45 s) ;
oper v_besch46 : Str -> V = \s -> mkNV (mkV46 s) ;
oper v_besch47 : Str -> V = \s -> mkNV (mkV47 s) ;
oper v_besch48 : Str -> V = \s -> mkNV (mkV48 s) ;
oper v_besch49 : Str -> V = \s -> mkNV (mkV49 s) ;
oper v_besch50 : Str -> V = \s -> mkNV (mkV50 s) ;
oper v_besch51 : Str -> V = \s -> mkNV (mkV51 s) ;
oper v_besch52 : Str -> V = \s -> mkNV (mkV52 s) ;
oper v_besch53 : Str -> V = \s -> mkNV (mkV53 s) ;
oper v_besch54 : Str -> V = \s -> mkNV (mkV54 s) ;
oper v_besch55 : Str -> V = \s -> mkNV (mkV55 s) ;
oper v_besch56 : Str -> V = \s -> mkNV (mkV56 s) ;
oper v_besch57 : Str -> V = \s -> mkNV (mkV57 s) ;
oper v_besch58 : Str -> V = \s -> mkNV (mkV58 s) ;
oper v_besch59 : Str -> V = \s -> mkNV (mkV59 s) ;
oper v_besch60 : Str -> V = \s -> mkNV (mkV60 s) ;
oper v_besch61 : Str -> V = \s -> mkNV (mkV61 s) ;
oper v_besch62 : Str -> V = \s -> mkNV (mkV62 s) ;
--oper v_besch63 : Str -> V = \s -> mkNV (mkV63 s) ;
oper v_besch64 : Str -> V = \s -> mkNV (mkV64 s) ;
oper v_besch65 : Str -> V = \s -> mkNV (mkV65 s) ;
oper v_besch66 : Str -> V = \s -> mkNV (mkV66 s) ;
oper v_besch67 : Str -> V = \s -> mkNV (mkV67 s) ;
oper v_besch68 : Str -> V = \s -> mkNV (mkV68 s) ;
oper v_besch69 : Str -> V = \s -> mkNV (mkV69 s) ;
oper v_besch70 : Str -> V = \s -> mkNV (mkV70 s) ;
oper v_besch71 : Str -> V = \s -> mkNV (mkV71 s) ;
oper v_besch72 : Str -> V = \s -> mkNV (mkV72 s) ;
oper v_besch73 : Str -> V = \s -> mkNV (mkV73 s) ;
oper v_besch74 : Str -> V = \s -> mkNV (mkV74 s) ;
--oper v_besch75 : Str -> V = \s -> mkNV (mkV75 s) ;
oper v_besch76 : Str -> V = \s -> mkNV (mkV76 s) ;
oper v_besch77 : Str -> V = \s -> mkNV (mkV77 s) ;
oper v_besch78 : Str -> V = \s -> mkNV (mkV78 s) ;
oper v_besch79 : Str -> V = \s -> mkNV (mkV79 s) ;
oper v_besch80 : Str -> V = \s -> mkNV (mkV80 s) ;
oper v_besch81 : Str -> V = \s -> mkNV (mkV81 s) ;
oper v_besch82 : Str -> V = \s -> mkNV (mkV82 s) ;
oper v_besch83 : Str -> V = \s -> mkNV (mkV83 s) ;
oper v_besch84 : Str -> V = \s -> mkNV (mkV84 s) ;
oper v_besch85 : Str -> V = \s -> mkNV (mkV85 s) ;
oper v_besch86 : Str -> V = \s -> mkNV (mkV86 s) ;
oper v_besch87 : Str -> V = \s -> mkNV (mkV87 s) ;
oper v_besch88 : Str -> V = \s -> mkNV (mkV88 s) ;
oper v_besch89 : Str -> V = \s -> mkNV (mkV89 s) ;
oper v_besch90 : Str -> V = \s -> mkNV (mkV90 s) ;
oper v_besch91 : Str -> V = \s -> mkNV (mkV91 s) ;
oper v_besch92 : Str -> V = \s -> mkNV (mkV92 s) ;
oper v_besch93 : Str -> V = \s -> mkNV (mkV93 s) ;
oper v_besch94 : Str -> V = \s -> mkNV (mkV94 s) ;
oper v_besch95 : Str -> V = \s -> mkNV (mkV95 s) ;
oper v_besch96 : Str -> V = \s -> mkNV (mkV96 s) ;
oper v_besch97 : Str -> V = \s -> mkNV (mkV97 s) ;
oper v_besch98 : Str -> V = \s -> mkNV (mkV98 s) ;
oper v_besch99 : Str -> V = \s -> mkNV (mkV99 s) ;
oper v_besch100 : Str -> V = \s -> mkNV (mkV100 s) ;
oper v_besch101 : Str -> V = \s -> mkNV (mkV101 s) ;
oper v_besch102 : Str -> V = \s -> mkNV (mkV102 s) ;
oper v_besch103 : Str -> V = \s -> mkNV (mkV103 s) ;
oper v_besch104 : Str -> V = \s -> mkNV (mkV104 s) ;
oper v_besch105 : Str -> V = \s -> mkNV (mkV105 s) ;
oper v_besch106 : Str -> V = \s -> mkNV (mkV106 s) ;
--oper v_besch107 : Str -> V = \s -> mkNV (mkV107 s) ;
oper v_besch108 : Str -> V = \s -> mkNV (mkV108 s) ;
oper v_besch109 : Str -> V = \s -> mkNV (mkV109 s) ;
oper v_besch110 : Str -> V = \s -> mkNV (mkV110 s) ;
--oper v_besch111 : Str -> V = \s -> mkNV (mkV111 s) ;
oper v_besch112 : Str -> V = \s -> mkNV (mkV112 s) ;
oper v_besch113 : Str -> V = \s -> mkNV (mkV113 s) ;
--oper v_besch114 : Str -> V = \s -> mkNV (mkV114 s) ;
oper v_besch115 : Str -> V = \s -> mkNV (mkV115 s) ;
oper v_besch116 : Str -> V = \s -> mkNV (mkV116 s) ;
oper v_besch117 : Str -> V = \s -> mkNV (mkV117 s) ;
oper v_besch118 : Str -> V = \s -> mkNV (mkV118 s) ;
oper v_besch119 : Str -> V = \s -> mkNV (mkV119 s) ;
oper v_besch120 : Str -> V = \s -> mkNV (mkV120 s) ;
oper v_besch121 : Str -> V = \s -> mkNV (mkV121 s) ;
oper v_besch122 : Str -> V = \s -> mkNV (mkV122 s) ;
oper v_besch123 : Str -> V = \s -> mkNV (mkV123 s) ;
oper v_besch124 : Str -> V = \s -> mkNV (mkV124 s) ;
oper v_besch125 : Str -> V = \s -> mkNV (mkV125 s) ;
oper v_besch126 : Str -> V = \s -> mkNV (mkV126 s) ;
oper v_besch127 : Str -> V = \s -> mkNV (mkV127 s) ;
oper v_besch128 : Str -> V = \s -> mkNV (mkV128 s) ;
oper v_besch129 : Str -> V = \s -> mkNV (mkV129 s) ;
oper v_besch130 : Str -> V = \s -> mkNV (mkV130 s) ;
oper v_besch131 : Str -> V = \s -> mkNV (mkV131 s) ;
oper v_besch132 : Str -> V = \s -> mkNV (mkV132 s) ;
oper v_besch133 : Str -> V = \s -> mkNV (mkV133 s) ;
oper v_besch134 : Str -> V = \s -> mkNV (mkV134 s) ;
oper v_besch135 : Str -> V = \s -> mkNV (mkV135 s) ;
oper v_besch136 : Str -> V = \s -> mkNV (mkV136 s) ;
oper v_besch137 : Str -> V = \s -> mkNV (mkV137 s) ;
oper v_besch138 : Str -> V = \s -> mkNV (mkV138 s) ;
oper v_besch139 : Str -> V = \s -> mkNV (mkV139 s) ;
oper v_besch140 : Str -> V = \s -> mkNV (mkV140 s) ;
oper v_besch141 : Str -> V = \s -> mkNV (mkV141 s) ;
oper v_besch142 : Str -> V = \s -> mkNV (mkV142 s) ;
oper v_besch143 : Str -> V = \s -> mkNV (mkV143 s) ;
oper v_besch144 : Str -> V = \s -> mkNV (mkV144 s) ;
oper v_have : V = mkNV (mkV1 "avea") ;
}

View File

@@ -15,98 +15,85 @@ concrete CatRon of Cat =
S = {s : Mood => Str} ;
QS = {s : QForm => Str} ;
RS = {s : Mood => Agr => Str ; c : NCase} ;
SSlash = {
s : AAgr => Mood => Str ;
c2 : Compl
} ;
SSlash = {s : AAgr => Mood => Str ;
c2 : Compl} ;
-- Sentence
Cl = {s : Direct => RTense => Anteriority => Polarity => Mood => Str} ;
ClSlash = {
s : AAgr => Direct => RTense => Anteriority => Polarity => Mood => Str ;
c2 : Compl
} ;
ClSlash = {s : Bool => AAgr => Direct => RTense => Anteriority => Polarity => Mood => Str ;
c2 : Compl} ;
Imp = {s : Polarity => ImpForm => Gender => Str} ;
-- Relative
RCl = {
s : Agr => RTense => Anteriority => Polarity => Mood => Str ;
c : NCase
} ;
RCl = {s : Agr => RTense => Anteriority => Polarity => Mood => Str ;
c : NCase } ;
RP = {s : AAgr => NCase => Str ; a : AAgr ; hasAgr : Bool; hasRef : Bool} ;
-- Verb
VP = {
s : VForm => Str ;
isRefl : Agr => RAgr ;
nrClit : VClit ;
isFemSg : Bool ; -- needed for the correct placement of the Accusative clitic
neg : Polarity => Str ; -- ne-pas not needed - just "nu"
clAcc : RAgr ; -- le/se -- not needed if they are used in the noun
clDat : RAgr ; -- lui -- not needed if they are used in the noun
comp : Agr => Str ; -- content(e) ; à ma mère ; hier -
ext : Polarity => Str ; -- que je dors / que je dorme - so that it always comes after all the complements
} ;
VPSlash = VP ** {c2 : Compl; needAgr : Bool} ;
-- Comp = {s : Agr => Str} ;
VP = ResRon.VerbPhrase ;
VPSlash = ResRon.VerbPhrase ** {c2 : Compl; needAgr : Bool; needClit : Bool} ;
-- Adjective
AP = {s : AForm => Str ; isPre : Bool} ;
AP = {s : AForm => Str ; isPre : Bool} ;
-- Noun
lincat
CN = {s : Number => Species => ACase => Str; g : NGender; a : Animacy } ;
Pron = {s : NCase => Str ;
c1, c2 : Clitics => Str ;
a : Agr ;
poss : Number => Gender => Str
} ;
poss : Number => Gender => Str } ;
NP = NounPhrase ;
--NCase because of the pronoun
Det = {s : Gender => NCase => Str ; n : Number ;
isDef : Bool ;
post : Gender => NCase => Str ;
sp : Gender => NCase => Str ; -- pentru Lexicon e aceeasi forma totusi ! posibil
-- probabil pentru ca orice Quant -> Det
size : Str ; --because of the numerals
hasRef : Bool
};
Det = {s : Gender => NCase => Str ; n : Number ;
isDef : Bool ;
post : Gender => NCase => Str ;
sp : Gender => NCase => Str ;
size : Str ; --because of the numerals
hasRef : Bool };
Predet = {s : AAgr => ACase => Str ; c : NCase} ;
-- Art = {s : Bool => Number => Gender => NCase => Str ; isDef : Bool } ;
Quant = {
s : Bool => Number => Gender => ACase => Str ;
sp : Number => Gender => ACase => Str ; -- diferente si in Lexicon, ex : acesta, aceasta
isDef : Bool ;
isPost : Bool ;
hasRef : Bool
};
Quant = {s : Bool => Number => Gender => ACase => Str ;
sp : Number => Gender => ACase => Str ;
isDef : Bool ;
isPost : Bool ;
hasRef : Bool };
-- Numeral
Numeral = {s : ACase => CardOrd => NumF => Str ;
sp : ACase => CardOrd => NumF => Str ; size : Size } ;
Digits = {s : CardOrd => Str ; n : Size ; isDig : Bool} ;
Num = {s : Gender => Str ; sp : Gender => Str ;
isNum : Bool ; n : Number; size : Str } ;
Card = {s : Gender => Str ; sp : Gender => Str ;
n : Number; size : Size} ;
Ord = {s : Number => Gender => NCase => Str; isPre : Bool} ;
--Question
-- Question
QCl = {s : RTense => Anteriority => Polarity => QForm => Str} ;
IComp = {s : AAgr => Str} ;
IDet = {s : Gender => ACase => Str ; n : Number} ;
IQuant = {s : Number => Gender => ACase => Str } ;
IP = {s : NCase => Str ; a : AAgr ; hasRef : Bool} ;
-- Structural
Conj = {s1,s2 : Str ; n : Number} ;
@@ -114,25 +101,37 @@ concrete CatRon of Cat =
Prep = {s : Str ; c : NCase ; isDir : PrepDir ; needIndef : Bool ; prepDir : Str} ;
-- Open lexical classes, e.g. Lexicon
--Verb = {s : VForm => Str } ;
V ={s : VForm => Str ; isRefl : Agr => RAgr; nrClit : VClit} ;
VQ, VA = V ;
V2,V2S, V2Q = V ** {c2 : Compl} ;
V3,V2A, V2V = V ** {c2,c3 : Compl} ;
VS = V ** {m : Polarity => Mood} ;
VV = V ** {c2 : Agr => Str} ;
V = ResRon.Verb;
VQ, VA = ResRon.Verb ;
V2,V2S, V2Q = ResRon.Verb ** {c2 : Compl} ;
V3,V2A, V2V = ResRon.Verb ** {c2,c3 : Compl} ;
VS = ResRon.Verb ** {m : Polarity => Mood} ;
VV = ResRon.Verb ** {c2 : Agr => Str} ;
A = {s : AForm => Str ; isPre : Bool} ;
A2 = {s : AForm => Str ; c2 : Compl} ;
N = Noun ;
N2 = Noun ** {c2 : Compl} ;
N3 = Noun ** {c2,c3 : Compl} ;
PN = {s : NCase => Str ; g : Gender ; n : Number; a : Animacy} ;
Comp = {s : Agr => Str} ;
Temp = {s : Str ; t : RTense ; a : Anteriority} ;
Tense = {s : Str ; t : RTense} ;
lin
TTAnt t a = {s = a.s ++ t.s ; a = a.a ; t = t.t} ;
TPres = {s = []} ** {t = RPres} ;
@@ -146,6 +145,7 @@ concrete CatRon of Cat =
oper
aagr : Gender -> Number -> AAgr = \g,n ->
{g = g ; n = n} ;
agrP3 : Gender -> Number -> Agr = \g,n ->
aagr g n ** {p = P3} ;
@@ -162,10 +162,8 @@ oper
} ;
--Conjuctions
conjThan : Str = "decât" ;
conjThat : Str = "cã" ;
}

View File

@@ -5,15 +5,15 @@ concrete GrammarRon of Grammar =
VerbRon,
AdjectiveRon,
AdverbRon,
NumeralRon,
NumeralRonn,
SentenceRon,
IdiomRon,
QuestionRon,
RelativeRon,
ConjunctionRon,
PhraseRon,
TextX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond], Coordination,
Prelude, MorphoRon, BeschRon,
TextX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond],
Prelude, MorphoRon, Coordination,
StructuralRon
** {

View File

@@ -1,4 +1,4 @@
incomplete concrete IdiomRon of Idiom =
concrete IdiomRon of Idiom =
-- CatRon ** open (P = ParamX), MorphoRon, ParadigmsRon,Prelude
CatRon ** open Prelude, ResRon
in {
@@ -8,36 +8,35 @@ in {
lin
ImpersCl vp = mkClause "" True (agrP3 Masc Sg) vp ;
GenericCl vp = mkClause "" True (agrP3 Masc Sg) vp ; -- an exact correspondent does not exist !
ImpersCl vp = mkClause "" (agrP3 Masc Sg) vp ;
GenericCl vp = mkClause "" (agrP3 Masc Sg) vp ; -- an exact correspondent does not exist !
ExistNP np =
mkClause "" True np.a (insertSimpObj (\\ag => (np.s ! No ).comp) (UseV copula)) ;
mkClause "" np.a (insertSimpObj (\\ag => (np.s ! No ).comp) copula) ;
-- v_besch20 "exista"
ExistIP ip = {
ExistIP ip = {
s = \\t,a,p,_ =>
ip.s ! No ++
(mkClause "" True (agrP3 (ip.a.g) (ip.a.n))
(UseV copula)).s
(mkClause "" (agrP3 (ip.a.g) (ip.a.n))
copula).s
! DDir ! t ! a ! p ! Indic } ;
CleftNP np rs = mkClause "" True np.a
CleftNP np rs = mkClause "" np.a
(insertSimpObj (\\_ => rs.s ! Indic ! np.a)
(insertSimpObj (\\_ => (np.s ! rs.c).comp) (predV copula))) ;
(insertSimpObj (\\_ => (np.s ! rs.c).comp) copula)) ;
--need adverb for
CleftAdv ad s = mkClause "" True (agrP3 Masc Sg)
CleftAdv ad s = mkClause "" (agrP3 Masc Sg)
(insertSimpObj (\\_ => conjThat ++ s.s ! Indic)
(insertSimpObj (\\_ => ad.s) (predV copula))) ;
(insertSimpObj (\\_ => ad.s) copula)) ;
ProgrVP vp = vp; -- for the moment, since there is no particular way to express continuous action, except for the imperfect, which wouldn't work for all tenses
{-
ImpPl1 vpr = let vp = useVP vpr in {s =
(mkImperative False P1 vp).s ! Pos ! {n = Pl ; g = Masc} --- fem
} ;
-- insert clitics here also
-}
ImpPl1 vp = let a = {p = P1 ; n = Pl ; g = Masc} in
{ s = "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++vp.comp ! a ++ vp.ext ! Pos };
}

View File

@@ -1,4 +1,4 @@
--# -path=.:../abstract:../common:../prelude
--# -path=.:../romance:../abstract:../common
concrete LangRon of Lang =
GrammarRon,

View File

@@ -19,7 +19,7 @@ case <g,n,a> of
{ <Masc,Sg,ANomAcc> => case last bun of
{ "u" => bun + "l";
"e" => bun + "le";
"ã" => init bun + "a";
"ã" => bun + "l";
_ => bun + "ul"
};
<Masc,Sg,AGenDat> => case last bun of
@@ -57,41 +57,11 @@ case <g,n,a> of
<Fem,Pl,_> => buni + "lor"
};
--Undefined article (proclitical) --
--we keep the non-articled form of the noun and glue it with the article on syntactical level
oper artUndef : Gender -> Number -> NCase -> Str = \g,n,a ->
case <g,n,a> of
{<Masc,Sg,No> => "un"; <Masc,Sg,Ac> => "un" ; <Masc,Sg,Ge> => "unui"; <Masc,Sg,Da> => "unui" ;<_,_,Vo> => "" ;
<_,Pl,No> => "niºte"; <_,Pl,Ac> => "niºte"; <_,Pl,Da> => "unor"; <_,Pl,Ge> => "unor" ;
<Fem,Sg,No> => "o"; <Fem,Sg,Ac> => "o"; <Fem,Sg,Da> => "unei"; <Fem,Sg,Ge> => "unei"
};
--Articles
--possesive article
-- used for Cardinals and for Genitive case
oper artPos : Gender -> Number -> ACase -> Str = \g,n,c ->
case <g,n,c> of
{ <Masc,Sg,AGenDat> => "alui"; <Masc,Sg,_> => "al";
<Masc,Pl,AGenDat> => "alor"; <Masc,Pl,_> => "ai";
<Fem,Sg,AGenDat> => "alei"; <Fem,Sg,_> => "a";
<Fem,Pl,AGenDat> => "ale"; <Fem,Pl,_> => "ale"
};
--demonstrative article
-- used as Determined article in order to emphasise on the noun/adjective, and for Dative/Genitive for of ordinals
oper artDem : Gender -> Number -> ACase -> Str = \g,n,c ->
case <g,n,c> of
{<Masc,Sg,ANomAcc> => "cel"; <Masc,Pl,ANomAcc> => "cei"; <Masc,Sg,AGenDat> => "celui";
<Fem,Sg,ANomAcc> => "cea"; <Fem,Pl,ANomAcc> => "cele"; <Fem,Sg,AGenDat> => "celei";
<_,Pl,AGenDat> => "celor";
<Masc,Sg,AVoc> => "cel";
<Masc,Pl,AVoc> => "cei"; <Fem,Sg,AVoc> => "cea"; <Fem,Pl,AVoc> => "cele"
};
--flexion forms of a noun without article
@@ -541,7 +511,7 @@ mkSpecMut : Str -> Adj = \s ->
-- Gerund - 1 form
-- 2nd person Singular form for Imperative - 1 form
Verbe : Type = { s : VForm => Str};
verbAffixes :
Str-> (a,b,c,d: Number => Person => Str) -> Str -> Adj -> Str -> Str -> Verbe =
@@ -562,7 +532,7 @@ mkSpecMut : Str -> Adj = \s ->
} in
{s = t};
{-
-- syntactical verb :
-- obtains all the verb forms present in Romanian, based on the primitive forms found in Verbe
@@ -605,25 +575,8 @@ table {
TPPasse g n a d => vb.s ! (PPasse g n a d)
};
-- auxiliary for Past Composite (to have - as auxiliary) :
-}
pComp : Number => Person => Str = table {Sg => table {P1 => "am" ; P2 => "ai" ; P3 => "a"} ;
Pl => table {P1 => "am" ; P2 => "aþi"; P3 => "au"}
};
-- auxiliary for Future Simple :
pFut : Number => Person => Str = table {Sg => table {P1 => "voi" ; P2 => "vei" ; P3 => "va"} ;
Pl => table {P1 => "vom" ; P2 => "veþi"; P3 => "vor"}
};
--auxiliary for Condional Present :
pCond : Number => Person => Str = table {Sg => table {P1 => "aº" ; P2 => "ai" ; P3 => "ar"} ;
Pl => table {P1 => "am" ; P2 => "aþi"; P3 => "ar"}
};
-- make Reflexive verbe : ? with variants ?
-- syntactical category of reflexive verbs based on the primitive forms in Verbe
-- reflexive pronouns - full form
@@ -2357,7 +2310,7 @@ in
verbAffixes trebui (mkFromAffix root affixSgGr411 affixPlGr411)
(mkFromAffix root affixSgI4 affixPlI4) (mkFromAffix root affixSgPS8 affixPlPS8)
(mkFromAffix root affixSgPP8 affixPlPP8) (root +"iascã") (mkAdjReg (root + "it"))
(root + "ind") nonExist ;
(root + "ind") "" ;
--subGroup 12
mkV141 : Str -> Verbe = \uri ->
@@ -2410,47 +2363,7 @@ verbAffixes avea (mkTab root "am" "ai" "are" "au" affixPlGr21)
(mkFromAffix root affixSgPP2 affixPlPP2) "aibã" (mkAdjReg (root + "ut"))
(root + "ând") "ai" ;
--to be :
{-
mkV2 : Str -> Verbe = \fi ->
let root = init fi ;
pres : Number => Person => Str = table {Sg => table {P1 => "sunt"; P2 => "eºti"; P3 => "este"};
Pl => table {P1 => "suntem"; P2 => "sunteþi"; P3 => "sunt"}
};
ps : Number => Person => Str = table {Sg => table {P1 => "fusei"; P2 => "fuseºi"; P3 => "fuse"};
Pl => table {P1 => "fuserãm"; P2 => "fuserãþi"; P3 => "fuserã"}
};
pp : Number => Person => Str = table {Sg => table {P1 => "fusesem"; P2 => "fuseseºi"; P3 => "fusese"};
Pl => table {P1 => "fuseserãm"; P2 => "fuseserãþi"; P3 => "fuseserã"}
}
in
verbAffixes fi pres (mkFromAffix "er" affixSgI affixPlI) ps pp
-}
--------------Reflexive pronouns
oper reflPron : Number -> Person -> ACase -> Str =
\n,p,c -> case <n,p,c> of
{<Sg,P1,AGenDat> => "mie" ; <Sg,P1,_> => "mine";
<Sg,P2,AGenDat> => "þie" ; <Sg,P2,_> => "tine";
<_,P3,AGenDat> => "sieºi" ; <_,P3,_> => "sine" ;
<Pl,P1,AGenDat> => "nouã" ; <Pl,P1,_> => "noi" ;
<Pl,P2,AGenDat> => "vouã" ; <Pl,P2,_> => "voi"
};
oper reflPronHard : Gender -> Number -> Person -> Str =
\g,n,p -> case <g,n,p> of
{<Masc,Sg,P1> => "însumi" ; <Fem,Sg,P1> => "însãmi";
<Masc,Sg,P2> => "însuþi" ; <Fem,Sg,P2> => "însãþi";
<Masc,Sg,P3> => "însuºi" ; <Fem,Sg,P3> => "însãºi";
<Masc,Pl,P1> => "înºine" ; <Fem,Pl,P1> => "însene";
<Masc,Pl,P2> => "înºivã"; <Fem,Pl,P2> => "înseva";
<Masc,Pl,P3> => "înºiºi"; <Fem,Pl,P3> => "înseºi"
};
};

View File

@@ -1,4 +1,4 @@
incomplete concrete NounRon of Noun =
concrete NounRon of Noun =
CatRon ** open ResRon,Prelude in {
flags optimize=all_subs ;
@@ -182,7 +182,7 @@ in {
sp = \\a => adn.s ++ num.sp ! a ;
isNum = num.isNum ; n = num.n; size = num.size} ;
OrdSuperl adj = {s = \\n,g,c => artDem g n (convCase c) ++ more_CAdv.s ++ adj.s ! AF g n Indef (convCase c);
OrdSuperl adj = {s = \\n,g,c => artDem g n (convCase c) ++ "mai" ++ adj.s ! AF g n Indef (convCase c);
isPre = True;
};
@@ -298,25 +298,7 @@ in {
} ;
oper
agrGender : NGender -> Number -> Gender =
\ng,n ->
case <ng,n> of
{<NMasc,_> => Masc ;
<NFem,_> => Fem ;
<NNeut, Sg> => Masc ;
_ => Fem
};
oper getNumber : Size -> Number =
\n -> case n of
{sg => Sg;
_ => Pl };
oper getClit : Animacy -> Bool =
\a -> case a of
{Animate => True;
_ => False};
};
};

View File

@@ -1,14 +1,14 @@
concrete NumeralRon of Numeral = CatRon **
open MorphoRon, CatRon, Prelude in {
param DForm = unit | teen | ten | teen_inf ;
param Place = indep | attr ;
param DForm = unit | teen | ten | attr ;
lincat Digit = {s : CardOrd => DForm => Str ; size : Size} ;
lincat Sub10 = {s : CardOrd => DForm => Place => Str ; size : Size} ;
lincat Sub100 = {s : CardOrd => NumF => Place => Str ; size : Size} ;
lincat Sub1000 = {s : CardOrd => NumF => Place => Str ; size : Size} ;
lincat Sub1000000 = { s : CardOrd => NumF => Place => Str; size : Size } ;
lincat Digit = {s : NumF => CardOrd => DForm => Str ; size : Size} ;
lincat Sub10 = {s : NumF => CardOrd => DForm => Str ; size : Size} ;
lincat Sub100 = {s : NumF => CardOrd => Str ; size : Size} ;
lincat Sub1000 = {s : NumF => CardOrd => Str ; size : Size} ;
lincat Sub1000000 = { s : NumF => CardOrd => Str; size : Size } ;
@@ -21,9 +21,9 @@ oper mkOrdinalForm : Str -> Gender -> Str =
};
Fem => case two of
{ x + ("ã"|"u") => x +"a";
x + "ei" => two + "a";
x + "ii" => x + "ia" ;
x + "i" => x + "ea";
x + "ie" => x +"ia";
x + ("ii"|"îi") => x + "a" ;
x + "i" => two + "a";
x + "ie" => x +"a" ;
_ => two +"a"
}
@@ -34,8 +34,9 @@ oper mkOrdinal : Str -> Gender -> ACase -> Str =
\two, g, fl -> mkOrd (mkOrdinalForm two g) g fl;
oper mkOrd : Str -> Gender -> ACase -> Str =
\two, g, fl -> let cc = (artPos g Sg ANomAcc) ++ two
in
\two, g, fl -> let cc = variants{(artPos g Sg ANomAcc)++ two ;
(artDem g Sg ANomAcc) ++ "de-"+(artPos g Sg ANomAcc) ++ two
} in
case fl of
{ ANomAcc => cc ;
AGenDat => (artDem g Sg AGenDat)++"de-"+(artPos g Sg ANomAcc)++ two ;
@@ -44,29 +45,49 @@ oper mkOrd : Str -> Gender -> ACase -> Str =
oper mkNum : Str -> Str -> Str -> Str -> Digit =
\two -> \twelve -> \twenty -> \doispe -> mkNumVSpc two twelve twelve twenty two doispe doispe (mkOrdinalForm two Masc) (mkOrdinalForm two Fem);
\two -> \twelve -> \twenty -> \doispe -> mkNumVSpc two twelve twelve twenty two doispe doispe two (mkOrdinalForm two Fem);
oper mkNumVSpc : Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Digit =
\two -> \twelve -> \douasprezece -> \twenty -> \dou -> \doispe -> \douaspe -> \doilea -> \doua ->
{s = table {
NCard Masc => table {unit => two ; teen => twelve ;
ten => twenty ; teen_inf => doispe
} ;
NCard Fem => table {unit => dou ; teen => douasprezece ;
ten => twenty ; teen_inf => douaspe
} ;
NOrd Masc => table {unit => doilea ;
teen => mkOrdinalForm twelve Masc ;
ten => mkOrdinalForm twenty Masc ;
teen_inf => mkOrdinalForm doispe Masc
} ;
NOrd Fem => table {unit => doua ;
teen => mkOrdinalForm douasprezece Fem ;
ten => mkOrdinalForm twenty Fem ;
teen_inf => mkOrdinalForm douaspe Fem
}
} ;
\two -> \twelve -> \douasprezece -> \twenty -> \doua -> \doispe -> \douaspe -> \o -> \una->
{s = table { Formal => table {
NCard Masc => table {unit => two ; teen => twelve ;
ten => twenty ; attr => two
} ;
NCard Fem => table {unit => doua ; teen => douasprezece ;
ten => twenty ; attr => o
} ;
NOrd Masc => table {unit => mkOrdinalForm two Masc ;
teen => mkOrdinalForm twelve Masc ;
ten => mkOrdinalForm twenty Masc ;
attr => mkOrdinalForm two Masc
} ;
NOrd Fem => table {unit => mkOrdinalForm doua Fem ;
teen => mkOrdinalForm douasprezece Fem ;
ten => mkOrdinalForm twenty Fem ;
attr => una
}
} ;
Informal => table {
NCard Masc => table {unit => two ; teen => doispe ;
ten => twenty ; attr => two
} ;
NCard Fem => table {unit => doua ; teen => douaspe ;
ten => twenty ; attr => o
} ;
NOrd Masc => table {unit => mkOrdinalForm two Masc ;
teen => mkOrdinalForm doispe Masc ;
ten => mkOrdinalForm twenty Masc ;
attr => mkOrdinalForm two Masc
} ;
NOrd Fem => table {unit => mkOrdinalForm doua Fem ;
teen => mkOrdinalForm douaspe Fem ;
ten => mkOrdinalForm twenty Fem ;
attr => una
}
}
};
size = less20 ;
lock_Digit = <>
} ;
@@ -77,41 +98,35 @@ oper regNum : Str -> Digit =
oper mkMidF : Str -> Str -> Sub100 =
\unsprezece, unspe ->
{ s = table {NCard g => table { Formal => \\_ => unsprezece ;
Informal => \\_ => unspe
};
NOrd g => table {Formal => \\_ => mkOrdinalForm unsprezece g;
Informal => \\_ => mkOrdinalForm unspe g
}
};
size = less20 ;
lock_Sub100 = <>
};
{ s = table { Formal =>table {
NCard g => unsprezece ;
NOrd g => mkOrdinalForm unsprezece g
};
Informal => table{
NCard g => unspe;
NOrd g => mkOrdinalForm unspe g
}
} ;
size = less20 ;
lock_Sub100 = <>
};
lin num = \d ->
{ s = \\cse => table { NCard g => \\f => d.s ! (NCard g) ! f ! indep ;
NOrd g => \\f => let ss = d.s ! (NOrd g) ! f ! indep
in
case d.size of
{ sg => (artDem g Sg cse) ++ ss ;
_ => mkOrd ss g cse
}
};
sp = \\cse => table { NCard g => \\f => d.s ! (NCard g) ! f ! attr ;
NOrd g => \\f => let ss = d.s ! (NOrd g) ! f ! indep
in
case d.size of
{ sg => (artDem g Sg cse) ++ ss ;
_ => mkOrd ss g cse
}
};
{ s = \\o => \\c => table { NCard g => d.s ! o ! (NCard g) ;
NOrd g => let ss = d.s ! o ! (NOrd g)
in
case d.size of
{ sg => (artDem g Sg c) ++ ss ;
_ => mkOrd ss g c
}
};
size = d.size
} ;
-- Latin A Supplement chars
lin n2 = mkNumVSpc "doi" "doispreze" "douãsprezece" "douãzeci" "douã" "doiºpe" "douãºpe" "doilea" "doua";
lin n2 = mkNumVSpc "doi" "doispreze" "douãsprezece" "douãzeci" "douã" "doiºpe" "douãºpe" "do" "doua";
lin n3 = regNum "trei";
lin n4 = mkNum "patru" "paisprezece" "patruzeci" "paiºpe";
lin n5 = mkNum "cinci" "cinsprezece" "cincizeci" "cinºpe";
@@ -120,78 +135,70 @@ lin n7 = mkNum "
lin n8 = mkNum "opt" "optsprezece" "optzeci" "optiºpe";
lin n9 = regNum "nouã";
lin pot01 = let num = mkNumVSpc "un" "unsprezece" "unsprezece" "zece" "o" "unºpe" "unºpe" "dintâi" "dintâi" ;
dep = mkNumVSpc "unu" "unsprezece" "unsprezece" "zece" "una" "unºpe" "unºpe" "unulea" "una"
lin pot01 = let num = mkNumVSpc "unu" "unsprezece" "unsprezece" "zece" "o" "unºpe" "unºpe" "una" "una"
in
{ s = \\o,c => table {indep => num.s ! o ! c ;
attr => dep.s ! o ! c
} ;
{ s = num.s ;
size = sg
};
lin pot0 d = { s = \\o, c => \\_ => d.s ! o ! c ;
size = less20
};
lin pot0 d = d ;
lin pot110 = mkMidF "zece" "zece" ;
lin pot111 = mkMidF "unsprezece" "unºpe" ;
lin pot111 = mkMidF "unsprezece" "unºpe" ;
lin pot1to19 = \d ->
{s = \\c => table { Formal => \\_ => d.s ! c ! teen ;
Informal => \\_ => d.s ! c ! teen_inf
};
size = less20
};
{s = \\o,c => d.s ! o ! c ! teen ;
size = less20} ;
lin pot0as1 = \d ->
{s = \\c,_,p => d.s ! c ! unit ! p ;
size = d.size
};
{s = \\o,c => d.s ! o ! c ! unit;
size = d.size} ;
lin pot1 = \d ->
{s = \\c => \\_,_ => d.s ! c ! ten ;
size = pl
};
{s = \\o,c => d.s ! o ! c ! ten ;
size = pl} ;
lin pot1plus d e =
{s = table {
NCard g => \\_,_ => d.s ! (NCard g) ! ten ++ "ºi" ++ e.s ! (NCard g) ! unit ! attr ;
NOrd g => \\_,_ => d.s ! (NCard g) ! ten ++ "ºi" ++ e.s ! (NOrd g) ! unit ! attr
};
size = pl
};
{s = \\o => table {
NCard g => d.s ! o ! (NCard g) ! ten ++ "ºi" ++ e.s ! o ! (NCard g) ! attr ;
NOrd g => d.s ! o ! (NCard g) ! ten ++ "ºi" ++e.s ! o ! (NOrd g) ! attr
};
size = pl} ;
lin pot1as2 n = n ;
lin pot2 d =
{s = table {
NCard g => \\_,_ => d.s ! (NCard Fem) ! unit ! indep ++ (mksute d.size) ;
NOrd g => \\_,_ => d.s ! (NCard Fem) ! unit ! indep ++ (mkSute d.size g)
};
{s = \\o => table {
NCard g => d.s ! o ! (NCard Fem) ! unit ++ (mksute d.size) ;
NOrd g => d.s ! o ! (NCard Fem)! unit ++ (mkSute d.size g)
};
size = pl} ;
lin pot2plus d e =
{s = \\c,f,_ => d.s ! (NCard Fem) ! unit ! indep ++ (mksute d.size) ++ e.s ! c ! f ! attr ;
{s = \\o, c => d.s ! o ! (NCard Fem) ! unit ++ (mksute d.size) ++ e.s ! o ! c ;
size = pl} ;
lin pot2as3 n = n ;
lin pot2as3 n =
{s = \\o, c => n.s ! o ! c ;
size = n.size
};
lin pot3 n =
{s = table {
NCard g => \\f,p => mkmie n.size (n.s ! (NCard Fem) ! f ! indep) ;
NOrd g => \\f,p => mkMie n.size g (n.s ! (NCard Fem) ! f ! indep)
};
size = pl
{s = \\o => table {
NCard g => mkmie n.size (n.s ! o ! (NCard Fem)) (n.s ! o ! (NCard Fem)) ;
NOrd g => mkMie n.size g (n.s ! o ! (NCard Fem)) (n.s ! o ! (NCard Fem))
};
size = n.size
} ;
lin pot3plus n m =
{s = \\c, f, p => mkmie n.size (n.s ! (NCard Fem) ! f ! indep) ++ m.s ! c ! f ! attr;
{s = \\o, c => (mkmie n.size (n.s ! o ! (NCard Fem)) (n.s ! o ! (NCard Fem))) ++ m.s ! Formal ! c;
size = pl
};
@@ -200,38 +207,34 @@ oper mkSute : Size -> Gender -> Str = \sz, g ->
table {sg => mkOrdinalForm "sutã" g ;
_ => mkOrdinalForm "sute" g } ! sz ;
oper mkmie : Size -> Str -> Str = \sz, attr ->
table {sg => "o" ++ "mie" ;
oper mkmie : Size -> Str -> Str -> Str = \sz, attr, indep ->
table {sg => "o" ++ "mie" ;
less20 => attr ++ "mii" ;
pl => attr ++ "de" ++ "mii"} ! sz ;
pl => indep ++ "de" ++ "mii"} ! sz ;
oper mkMie : Size -> Gender -> Str -> Str = \sz, g, attr ->
oper mkMie : Size -> Gender -> Str -> Str -> Str = \sz, g, attr, indep ->
table { sg => "o" ++ mkOrdinalForm "mie" g ;
less20 => attr ++ mkOrdinalForm "mii" g ;
pl => attr ++ "de" ++ mkOrdinalForm "mii" g } ! sz ;
pl => indep ++ "de" ++ mkOrdinalForm "mii" g } ! sz ;
--numerals as sequences of digits :
lincat
Dig = {s : CardOrd => Str; n : Size ; isDig : Bool} ;
Dig = {s : CardOrd => Str; n : Number} ;
lin
IDig d = d ;
IIDig d i = {
s = \\o => d.s ! NCard Masc ++ i.s ! o ;
n = case d.n of
{ sg => if_then_else Size (i.isDig) less20 pl ;
_ => pl
};
isDig = False
n = Pl
} ;
lin
D_0 = mkDig "0" ;
D_1 = mk3Dig "1" "1ul" "1a" sg ; ---- gender
D_1 = mk3Dig "1" "1ul" "1a" Sg ; ---- gender
D_2 = mkDig "2";
D_3 = mkDig "3" ;
D_4 = mkDig "4" ;
@@ -242,16 +245,15 @@ lin
D_9 = mkDig "9" ;
oper mkDig : Str -> Dig = \c -> mk3Dig c (c + "lea") (c + "a") less20 ;
oper mkDig : Str -> Dig = \c -> mk3Dig c (c + "lea") (c + "a") Pl ;
oper mk3Dig : Str -> Str -> Str-> Size -> Dig = \c,u,o,n -> {
oper mk3Dig : Str -> Str -> Str-> Number -> Dig = \c,u,o,n -> {
s = table {NCard g => c ; NOrd Masc => u ; NOrd Fem => o } ;
n = n;
isDig = True ;
lock_Dig = <>
} ;
TDigit = {s : CardOrd => Str; n : Size ; isDig : Bool} ;
TDigit = {s : CardOrd => Str; n : Number} ;
}

View File

@@ -148,9 +148,7 @@ lock_PN = <>
--.
--2 Definitions of the paradigms
--
-- The definitions should not bother the user of the API. So they are
-- hidden from the document.
NGender = MorphoRon.NGender ;
@@ -347,8 +345,7 @@ oper mkV : Str -> V = \s -> mkNV (regV s) ;
mkV2S : V -> Prep -> V2S ;
-- mkVV : V -> VV ;
mkV2S : V -> Prep -> V2S ;
mkV2V : V -> Prep -> Prep -> V2V ;
mkVA : V -> VA ;
mkV2A : V -> Prep -> Prep -> V2A ;
@@ -384,9 +381,6 @@ oper mkV : Str -> V = \s -> mkNV (regV s) ;
dirV2 : V -> V2 ;
dirV2 v = mmkV2 v (noPrep Ac) ;
--mmkV3 : V -> Prep -> Prep -> Bool -> V3 ;
--mmkV3 v p q = v ** {c2 = p ; c3 = q ; lock_V3 = <>} ;
mkVS : V -> VS ;
mkVS v = v ** {m = \\_ => Indic ; lock_VS = <>} ;
@@ -414,22 +408,6 @@ mkOrd a = {s = \\n,g,c => a.s ! AF g n Indef (convCase c) ; isPre = a.isPre ; l
--mkComp a =
--let adj = a.s ! Posit in
--{ s = table {Posit => adj ;
-- Compar => \\f => "mai" ++ adj ! f ++ "decât";
-- Superl => table {AF g n a c => (artDem g n c) ++ "mai" ++ adj ! (AF g n a c);
-- AA => "cel"++"mai" ++ adj ! AA
-- }
-- };
-- isPre = a.isPre ;
-- lock_A = <>
-- };
----
mkDet = overload {
mkDet : (_,_,_,_ : Str) -> Number -> Det = mkDetS ;
mkDet : (_,_,_,_,_,_,_,_ : Str) -> Number -> Det = mkD
@@ -552,4 +530,6 @@ mkPronoun :(_,_,_,_,_,_,_,_,_ : Str) -> Gender -> Number -> Person -> Pron =\eu,
-- in this case we add a case to the complement, so that the right gender is chosen.
} ;

View File

@@ -1,4 +1,4 @@
incomplete concrete PhraseRon of Phrase =
concrete PhraseRon of Phrase =
CatRon ** open ResRon, Prelude in {
flags optimize = all_subs ;
@@ -12,10 +12,11 @@ incomplete concrete PhraseRon of Phrase =
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Pl False ! Fem} ;
UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg True ! Fem} ;
UttIP ip = {s = ip.s ! No} ; --- Acc also
UttIP ip = {s = ip.s ! No} ;
UttIAdv iadv = iadv ;
UttNP np = {s = (np.s ! No).comp} ;
-- UttVP vp = {s = infVP vp (agrP3 Fem Sg)} ; --- Agr
UttVP vp = let a = agrP3 Masc Sg in
{s = "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++vp.comp ! a ++ vp.ext ! Pos} ;
UttAdv adv = adv ;
NoPConj = {s = []} ;

View File

@@ -1,4 +1,4 @@
incomplete concrete QuestionRon of Question =
concrete QuestionRon of Question =
CatRon ** open ResRon, Prelude in {
flags optimize=all_subs ;
@@ -18,7 +18,7 @@ incomplete concrete QuestionRon of Question =
QuestVP qp vp = {
s = \\t,a,b,_ =>
let
cl = mkClause (qp.s ! No) False (agrP3 qp.a.g qp.a.n) vp
cl = mkClause (qp.s ! No) (agrP3 qp.a.g qp.a.n) vp
in
cl.s ! DDir ! t ! a ! b ! Indic
} ;
@@ -27,7 +27,7 @@ incomplete concrete QuestionRon of Question =
s = \\t,a,p =>
let
cls : Direct -> Str =
\d -> slash.s ! ip.a ! d ! t ! a ! p ! Indic ;
\d -> slash.s ! False ! ip.a ! d ! t ! a ! p ! Indic ;
prep = if_then_Str ip.hasRef slash.c2.prepDir "" ;
who = prep ++ slash.c2.s ++ ip.s ! slash.c2.c
in table {
@@ -52,7 +52,7 @@ incomplete concrete QuestionRon of Question =
s = \\t,a,p,_ =>
let
vp = predV copula ;
cls = (mkClause (np.s ! No).comp np.hasClit np.a vp).s !
cls = (mkClause (np.s ! No).comp np.a vp).s !
DInv ! t ! a ! p ! Indic ;
why = icomp.s ! {g = np.a.g ; n = np.a.n}
in why ++ cls

View File

@@ -1,4 +1,4 @@
incomplete concrete RelativeRon of Relative =
concrete RelativeRon of Relative =
CatRon ** open Prelude, ResRon in {
flags optimize=all_subs ;
@@ -6,7 +6,7 @@ incomplete concrete RelativeRon of Relative =
lin
RelCl cl = {
s = \\ag,t,a,p,m => therefore_PConj.s ++ conjThat ++
s = \\ag,t,a,p,m => "astfel" ++ "cã" ++
cl.s ! DDir ! t ! a ! p ! m ;
c = No
} ;
@@ -15,12 +15,12 @@ incomplete concrete RelativeRon of Relative =
RelVP rp vp = case rp.hasAgr of {
True => {s = \\ag =>
(mkClause
(rp.s ! {g = ag.g ; n = ag.n} ! No) False
(rp.s ! {g = ag.g ; n = ag.n} ! No)
{g = rp.a.g ; n = rp.a.n ; p = P3}
vp).s ! DDir ; c = No} ;
False => {s = \\ag =>
(mkClause
(rp.s ! {g = ag.g ; n = ag.n} ! No) False
(rp.s ! {g = ag.g ; n = ag.n} ! No)
ag
vp).s ! DDir ; c = No
}
@@ -31,7 +31,7 @@ incomplete concrete RelativeRon of Relative =
let aag = {g = ag.g ; n = ag.n} --add Clitics in this case also !
in
slash.c2.s ++ slash.c2.prepDir ++ rp.s ! aag ! slash.c2.c ++
slash.s ! aag ! DInv ! t ! a ! p ! m ;
slash.s ! True ! aag ! DInv ! t ! a ! p ! m ;
c = No
} ;
@@ -46,8 +46,8 @@ incomplete concrete RelativeRon of Relative =
-- Ac => if_then_Str p.isDir (ss ++ p.s ++ rp.s ! a ! p.c) (ss ++ p.s ++ rp.s ! a ! No)
IdRP = {
s = \\ag,c => case c of { Da | Ge => case <ag.g, ag.n > of
{<Fem,Sg> => "careia" ; <Masc,Sg> => "caruia" ;
<_Pl> => "carora"
{<Fem,Sg> => "cãreia" ; <Masc,Sg> => "cãruia" ;
<_Pl> => "cãrora"
};
_ => "care"
}

View File

@@ -1,90 +1,93 @@
--1 Romance auxiliary operations.
--
resource ResRon = ParamX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond], PhonoRon ** open Prelude in {
resource ResRon = ParamX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond] ** open Prelude in {
flags optimize= all ;
--------------------------------------------------------------------------
----------------------- 1 BASIC PARAMETERS--------------------------------
--------------------------------------------------------------------------
--2 Enumerated parameter types for morphology
--
-- These types are the ones found in school grammars.
-- Their parameter values are atomic.
param
Gender = Masc | Fem ;
NGender = NMasc | NFem | NNeut ;
Mood = Indic | Conjunct ;
Direct = DDir | DInv ;
-- there are 3 genders in Romanian, the Neuter is a combination of Masculine for Sg and Feminine for Pl
NGender = NMasc | NFem | NNeut ;
-- genders for Agreement, to which the 3 genders ultimately reduce
Gender = Masc | Fem ;
-- formal and informal form for numerals (the formal form is used as default)
NumF = Formal | Informal ;
-- animacy feature of the nouns, which has consequences on syntactical level
Animacy = Animate | Inanimate ;
-- basic forms of the clitics
Clitics = Normal | Composite | Short | Imperative ;
-- Refl = NoRefl | ARefl | DRefl ;
Clitics = Normal | Composite | Short | Vocative ;
-- special size parameter used for Numerals
Size = sg | less20 | pl ;
-- the cases that require clitics :
ParClit = PAcc | PDat ;
-- parameter that counts the number of clitics in a verb phrase
VClit = VNone | VOne ParClit | VRefl | VMany ;
-- parameter that specifies whether a preposition would require clitics or not
PrepDir = Dir ParClit | NoDir ;
-- the 5 cases in Romanian
NCase = No | Da | Ac | Ge | Vo ;
-- the 3 distinct forms of the declension a noun/adjective, based on the syncretism Nominative-Accusative and Dative-Genitive
ACase = ANomAcc | AGenDat | AVoc ;
-- due to the enclitical defined article, a parameter for species is needed
Species = Indef | Def ;
-- Adjectives are inflected in number, gender, have specific form for enclitic determined
--article, and specific forms for Nominative-Accusative/Dative-Genitive/Voccative
AForm = AF Gender Number Species ACase | AA ;
-- Gender is not morphologically determined for first and second person pronouns.
PronGen = PGen Gender | PNoGen ;
-- Cardinal numerals have gender, ordinal numerals have full number as well.
ACase = ANomAcc | AGenDat | AVoc ;
Species = Indef | Def ;
NCase = No | Da | Ac | Ge | Vo ;
CardOrd = NCard Gender | NOrd Gender;
--3 Verbs
-------------------------------------------------
--------------------2 Verbs ---------------------
-------------------------------------------------
-- the form we build on syntactical level, based on VForm
-- it represents the main verb forms in Romanian
param
Temps1 = TPresn | TImparf | TPComp | TPSimple | TPPerfect | TFutur ;
TSubj1 = TSPres | TSPast ;
-- TPart1 = TGer | TPPasse Gender Number Species ACase;
VerbForm = TInf
| TIndi Temps1 Number Person
| TCondi Number Person
| TSubjo TSubj1 Number Person
| TImper NumPersI
| TGer
| TPPasse Gender Number Species ACase ;
-- the form we build on morphological level :
Temps = Presn | Imparf | PSimple | PPerfect ;
TSubj = SPres ;
--TPart = PPasse Gender Number Species ACase;
-- the form we build on morphological level :
VForm = Inf
| Indi Temps Number Person
@@ -93,224 +96,490 @@ param
| Ger
| PPasse Gender Number Species ACase ;
-- form for compatibility with the other Romance languages, to be used in case that
-- Romanian will be integrated in the Romance category
{-
param
VF =
VInfin Bool
| VFin TMood Number Person
| VImper NumPersI
| VPart Gender Number Species ACase
| VGer
;
-}
TMood =
VPres Mood
| VImperff --# notpresent
| VPasse Mood --# notpresent
| VFut --# notpresent
| VCondit --# notpresent
;
TMood = VPres Mood | VImperff | VPasse Mood | VFut | VCondit ;
NumPersI = SgP2 | PlP1 | PlP2 ;
NumPersI = SgP2 | PlP1 | PlP2 ;
VPForm = VPFinite TMood Anteriority
| VPImperat
| VPGerund
| VPInfinit Anteriority Bool ;
VPForm =
VPFinite TMood Anteriority
| VPImperat
| VPGerund
| VPInfinit Anteriority Bool ;
RTense =
RPres
| RPast --# notpresent
| RFut --# notpresent
| RCond --# notpresent
;
-- Agreement of adjectives, verb phrases, and relative pronouns.
oper
AAgr : Type = {g : Gender ; n : Number} ;
Agr : Type = AAgr ** {p : Person} ;
RAgr : Type = {s : Clitics => Str} ;
oper
-- clitics : Gender -> Number
genForms : Str -> Str -> Gender => Str = \bon,bonne ->
table {
Masc => bon ;
Fem => bonne
} ;
RNoAg : RAgr = genClit "" "" "" "";
aagrForms : (x1,_,_,x4 : Str) -> (AAgr => Str) = \tout,toute,tous,toutes ->
table {
{g = g ; n = Sg} => genForms tout toute ! g ;
{g = g ; n = Pl} => genForms tous toutes ! g
} ;
Noun = {s : Number => Species => ACase => Str; g : NGender; a : Animacy} ;
Adj = {s : AForm => Str} ;
Compl : Type = {s : Str ; c : NCase ; isDir : PrepDir ; needIndef : Bool ; prepDir : Str} ;
RTense = RPres | RPast | RFut | RCond ;
oper
NounPhrase : Type = {
s : NCase => {comp : Str ;
clit : Clitics => Str} ;
a : Agr ;
indForm : Str ;
hasClit : Bool ;
hasRef : Bool ;
isPronoun : Bool
} ;
Pronoun : Type = {s : NCase => {comp, c1, c2 : Str};
a : Agr ;
poss : Number => Gender => Str
};
copula : VerbPhrase =
let t = table {Inf => "fi" ;
Indi Presn Sg P1 => "sunt" ; Indi Presn Sg P2 => "eºti" ; Indi Presn Sg P3 => "este" ;
Indi Presn Pl P1 => "suntem" ; Indi Presn Pl P2 => "sunteþi" ; Indi Presn Pl P3 => "sunt" ;
Indi PSimple Sg P1 => "fusei" ; Indi PSimple Sg P2 => "fuseºi" ; Indi PSimple Sg P3 => "fuse" ;
Indi PSimple Pl P1 => "fuserãm" ; Indi PSimple Pl P2 => "fuserãþi" ; Indi PSimple Pl P3 => "fuserã" ;
Indi Imparf Sg P1 => "eram" ; Indi Imparf Sg P2 => "erai" ; Indi Imparf Sg P3 => "era" ;
Indi Imparf Pl P1 => "eram" ; Indi Imparf Pl P2 => "eraþi" ; Indi Imparf Pl P3 => "erau" ;
Indi PPerfect Sg P1 => "fusesem" ; Indi PPerfect Sg P2 => "fuseseºi" ; Indi PPerfect Sg P3 => "fusese" ;
Indi PPerfect Pl P1 => "fusesem" ; Indi PPerfect Pl P2 => "fuseseþi" ; Indi PPerfect Pl P3 => "fuseserã" ;
Subjo SPres Sg P1 => "fiu" ; Subjo SPres Sg P2 => "fii" ; Subjo SPres Sg P3 => "fie" ;
Subjo SPres Pl P1 => "fim" ; Subjo SPres Pl P2 => "fiþi" ; Subjo SPres Pl P3 => "fie" ;
Imper SgP2 => "fii" ; Imper PlP2 => "fiþi" ; Imper PlP1 => "fim" ;
Ger => "fiind";
PPasse g n a d => case <g,n,d,a> of
{<Masc,Sg,ANomAcc,Def> => "fostul"; <Masc,Sg,_,Indef> => "fost"; <Masc,Sg,AGenDat,Def> => "fostului"; <Masc,Sg,AVoc,Def> => "fostule";
<Masc,Pl,ANomAcc,Def> => "foºtii"; <Masc,Pl,_,Indef> => "foºti"; <Masc,Pl,_,Def> => "foºtilor";
<Fem,Sg,ANomAcc,Def> => "fosta"; <Fem,Sg,ANomAcc,Indef> => "fostã"; <Fem,Sg,AGenDat,Def> => "fostei"; <Fem,Sg,AGenDat,Indef> => "foste";<Fem,Sg,AVoc,Def> => "fosto"; <Fem,Sg,AVoc,Indef> => "fostã";
<Fem,Pl,ANomAcc,Def> => "fostele"; <Fem,Pl,_,Indef> => "foste";<Fem,Pl,_,Def> => "fostelor"
}
} in
{s = t; isRefl = \\_ => RNoAg; nrClit = VNone ; pReflClit = Composite ;
isFemSg = False ; neg = table {Pos => "" ; Neg => "nu"} ;
clAcc = RNoAg ; clDat = RNoAg ;
comp = \\_ => "";
ext = \\_ => ""
} ;
-- auxiliary for Past Tense :
pComp : Number => Person => Str = table {Sg => table {P1 => "am" ; P2 => "ai" ; P3 => "a"} ;
Pl => table {P1 => "am" ; P2 => "aþi"; P3 => "au"}
};
-- auxiliary for Future Simple :
pFut : Number => Person => Str = table {Sg => table {P1 => "voi" ; P2 => "vei" ; P3 => "va"} ;
Pl => table {P1 => "vom" ; P2 => "veþi"; P3 => "vor"}
};
--auxiliary for Condional Present :
heavyNP : {s : NCase => Str ; a : Agr; hasClit : Bool; ss : Str} -> NounPhrase = \np -> {
s = \\c => {comp = np.s ! c ;
clit = \\cs => if_then_Str np.hasClit ((genCliticsCase np.a c).s ! cs) [] };
pCond : Number => Person => Str = table {Sg => table {P1 => "aº" ; P2 => "ai" ; P3 => "ar"} ;
Pl => table {P1 => "am" ; P2 => "aþi"; P3 => "ar"}
};
-- short form of the verb, conjunctive present, without the auxiliary
conjVP : VerbPhrase -> Agr -> Str = \vp,agr ->
let
inf = vp.s ! Subjo SPres agr.n agr.p ;
neg = vp.neg ! Pos ;
in
neg ++ inf ;
a = np.a ;
indForm = np.ss ;
hasClit = np.hasClit ;
isPronoun = False;
hasRef = False
} ;
-- VPC form of the verb, needed for building a clause
useVP : VerbPhrase -> VPC = \vp ->
let
verb = vp.s ;
vinf : Bool -> Str = \b -> verb ! Inf ;
vger = verb ! Ger ;
vimp : Agr -> Str = \a -> case <a.n,a.p> of
{<Sg,P2> => verb ! Imper SgP2 ;
<Pl,P2> => verb ! Imper PlP2 ;
_ => verb ! Subjo SPres a.n a.p
} ;
vf : Str -> (Agr -> Str) -> {
sa : Str ;
sv : Agr => Str
} =
\fin,inf -> {
sa = fin ;
sv = \\a => inf a
} ;
in {
s = table {
VPFinite tm Simul => case tm of
{VPres Indic => vf "" (\a -> verb ! Indi Presn a.n a.p) ;
VPres Conjunct => vf "sã" (\a -> verb ! Subjo SPres a.n a.p) ;
VImperff => vf "" (\a -> verb ! Indi Imparf a.n a.p) ;
VPasse Indic => vf "" (\a -> pComp ! a.n ! a.p ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
VPasse Conjunct => vf "sã" (\a -> copula.s! Inf ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
VFut => vf "" (\a -> pFut ! a.n ! a.p ++ verb ! Inf) ;
VCondit => vf "" (\a -> pCond ! a.n ! a.p ++ verb ! Inf)
} ;
VPFinite tm Anter => case tm of
{VPres Indic => vf "" (\a -> pComp ! a.n ! a.p ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
(VPres Conjunct | VPasse Conjunct) => vf "sã" (\a -> copula.s! Inf ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
VFut => vf "" (\a -> pFut !a.n ! a.p ++ copula.s! Inf ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
VCondit => vf "" (\a -> pCond ! a.n ! a.p ++ copula.s ! Inf ++ verb ! PPasse Masc Sg Indef ANomAcc);
_ => vf "" (\a -> verb ! Indi PPerfect a.n a.p)
};
VPInfinit Anter b=> vf "a" (\a -> copula.s ! Inf ++ verb ! PPasse Masc Sg Indef ANomAcc);
VPImperat => vf "sã" (\a -> verb ! Subjo SPres a.n a.p) ; -- fix it later !
VPGerund => vf "" (\a -> vger) ;
VPInfinit Simul b => vf "a" (\a -> verb ! Inf)
} ;
agr = vp.agr ;
neg = vp.neg ;
clitAc = vp.clAcc ;
clitDa = vp.clDat ;
clitRe = RNoAg ;
nrClit = vp.nrClit ;
pReflClit = vp.pReflClit;
comp = vp.comp ;
ext = vp.ext
} ;
appCompl : Compl -> NounPhrase -> Str = \comp,np ->
comp.s ++ (np.s ! comp.c).comp ;
-- basic UseV function
oper convCase : NCase -> ACase =
\nc -> case nc of
{Da | Ge => AGenDat;
No | Ac => ANomAcc;
_ => AVoc} ;
oper convACase : ACase -> NCase =
\ac -> case ac of
{ANomAcc => No ;
AGenDat => Ge ;
_ => Vo};
predV : Verb -> VerbPhrase = \verb ->
{
s = verb.s ;
isRefl = verb.isRefl;
isFemSg = False ;
nrClit = verb.nrClit ; pReflClit = verb.pReflClit;
neg = table {Pos => ""; Neg => "nu"} ;
clAcc = RNoAg ;
clDat = RNoAg ;
comp = \\a => [] ;
ext = \\p => []
} ;
-- various helper functions for VerbRon
insertExtrapos : (Polarity => Str) -> VerbPhrase -> VerbPhrase = \co,vp -> {
s = vp.s ;
isFemSg = vp.isFemSg ;
clAcc = vp.clAcc ; isRefl = vp.isRefl;
clDat = vp.clDat ; pReflClit = vp.pReflClit ;
neg = vp.neg ;
comp = vp.comp ; nrClit = vp.nrClit ;
ext = \\p => vp.ext ! p ++ co ! p
} ;
insertObje : (Agr => Str) -> RAgr -> RAgr -> Bool -> VClit -> VerbPhrase -> VerbPhrase = \obj,clA, clD, agg, vc, vp -> {
s = vp.s ; isRefl = vp.isRefl;
isFemSg= orB agg vp.isFemSg ;
nrClit = vc; pReflClit = vp.pReflClit;
neg = table {Pos => ""; Neg => "nu"} ;
clAcc = {s = \\cs => vp.clAcc.s ! cs ++ clA.s ! cs };
clDat = {s = \\cs => vp.clDat.s ! cs ++ clD.s ! cs };
comp = \\a => obj ! a ++ vp.comp ! a ;
ext = vp.ext
};
--oper genRAgr : (x1,_,x3 : Str) -> RAgr = \ma,m,me -> genClit ma m me ** {hasClit = True};
insertSimpObj : (Agr => Str) -> VerbPhrase -> VerbPhrase = \obj,vp -> {
s = vp.s ; isRefl = vp.isRefl; isFemSg = vp.isFemSg ; neg = vp.neg ;
clAcc = vp.clAcc ; clDat = vp.clDat ;
nrClit = vp.nrClit ; pReflClit = vp.pReflClit ;
comp = \\a => vp.comp ! a ++ obj ! a ;
ext = vp.ext
};
oper genClit : (x1,_,_,x4 : Str) -> {s : Clitics => Str} = \ma, m, me, mma ->
{s = table {Normal => ma;
Short => m;
Composite => me ;
Vocative => mma
}};
insertSimpObjPre : (Agr => Str) -> VerbPhrase -> VerbPhrase = \obj,vp -> {
s = vp.s ; isRefl = vp.isRefl; isFemSg = vp.isFemSg ; neg = vp.neg ;
clAcc = vp.clAcc ; clDat = vp.clDat ; pReflClit = vp.pReflClit ;
nrClit = vp.nrClit ;
comp = \\a => obj ! a ++ vp.comp ! a ;
ext = vp.ext
};
-----------------------------------------------------------------
---------------3 CATEGORY DEFINITIONS ---------------------------
-----------------------------------------------------------------
oper
oper genCliticsCase : Agr -> NCase -> {s : Clitics => Str} = \agr, c ->
case c of
{Da => cliticsDa agr.g agr.n agr.p ;
Ac => cliticsAc agr.g agr.n agr.p ;
_ => {s = \\_ => []}
};
oper aRefl : Agr -> RAgr =
\a -> case <a.g,a.n,a.p> of
{<_,_,P3> => {s = (genClit "se" "s-" "se" "").s } ;
_ => {s = (cliticsAc a.g a.n a.p).s }
};
oper dRefl : Agr -> RAgr =
\a -> case <a.g,a.n,a.p> of
{<_,_,P3> => {s = (genClit "îºi" "-ºi" "ºi" "").s } ;
_ => {s = (cliticsDa a.g a.n a.p).s }
};
oper cliticsAc : Gender -> Number -> Person -> {s: Clitics => Str} =
\g,n,p -> case <g,n,p> of
{<_,Sg,P1> => genClit "mã" "m-" "mã" "-mã"; <_,Pl,P1> => genClit "ne" "ne-" "ne" "-ne";
<_,Sg,P2> => genClit "te" "te-" "te" "-te"; <_,Pl,P2> => genClit "vã" "v-" "vã" "-vã";
<Masc,Sg,P3> => genClit "îl" "l-" "-l" "-l"; <Masc,Pl,P3> => genClit "îi" "i-" "-i" "-i";
<Fem,Sg,P3> => genClit "o" "-o" "-o" "-o"; <Fem,Pl,P3> => genClit "le" "le-" "le" "-le"
};
oper cliticsDa : Gender -> Number -> Person -> {s : Clitics => Str} =
\g,n,p -> case <g,n,p> of
{<_,Sg,P1> => genClit "îmi" "mi-" "mi" "-mi"; <_,Pl,P1> => genClit "ne" "ne-" "ni" "-ne";
<_,Sg,P2> => genClit "îþi" "þi-" "þi" "-þi"; <_,Pl,P2> => genClit "vã" "v-" "vi" "-vã";
<_,Sg,P3> => genClit "îi" "i-" "i" "-i"; <_,Pl,P3> => genClit "le" "le-" "li" "-le"
};
oper
VPC : Type = {
-- for conjunctive mood where the negation comes
Noun = {s : Number => Species => ACase => Str; g : NGender; a : Animacy} ;
Adj = {s : AForm => Str} ;
Verbe : Type = { s : VForm => Str};
Verb : Type = {s : VForm => Str ; isRefl : Agr => RAgr; nrClit : VClit ; pReflClit : Clitics};
Compl : Type = {s : Str ; c : NCase ; isDir : PrepDir ; needIndef : Bool ; prepDir : Str} ;
NounPhrase : Type = {s : NCase => {comp : Str ; clit : Clitics => Str} ;
a : Agr ;
indForm : Str ; --needed for prepositions that demand the indefinite form of a NP
hasClit : Bool ; --
hasRef : Bool ; -- needed to indicate if the NP is referenced or not - for the use of clitics
isPronoun : Bool -- in the case of pronouns, just the clitics are used, and not the comp form
} ;
VerbPhrase :Type = {
s : VForm => Str ;
isRefl : Agr => RAgr ; -- the clitics for reflexive verbs
nrClit : VClit ; -- number of clitics of the verb phrase
pReflClit : Clitics ; -- clitic parameter for reflexive clitic, in case it is present in the verb phrase, along with another clitic
isFemSg : Bool ; -- needed for the correct placement of the Accusative clitic
neg : Polarity => Str ; -- negation
clAcc : RAgr ; -- clitic for the Accusative case (direct object)
clDat : RAgr ; -- clitic for the Dative case (indirect object without preposition)
comp : Agr => Str ; -- object of the verb phraes
ext : Polarity => Str ; -- object sentece of the verb phrase
} ;
VPC : Type = {
s : VPForm => {
sa : Str ; -- sa
sv : Agr => Str -- merge
sa : Str ;
sv : Agr => Str
} ;
neg : Polarity => Str ;
clitAc : RAgr ;
clitDa : RAgr ;
clitRe : RAgr ;
nrClit : VClit ;
comp : Agr => Str ; -- content(e) ; à ma mère ; hier
ext : Polarity => Str ; -- que je dors / que je dorme
} ;
comp : Agr => Str ;
ext : Polarity => Str ;
} ;
-----------------------------------------------------------------------------
------------------------- 4 CLITICS -----------------------------------------
-----------------------------------------------------------------------------
oper
-- for the treatment of clitics
RAgr : Type = {s : Clitics => Str} ;
-- fix for Refl + Dat
RNoAg : RAgr = genClit "" "" "" "";
flattenClitics : VClit -> RAgr -> RAgr -> RAgr -> Bool -> Bool -> {s1 : Str ; s2 : Str } =
\vc, clA, clD, clR, isFemSg, b ->
genClit : (x1,_,_,x4 : Str) -> {s : Clitics => Str} = \ma, m, me, mma ->
{s = table {Normal => ma;
Short => m;
Composite => me ;
Imperative => mma
}};
genCliticsCase : Agr -> NCase -> {s : Clitics => Str} = \agr, c ->
case c of
{Da => cliticsDa agr.g agr.n agr.p ;
Ac => cliticsAc agr.g agr.n agr.p ;
_ => {s = \\_ => []}
};
aRefl : Agr -> RAgr = \a ->
case <a.g,a.n,a.p> of
{<_,_,P3> => {s = (genClit "se" "s-" "se" "").s } ;
_ => {s = (cliticsAc a.g a.n a.p).s }
};
dRefl : Agr -> RAgr = \a ->
case <a.g,a.n,a.p> of
{<_,_,P3> => {s = (genClit "îºi" "-ºi" "ºi" "").s } ;
_ => {s = (cliticsDa a.g a.n a.p).s }
};
cliticsAc : Gender -> Number -> Person -> {s: Clitics => Str} = \g,n,p ->
case <g,n,p> of
{<_,Sg,P1> => genClit "mã" "m-" "mã" "-mã"; <_,Pl,P1> => genClit "ne" "ne-" "ne" "-ne";
<_,Sg,P2> => genClit "te" "te-" "te" "-te"; <_,Pl,P2> => genClit "vã" "v-" "vã" "-vã";
<Masc,Sg,P3> => genClit "îl" "l-" "-l" "-l"; <Masc,Pl,P3> => genClit "îi" "i-" "-i" "-i";
<Fem,Sg,P3> => genClit "o" "-o" "-o" "-o"; <Fem,Pl,P3> => genClit "le" "le-" "le" "-le"
};
cliticsDa : Gender -> Number -> Person -> {s : Clitics => Str} = \g,n,p ->
case <g,n,p> of
{<_,Sg,P1> => genClit "îmi" "mi-" "mi" "-mi"; <_,Pl,P1> => genClit "ne" "ne-" "ni" "-ne";
<_,Sg,P2> => genClit "îþi" "þi-" "þi" "-þi"; <_,Pl,P2> => genClit "vã" "v-" "vi" "-vã";
<_,Sg,P3> => genClit "îi" "i-" "i" "-i"; <_,Pl,P3> => genClit "le" "le-" "li" "-le"
};
flattenClitics : VClit -> RAgr -> RAgr -> RAgr -> Bool -> Bool -> Clitics -> {s1 : Str ; s2 : Str } = \vc, clA, clD, clR, isFemSg, b, pReflClit ->
let par = if_then_else Clitics b Short Normal;
pcomb = if_then_else Clitics b Short Composite
pcomb = if_then_else Clitics b Short Composite ;
pRefl = if_then_else Clitics b pReflClit Composite
in
case isFemSg of
{True => {s1 = clD.s ! par ++ clR.s ! par ; s2 = clA.s ! Short};
_ => case vc of
in
case isFemSg of
{True => {s1 = clD.s ! par ++ clR.s ! par ; s2 = clA.s ! Short};
_ => case vc of
{VOne PAcc => {s1 = clA.s ! par ; s2 = ""};
VOne PDat => {s1 = clD.s ! par ; s2 = ""};
VRefl => {s1 = clR.s ! par ; s2 = ""};
_ => {s1 = clD.s ! Composite ++ clR.s ! pcomb ++ clA.s ! pcomb ; s2 = ""}
_ => {s1 = clD.s ! Composite ++ clR.s ! pRefl ++ clA.s ! pcomb ; s2 = ""}
}
};
{-
{<False,_,False,_> => {s1 = clD.s ! par ; s2 = ""};
<False,False,_,_> => {s1 = clR.s ! par ; s2 = ""};
<_,_,_,True> => {s1 = clD.s ! par ++ clR.s ! par ; s2 = clA.s ! Short};
<_,False,False,_> => {s1 = clA.s ! par ; s2 = ""};
_ => {s1 = clD.s ! Composite ++ clR.s ! Composite ++ clA.s ! pcomb ; s2 = ""}
};
-}
flattenSimpleClitics : VClit -> RAgr -> RAgr -> RAgr -> Str =
\vc, clA, clD, clR ->case vc of
{VOne _ => clD.s ! Normal ++ clA.s ! Normal;
_ => clD.s ! Composite ++ clR.s ! Composite ++ clA.s ! Composite
};
};
flattenSimpleClitics : VClit -> RAgr -> RAgr -> RAgr -> Str = \vc, clA, clD, clR ->
case vc of
{VOne _ => clD.s ! Normal ++ clA.s ! Normal;
_ => clD.s ! Composite ++ clR.s ! Composite ++ clA.s ! Composite
};
-- we rely on the fact that there are not more than 2 clitics for a verb
oper getSize : Size -> Str =
\s -> case s of
{ pl => "de" ;
_ => ""
};
-----------------------------------------------------------------------------
------------------------- 5 ARTICLES ----------------------------------------
-----------------------------------------------------------------------------
oper
-- demonstrative article
-- used as Determined article in order to emphasise on the noun/adjective, and for Dative/Genitive for of ordinals
artDem : Gender -> Number -> ACase -> Str = \g,n,c ->
case <g,n,c> of
{<Masc,Sg,ANomAcc> => "cel"; <Masc,Pl,ANomAcc> => "cei"; <Masc,Sg,AGenDat> => "celui";
<Fem,Sg,ANomAcc> => "cea"; <Fem,Pl,ANomAcc> => "cele"; <Fem,Sg,AGenDat> => "celei";
<_,Pl,AGenDat> => "celor";
<Masc,Sg,AVoc> => "cel";
<Masc,Pl,AVoc> => "cei"; <Fem,Sg,AVoc> => "cea"; <Fem,Pl,AVoc> => "cele"
};
-- undefined article (proclitical) --
-- we keep the non-articled form of the noun and glue it with the article on syntactical level
artUndef : Gender -> Number -> NCase -> Str = \g,n,a ->
case <g,n,a> of
{<Masc,Sg,No> => "un"; <Masc,Sg,Ac> => "un" ; <Masc,Sg,Ge> => "unui"; <Masc,Sg,Da> => "unui" ;<_,_,Vo> => "" ;
<_,Pl,No> => "niºte"; <_,Pl,Ac> => "niºte"; <_,Pl,Da> => "unor"; <_,Pl,Ge> => "unor" ;
<Fem,Sg,No> => "o"; <Fem,Sg,Ac> => "o"; <Fem,Sg,Da> => "unei"; <Fem,Sg,Ge> => "unei"
};
-- possesive article
-- used for Cardinals and for Genitive case
artPos : Gender -> Number -> ACase -> Str = \g,n,c ->
case <g,n,c> of
{<Masc,Sg,AGenDat> => "alui"; <Masc,Sg,_> => "al";
<Masc,Pl,AGenDat> => "alor"; <Masc,Pl,_> => "ai";
<Fem,Sg,AGenDat> => "alei"; <Fem,Sg,_> => "a";
<Fem,Pl,AGenDat> => "ale"; <Fem,Pl,_> => "ale"
};
-----------------------------------------------------------------------------
------------------------- 6 VARIOUS HELPER FUNCTIONS ------------------------
-----------------------------------------------------------------------------
oper
--Reflexive pronouns
reflPron : Number -> Person -> ACase -> Str = \n,p,c ->
case <n,p,c> of
{<Sg,P1,AGenDat> => "mie" ; <Sg,P1,_> => "mine";
<Sg,P2,AGenDat> => "þie" ; <Sg,P2,_> => "tine";
<_,P3,AGenDat> => "sieºi" ; <_,P3,_> => "sine" ;
<Pl,P1,AGenDat> => "nouã" ; <Pl,P1,_> => "noi" ;
<Pl,P2,AGenDat> => "vouã" ; <Pl,P2,_> => "voi"
};
reflPronHard : Gender -> Number -> Person -> Str = \g,n,p ->
case <g,n,p> of
{<Masc,Sg,P1> => "însumi" ; <Fem,Sg,P1> => "însãmi";
<Masc,Sg,P2> => "însuþi" ; <Fem,Sg,P2> => "însãþi";
<Masc,Sg,P3> => "însuºi" ; <Fem,Sg,P3> => "însãºi";
<Masc,Pl,P1> => "înºine" ; <Fem,Pl,P1> => "însene";
<Masc,Pl,P2> => "înºivã"; <Fem,Pl,P2> => "înseva";
<Masc,Pl,P3> => "înºiºi"; <Fem,Pl,P3> => "înseºi"};
-- Agreements :
-- for relatives
AAgr : Type = {g : Gender ; n : Number} ;
-- for agreement between subject and predicate
Agr : Type = AAgr ** {p : Person} ;
-- clause building function :
mkClause : Str -> Agr -> VerbPhrase ->
{s : Direct => RTense => Anteriority => Polarity => Mood => Str} =
\subj,agr,vpr -> {
s = \\d,t,a,b,m =>
let
tm = case t of {
RPast => VPasse m ;
RFut => VFut ;
RCond => VCondit ;
RPres => VPres m
} ;
cmp = case <t,a,m> of
{<RPast,Simul,Indic> | <RPres, Anter,Indic> => True ;
<RCond, _, _> => True;
_ => False
} ;
vp = useVP vpr ;
vps = (vp.s ! VPFinite tm a).sv ;
sa = (vp.s ! VPFinite tm a ).sa ;
verb = vps ! agr ;
neg = vp.neg ! b ;
clpr = flattenClitics vpr.nrClit vpr.clAcc vpr.clDat (vpr.isRefl ! agr) (andB vpr.isFemSg cmp) cmp vpr.pReflClit;
compl = vp.comp ! agr ++ vp.ext ! b
in
case d of {
DDir =>
subj ++ sa ++ neg ++ clpr.s1 ++ verb ++ clpr.s2;
DInv =>
sa ++ neg ++ clpr.s1 ++verb ++ clpr.s2 ++subj
}
++ compl
} ;
-- various :
heavyNP : {s : NCase => Str ; a : Agr; hasClit : Bool; ss : Str} -> NounPhrase = \np -> {
s = \\c => {comp = np.s ! c ;
clit = \\cs => if_then_Str np.hasClit ((genCliticsCase np.a c).s ! cs) [] };
a = np.a ;
indForm = np.ss ;
hasClit = np.hasClit ;
isPronoun = False;
hasRef = False
} ;
genForms : Str -> Str -> Gender => Str = \bon,bonne ->
table {
Masc => bon ;
Fem => bonne
} ;
aagrForms : (x1,_,_,x4 : Str) -> (AAgr => Str) = \tout,toute,tous,toutes ->
table {
{g = g ; n = Sg} => genForms tout toute ! g ;
{g = g ; n = Pl} => genForms tous toutes ! g
} ;
appCompl : Compl -> NounPhrase -> Str = \comp,np ->
comp.s ++ (np.s ! comp.c).comp ;
convCase : NCase -> ACase =\nc ->
case nc of
{Da | Ge => AGenDat;
No | Ac => ANomAcc;
_ => AVoc} ;
convACase : ACase -> NCase = \ac ->
case ac of
{ANomAcc => No ;
AGenDat => Ge ;
_ => Vo};
getSize : Size -> Str =\s ->
case s of
{pl => "de" ;
_ => ""
};
nextClit : VClit -> ParClit -> VClit = \vc,pc ->
case vc of
{VNone => VOne pc;
_ => VMany
};
isAgrFSg : Agr -> Bool = \ag ->
case <ag.n,ag.g,ag.p> of
{<Sg,Fem,P3> => True ;
_ => False
};
clitFromNoun : NounPhrase -> NCase -> RAgr = \np,nc ->
{s = (np.s ! nc).clit; hasClit = True};
agrGender : NGender -> Number -> Gender =\ng,n ->
case <ng,n> of
{<NMasc,_> => Masc ;
<NFem,_> => Fem ;
<NNeut, Sg> => Masc ;
_ => Fem};
getNumber : Size -> Number =\n ->
case n of
{sg => Sg;
_ => Pl };
getClit : Animacy -> Bool =\a ->
case a of
{Animate => True;
_ => False};
}

View File

@@ -1,17 +1,17 @@
incomplete concrete SentenceRon of Sentence =
concrete SentenceRon of Sentence =
CatRon ** open Prelude, ResRon in {
flags optimize=all_subs ;
lin
PredVP np vp = mkClause (np.s ! No).comp np.hasClit np.a vp ;
PredVP np vp = mkClause (np.s ! No).comp np.a vp ;
PredSCVP sc vp = mkClause sc.s False (agrP3 Masc Sg) vp ;
PredSCVP sc vp = mkClause sc.s (agrP3 Masc Sg) vp ;
ImpVP vpr = let agSg = {n = Sg ; g = Masc ; p = P2 } ;
agPl = {n = Pl ; g = Masc ; p = P2 } ;
clDirSg = vpr.clDat.s ! Vocative ++ (vpr.isRefl ! agSg).s ! Vocative ++ vpr.clAcc.s ! Vocative ;
clDirPl = vpr.clDat.s ! Vocative ++ (vpr.isRefl ! agPl).s ! Vocative ++ vpr.clAcc.s ! Vocative ;
clDirSg = vpr.clDat.s ! Imperative ++ (vpr.isRefl ! agSg).s ! Imperative ++ vpr.clAcc.s ! Imperative ;
clDirPl = vpr.clDat.s ! Imperative ++ (vpr.isRefl ! agPl).s ! Imperative ++ vpr.clAcc.s ! Imperative ;
clNegSg = flattenSimpleClitics vpr.nrClit vpr.clAcc vpr.clDat (vpr.isRefl ! agSg) ;
clNegPl = flattenSimpleClitics vpr.nrClit vpr.clAcc vpr.clDat (vpr.isRefl ! agPl)
in
@@ -28,35 +28,40 @@ incomplete concrete SentenceRon of Sentence =
};
<Neg, ImpF n b> => case n of
{Sg => "nu" ++ clNegSg ++ vpr.s ! Inf ++ vpr.comp ! agSg ++ vpr.ext ! Pos;
Pl => "nu" ++ clNegPl ++ vpr.s ! Inf ++ vpr.comp ! agPl ++ vpr.ext ! Pos
Pl => "nu" ++ clNegPl ++ vpr.s ! Indi Presn Pl P2 ++ vpr.comp ! agPl ++ vpr.ext ! Pos
}
}
} ;
SlashVP np v2 =
{s = \\ag =>
{s = \\bb,ag=>
let
vp = v2
in (mkClause (np.s ! No).comp np.hasClit np.a vp).s ;
c2 = v2.c2
vp = v2 ;
bcond = andB vp.needClit bb
in
case <bcond,v2.c2.isDir> of
{<True, Dir pc> => (mkClause (np.s ! No).comp np.a (putClit (agrP3 ag.g ag.n) pc vp)).s ;
_ => (mkClause (np.s ! No).comp np.a vp).s
};
c2 = v2.c2
} ;
AdvSlash slash adv = {
s = \\ag,d,t,a,b,m => slash.s ! ag ! d ! t ! a ! b ! m ++ adv.s ;
s = \\bb,ag,d,t,a,b,m => slash.s ! bb ! ag ! d ! t ! a ! b ! m ++ adv.s ;
c2 = slash.c2
} ;
-- potentially overgenerating !! since the complements have a preposition already
SlashPrep cl prep = {
s = \\_ => cl.s ;
s = \\bb => \\_ => cl.s ;
c2 = {s = prep.s ; c = prep.c ; isDir = NoDir; needIndef = prep.needIndef; prepDir = ""}
} ;
SlashVS np vs slash =
{s = \\ag =>
{s = \\bb,ag =>
(mkClause
(np.s ! No).comp np.hasClit np.a
(insertExtrapos (\\b => conjThat ++ slash.s ! ag ! (vs.m ! b))
(np.s ! No).comp np.a
(insertExtrapos (\\b => conjThat ++ slash.s ! ag ! (vs.m ! b))
(predV vs))
).s ;
c2 = slash.c2
@@ -65,7 +70,8 @@ incomplete concrete SentenceRon of Sentence =
EmbedS s = {s = conjThat ++ s.s ! Indic} ;
EmbedQS qs = {s = qs.s ! QIndir} ;
-- EmbedVP vp = {s = infVP vp (agrP3 Masc Sg)} ; --- agr ---- compl
EmbedVP vp = let a = agrP3 Masc Sg in
{ s= "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++vp.comp ! a ++ vp.ext ! Pos };
UseCl t p cl = {
s = \\o => t.s ++ p.s ++ cl.s ! DDir ! t.t ! t.a ! p.p ! o
@@ -81,7 +87,7 @@ incomplete concrete SentenceRon of Sentence =
} ;
UseSlash t p cl = {
s = \\ag,mo =>
t.s ++ p.s ++ cl.s ! ag ! DDir ! t.t ! t.a ! p.p ! mo ;
t.s ++ p.s ++ cl.s ! False ! ag ! DDir ! t.t ! t.a ! p.p ! mo ;
c2 = cl.c2
} ;
@@ -91,4 +97,14 @@ incomplete concrete SentenceRon of Sentence =
s = \\o => s.s ! o ++ "," ++ r.s ! Indic ! agrP3 Masc Sg
} ;
oper putClit : Agr -> ParClit -> VP -> VP = \ag, pc, vp -> let nrC = nextClit vp.nrClit pc
in
case pc of
{PAcc => {s = vp.s; isRefl = vp.isRefl; clDat = vp.clDat; clAcc = cliticsAc ag.g ag.n ag.p; isFemSg = isAgrFSg ag;
comp = vp.comp; ext = vp.ext; neg = vp.neg; nrClit = nrC ; vpre = vp.vpre ; clitPre = vp.clitPre ; pReflClit = vp.pReflClit ;lock_VP = <>};
PDat => {s = vp.s; isRefl = vp.isRefl; clDat = cliticsDa ag.g ag.n ag.p; clAcc = vp.clAcc; isFemSg = vp.isFemSg;
comp = vp.comp; ext = vp.ext; neg = vp.neg; nrClit = nrC ; vpre = vp.vpre ; pReflClit = vp.pReflClit ;clitPre = vp.clitPre ;lock_VP = <>}
};
}

View File

@@ -1,4 +1,4 @@
incomplete concrete VerbRon of Verb =
concrete VerbRon of Verb =
CatRon ** open Prelude, ResRon in {
flags optimize=all_subs ;
@@ -9,7 +9,7 @@ incomplete concrete VerbRon of Verb =
s = verb.s ;
isRefl = verb.isRefl;
nrClit = verb.nrClit;
isFemSg = False ;
isFemSg = False ; pReflClit = verb.pReflClit ;
neg = table {Pos => ""; Neg => "nu"} ;
clAcc = RNoAg ; nrClit = verb.nrClit;
clDat = RNoAg ;
@@ -28,14 +28,14 @@ incomplete concrete VerbRon of Verb =
insertSimpObj (\\a => ap.s ! AF a.g a.n Indef ANomAcc) (UseV v) ;
SlashV2a verb = {s = verb.s ; isRefl = verb.isRefl; nrClit = verb.nrClit;
isFemSg = False ;
SlashV2a verb = {s = verb.s ; isRefl = verb.isRefl; nrClit = verb.nrClit;
isFemSg = False ; pReflClit = verb.pReflClit ;
neg = table {Pos => ""; Neg => "nu"} ;
clAcc = RNoAg ;
clDat = RNoAg ;
comp = \\a => [] ;
ext = \\p => [] ;
c2 = verb.c2 ; needAgr = False ; lock_VP = <>};
c2 = verb.c2 ; needAgr = False ; needClit = True ; lock_VP = <>};
@@ -47,9 +47,9 @@ incomplete concrete VerbRon of Verb =
vcAc = if_then_else VClit np.hasRef (nextClit v.nrClit PAcc) v.nrClit
in
case v.c2.isDir of
{Dir PAcc => (insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (UseV v)) ** {needAgr = False ; c2 = v.c3} ;
Dir PDat => (insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa (UseV v)) ** {needAgr = False ; c2 = v.c3};
_ => (insertSimpObj (\\_ => ss) (UseV v)) ** {needAgr = False ; c2 = v.c3}
{Dir PAcc => (insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c3} ;
Dir PDat => (insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa (UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c3};
_ => (insertSimpObjPre (\\_ => ss) (UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c3}
};
Slash3V3 v np = let s1 = v.c3.s ++ (np.s ! (v.c3.c)).comp ;
@@ -59,20 +59,20 @@ incomplete concrete VerbRon of Verb =
vcAc = if_then_else VClit np.hasRef (nextClit v.nrClit PAcc) v.nrClit
in
case v.c3.isDir of
{Dir PAcc => (insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (UseV v)) ** {needAgr = False ; c2 = v.c2} ;
Dir PDat => (insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa (UseV v)) ** {needAgr = False ; c2 = v.c2} ;
_ => (insertSimpObj (\\_ => ss) (UseV v)) ** {needAgr = False ; c2 = v.c2}
{Dir PAcc => (insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c2} ;
Dir PDat => (insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa (UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c2} ;
_ => (insertSimpObjPre (\\_ => ss) (UseV v)) ** {needAgr = False ; needClit = True ;c2 = v.c2}
};
-- needs fixing - agreement for the added verb must be made accordingly to what we add in ComplSlash !!!
-- fixed with extra parameter !
SlashV2V v vp = (insertSimpObj (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) (UseV v)) ** {needAgr = True ;c2 = v.c2} ;
SlashV2V v vp = (insertSimpObj (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) (UseV v)) ** {needAgr = True ; needClit = True ;c2 = v.c2} ;
SlashV2S v s = (insertExtrapos (\\b => conjThat ++ s.s ! Indic) (UseV v)) ** {needAgr = False; c2 = v.c2};
SlashV2S v s = (insertExtrapos (\\b => conjThat ++ s.s ! Indic) (UseV v)) ** {needAgr = False; needClit = True ;c2 = v.c2};
SlashV2Q v q = (insertExtrapos (\\_ => q.s ! QIndir) (UseV v)) ** {needAgr = False ; c2 = v.c2 } ;
SlashV2Q v q = (insertExtrapos (\\_ => q.s ! QIndir) (UseV v)) ** {needAgr = False ; needClit = False ;c2 = v.c2 } ;
@@ -80,7 +80,7 @@ incomplete concrete VerbRon of Verb =
SlashV2A v ap =
(insertSimpObj (\\a => v.c3.s ++ ap.s ! (AF Masc Sg Indef (convCase v.c3.c)))
(UseV v)) ** {needAgr = False ;c2 = v.c2} ;
(UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c2} ;
ComplSlash vp np = let s1 = vp.c2.s ++(np.s ! (vp.c2.c)).comp ;
ss = if_then_Str np.hasRef (vp.c2.prepDir ++ s1) s1 ;
@@ -90,11 +90,11 @@ incomplete concrete VerbRon of Verb =
vpp = case vp.c2.isDir of
{Dir PAcc => insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc vp ;
Dir PDat => insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa vp;
_ => insertSimpObj (\\_ => ss) vp
_ => insertSimpObjPre (\\_ => ss) vp
}
in
{isRefl = vpp.isRefl;
s = vpp.s ; isFemSg = vpp.isFemSg ;
{isRefl = vpp.isRefl;
s = vpp.s ; isFemSg = vpp.isFemSg ; pReflClit = vp.pReflClit ;
nrClit = vpp.nrClit; clAcc = vpp.clAcc ;
clDat = vpp.clDat ; neg = vpp.neg ;
comp = case vp.needAgr of
@@ -112,11 +112,14 @@ incomplete concrete VerbRon of Verb =
{Da => \\a => dRefl a;
_ => \\a => aRefl a
};
s = v.s ; isFemSg = v.isFemSg ;
s = v.s ; isFemSg = v.isFemSg ;
nrClit = case v.nrClit of
{VNone => VRefl;
_ => VMany };
clAcc = v.clAcc ;
pReflClit = case v.c2.c of
{Ac => Short ;
_ => Composite};
clDat = v.clDat ;
neg = v.neg ;
comp = v.comp ;
@@ -126,8 +129,8 @@ incomplete concrete VerbRon of Verb =
SlashVV v vp =
insertObjc (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) ((UseV v) **{c2=vp.c2; needAgr= vp.needAgr ; lock_VPSlash = <>}) ;
{-
insertObjc (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) ((UseV v) **{c2=vp.c2; needAgr= vp.needAgr ; needClit = False; lock_VPSlash = <>}) ;
SlashV2VNP v np vp = let s1 = v.c2.s ++(np.s ! (v.c2.c)).comp ;
ss = if_then_Str np.hasRef (v.c2.prepDir ++ s1) s1;
sir = if_then_Str np.isPronoun "" ss ;
@@ -136,14 +139,14 @@ incomplete concrete VerbRon of Verb =
vcomp = (getConjComp vp np.a).s
in
case v.c2.isDir of
{Dir PAcc => (insertObje (\\a => sir ++ vcomp ! a) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (UseV v)) ** {needAgr = vp.needAgr ; c2 = vp.c2} ;
{Dir PAcc => (insertObje (\\a => sir ++ vcomp ! a) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (UseV v)) ** {needAgr = vp.needAgr ; needClit = False ;c2 = vp.c2} ;
Dir PDat => (insertObje (\\a => sir ++ vcomp ! a) RNoAg (clitFromNoun np Da) False vcDa (UseV v)) ** {needAgr = vp.needAgr ; c2 = vp.c2};
Dir PDat => (insertObje (\\a => sir ++ vcomp ! a) RNoAg (clitFromNoun np Da) False vcDa (UseV v)) ** {needAgr = vp.needAgr ; needClit = False ; c2 = vp.c2};
_ => (insertSimpObj (\\a => ss ++ vcomp ! a) (UseV v)) ** {needAgr = vp.needAgr ; c2 = vp.c2}
_ => (insertSimpObjPre (\\a => ss ++ vcomp ! a) (UseV v)) ** {needAgr = vp.needAgr ; needClit = False ; c2 = vp.c2}
};
-}
UseComp comp = insertSimpObj comp.s (UseV copula) ;
CompAP ap = {s = \\ag => ap.s ! AF ag.g ag.n Indef ANomAcc} ;
@@ -158,143 +161,19 @@ incomplete concrete VerbRon of Verb =
oper conjVP : VP -> Agr -> Str = \vp,agr ->
let
inf = vp.s ! Subjo SPres agr.n agr.p ;
neg = vp.neg ! Pos ;
in
neg ++ inf ;
oper
insertAdv : Str -> VP -> VP = \co,vp -> {
s = vp.s ;
isRefl = vp.isRefl;
isFemSg = vp.isFemSg ;
isFemSg = vp.isFemSg ; pReflClit = vp.pReflClit ;
clAcc = vp.clAcc ; nrClit = vp.nrClit ;
clDat = vp.clDat ;
neg = vp.neg ;
neg = vp.neg ;
comp = \\a => vp.comp ! a ++ co ;
ext = vp.ext ;
lock_VP = <>
} ;
oper copula : V =
let t = table {Inf => "fi" ;
Indi Presn Sg P1 => "sunt" ; Indi Presn Sg P2 => "eºti" ; Indi Presn Sg P3 => "este" ;
Indi Presn Pl P1 => "suntem" ; Indi Presn Pl P2 => "sunteþi" ; Indi Presn Pl P3 => "sunt" ;
Indi PSimple Sg P1 => "fusei" ; Indi PSimple Sg P2 => "fuseºi" ; Indi PSimple Sg P3 => "fuse" ;
Indi PSimple Pl P1 => "fuserãm" ; Indi PSimple Pl P2 => "fuserãþi" ; Indi PSimple Pl P3 => "fuserã" ;
Indi Imparf Sg P1 => "eram" ; Indi Imparf Sg P2 => "erai" ; Indi Imparf Sg P3 => "era" ;
Indi Imparf Pl P1 => "eram" ; Indi Imparf Pl P2 => "eraþi" ; Indi Imparf Pl P3 => "erau" ;
Indi PPerfect Sg P1 => "fusesem" ; Indi PPerfect Sg P2 => "fuseseºi" ; Indi PPerfect Sg P3 => "fusese" ;
Indi PPerfect Pl P1 => "fusesem" ; Indi PPerfect Pl P2 => "fuseseþi" ; Indi PPerfect Pl P3 => "fuseserã" ;
Subjo SPres Sg P1 => "fiu" ; Subjo SPres Sg P2 => "fii" ; Subjo SPres Sg P3 => "fie" ;
Subjo SPres Pl P1 => "fim" ; Subjo SPres Pl P2 => "fiþi" ; Subjo SPres Pl P3 => "fie" ;
Imper SgP2 => "fii" ; Imper PlP2 => "fiþi" ; Imper PlP1 => "fim" ;
Ger => "fiind";
PPasse g n a d => (mkAdjReg "fost"). s ! (AF g n a d)
} in
{s = t; isRefl = \\_ => RNoAg; nrClit = VNone ; lock_V = <>} ;
predV : V -> VP = \verb ->
{
s = verb.s ;
isRefl = verb.isRefl;
isFemSg = False ;
nrClit = verb.nrClit ;
neg = table {Pos => ""; Neg => "nu"} ;
clAcc = RNoAg ;
clDat = RNoAg ;
comp = \\a => [] ;
ext = \\p => [] ; lock_VP = <>
} ;
useVP : VP -> VPC = \vp ->
let
verb = vp.s ;
vinf : Bool -> Str = \b -> verb ! Inf ;
vger = verb ! Ger ;
vimp : Agr -> Str = \a -> case <a.n,a.p> of
{<Sg,P2> => verb ! Imper SgP2 ;
<Pl,P2> => verb ! Imper PlP2 ;
_ => verb ! Subjo SPres a.n a.p
} ;
vf : Str -> (Agr -> Str) -> {
sa : Str ;
sv : Agr => Str
} =
\fin,inf -> {
sa = fin ;
sv = \\a => inf a
} ;
in {
s = table {
VPFinite tm Simul => case tm of
{VPres Indic => vf "" (\a -> verb ! Indi Presn a.n a.p) ;
VPres Conjunct => vf "sã" (\a -> verb ! Subjo SPres a.n a.p) ;
VImperff => vf "" (\a -> verb ! Indi Imparf a.n a.p) ;
VPasse Indic => vf "" (\a -> pComp ! a.n ! a.p ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
VPasse Conjunct => vf "sã" (\a -> copula.s! Inf ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
VFut => vf "" (\a -> pFut ! a.n ! a.p ++ verb ! Inf) ;
VCondit => vf "" (\a -> pCond ! a.n ! a.p ++ verb ! Inf)
} ;
VPFinite tm Anter => case tm of
{VPres Indic => vf "" (\a -> pComp ! a.n ! a.p ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
(VPres Conjunct | VPasse Conjunct) => vf "sã" (\a -> copula.s! Inf ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
VFut => vf "" (\a -> pFut !a.n ! a.p ++ copula.s! Inf ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
VCondit => vf "" (\a -> pCond ! a.n ! a.p ++ copula.s ! Inf ++ verb ! PPasse Masc Sg Indef ANomAcc);
_ => vf "" (\a -> verb ! Indi PPerfect a.n a.p)
};
VPInfinit Anter b=> vf "a" (\a -> copula.s ! Inf ++ verb ! PPasse Masc Sg Indef ANomAcc);
VPImperat => vf "sã" (\a -> verb ! Subjo SPres a.n a.p) ; -- fix it later !
VPGerund => vf "" (\a -> vger) ;
VPInfinit Simul b => vf "a" (\a -> verb ! Inf)
} ;
agr = vp.agr ;
neg = vp.neg ;
clitAc = vp.clAcc ;
clitDa = vp.clDat ;
clitRe = RNoAg ;
nrClit = vp.nrClit ;
comp = vp.comp ;
ext = vp.ext
} ;
mkClause : Str -> Bool -> Agr -> VP ->
{s : Direct => RTense => Anteriority => Polarity => Mood => Str} =
\subj,hasClit,agr,vpr -> {
s = \\d,t,a,b,m =>
let
tm = case t of {
RPast => VPasse m ;
RFut => VFut ;
RCond => VCondit ;
RPres => VPres m
} ;
cmp = case <t,a,m> of
{<RPast,Simul,Indic> | <RPres, Anter,Indic> => True ;
<RCond, _, _> => True;
_ => False
} ;
vp = useVP vpr ;
vps = (vp.s ! VPFinite tm a).sv ;
sa = (vp.s ! VPFinite tm a ).sa ;
verb = vps ! agr ;
neg = vp.neg ! b ;
clpr = flattenClitics vpr.nrClit vpr.clAcc vpr.clDat (vpr.isRefl ! agr) (andB vpr.isFemSg cmp) cmp;
compl = vp.comp ! agr ++ vp.ext ! b
in
case d of {
DDir =>
subj ++ sa ++ neg ++ clpr.s1 ++ verb ++ clpr.s2;
DInv =>
sa ++ neg ++ clpr.s1 ++verb ++ clpr.s2 ++subj
}
++ compl
} ;
@@ -303,62 +182,17 @@ mkClause : Str -> Bool -> Agr -> VP ->
oper auxPassive = copula ;
mkVPSlash : Compl -> VP -> VP ** {c2 : Compl} = \c,vp -> vp ** {c2 = c; needAgr = False} ;
insertObje : (Agr => Str) -> RAgr -> RAgr -> Bool -> VClit -> VP -> VP = \obj,clA, clD, agg, vc, vp -> {
s = vp.s ; isRefl = vp.isRefl;
isFemSg= orB agg vp.isFemSg ;
nrClit = vc;
neg = table {Pos => ""; Neg => "nu"} ;
clAcc = {s = \\cs => vp.clAcc.s ! cs ++ clA.s ! cs };
clDat = {s = \\cs => vp.clDat.s ! cs ++ clD.s ! cs };
comp = \\a => vp.comp ! a ++ obj ! a ;
ext = vp.ext ; lock_VP = <>
};
insertSimpObj : (Agr => Str) -> VP -> VP = \obj,vp -> {
s = vp.s ; isRefl = vp.isRefl; isFemSg = vp.isFemSg ; neg = vp.neg ;
clAcc = vp.clAcc ; clDat = vp.clDat ;
nrClit = vp.nrClit ;
comp = \\a => vp.comp ! a ++ obj ! a ;
ext = vp.ext ; lock_VP = <>
};
mkVPSlash : Compl -> VP -> VP ** {c2 : Compl} = \c,vp -> vp ** {c2 = c; needAgr = False; needClit = True} ;
insertObjc : (Agr => Str) -> VPSlash -> VPSlash = \obj,vp ->
insertSimpObj obj vp ** {c2 = vp.c2; needAgr = False ; lock_VPSlash = <>} ;
insertSimpObj obj vp ** {c2 = vp.c2; needAgr = False ; needClit = True ; lock_VPSlash = <>} ;
insertExtrapos : (Polarity => Str) -> VP -> VP = \co,vp -> {
s = vp.s ;
isFemSg = vp.isFemSg ;
clAcc = vp.clAcc ; isRefl = vp.isRefl;
clDat = vp.clDat ;
neg = vp.neg ;
comp = vp.comp ; nrClit = vp.nrClit ;
ext = \\p => vp.ext ! p ++ co ! p ;
lock_VP =<>
} ;
clitFromNoun : NP -> NCase -> RAgr = \np,nc ->
{s = (np.s ! nc).clit; hasClit = True};
isAgrFSg : Agr -> Bool = \ag ->
case <ag.n,ag.g,ag.p> of
{<Sg,Fem,P3> => True ;
_ => False
};
getConjComp : VP -> Agr -> {s: Agr => Str} = \vp,ag ->
{s = \\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp ag ++ vp.comp ! a ++ vp.ext ! Pos};
oper nextClit : VClit -> ParClit -> VClit = \vc,pc ->
case vc of
{ VNone => VOne pc;
_ => VMany
};
-- discuss example
-- l -table (ComplSlash (Slash3V3 sell_V3 (UsePN john_PN)) (UsePN paris_PN))
-- in English the direct object always comes first, which could lead to incorrect longer examples