Merge branch 'latin'

This commit is contained in:
Herbert Lange
2019-06-24 18:23:26 +02:00
15 changed files with 5921 additions and 3010 deletions

View File

@@ -18,7 +18,7 @@ concrete AdverbLat of Adverb = CatLat ** open ResLat, Prelude, ParadigmsLat in
-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
ComparAdvAdjS cadv a s =
mkAdv (cadv.s ++ a.adv.s ! Compar ++ cadv.p ++ combineSentence s ! SPreS ! PreV ! SOV ) ;
mkAdv (cadv.s ++ a.adv.s ! Compar ++ cadv.p ++ combineSentence s ! SPreS ! PreV ! CPreV ! SOV ) ;
-- AdAdv : AdA -> Adv -> Adv ; -- very quickly
AdAdv ada adv = mkAdv (ada.s ++ (adv.s ! Posit) ) ;
@@ -30,7 +30,7 @@ concrete AdverbLat of Adverb = CatLat ** open ResLat, Prelude, ParadigmsLat in
-- Subordinate clauses can function as adverbs.
-- SubjS : Subj -> S -> Adv ; -- when she sleeps
SubjS subj s = mkAdv (subj.s ++ combineSentence s ! SPreS ! PreV ! SOV ) ;
SubjS subj s = mkAdv (subj.s ++ combineSentence s ! SPreS ! PreV ! CPreV ! SOV ) ;
-- AdnCAdv : CAdv -> AdN ; -- less (than five)
AdnCAdv cadv = {s = cadv.s ++ cadv.p} ;

View File

@@ -53,7 +53,7 @@ concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in {
Pron = ResLat.Pronoun ;
Det = Determiner ;
Predet = {s : Str} ;
Ord = Ordinal ;
Ord = { s : Gender => Number => Case => Str } ;
Num = {s : Gender => Case => Str ; n : Number} ;
Card = {s : Gender => Case => Str ; n : Number} ;
Quant = Quantifier ;
@@ -89,7 +89,9 @@ concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in {
linref
NP = \np -> np.preap.s ! Ag np.g np.n Nom ++ np.s ! Nom ++ np.postap.s ! Ag np.g np.n Nom ;
VP = \vp -> vp.adv ++ vp.inf ! VInfActPres ++ vp.obj ++ vp.compl ! Ag Masc Sg Nom ;
S = \s -> combineSentence s ! SPreO ! PreO ! SOV ;
S = \s -> combineSentence s ! SPreO ! PreO ! CPreV ! SOV ;
V, VS, VQ, VA = \v -> v.act ! (VAct VSim (VPres VInd) Sg P1) ;
V2, V2A, V2Q, V2S = \v -> v.act ! (VAct VSim (VPres VInd) Sg P1) ;
Pron = \p -> p.pers.s ! PronNonDrop ! PronNonRefl ! Nom ;
Conj = \c -> c.s1 ++ c.s2 ++ c.s3 ;
}

View File

@@ -8,31 +8,44 @@ concrete ConjunctionLat of Conjunction =
-- ConjS : Conj -> ListS -> S ; -- he walks and she runs
-- TO FIX
-- ConjS conj ss = { s = \\_ => conjunctDistrX conj (ss.l ! conj.c) ; sadv = lin Adv { s = []} ; neg = ss.neg } ;
ConjS conj ss = {
-- s = \\apos => coord conj.c { init = (ss.s ! conj.c).init ! SPreS ! apos ! CPreV ! SOV ;
-- last = (ss.s ! conj.c).last ! SPreS ! apos ! CPreV ! SOV} ;
s = \\apos => conj.s1 ++ (ss.s ! conj.c).init ! SPreS ! apos ! CPreV ! SOV ++ conj.s2 ++
(ss.s ! conj.c).last ! SPreS ! apos ! CPreV ! SOV ++ conj.s3 ;
o = \\_ => [] ;
v = \\_,_ => [] ;
neg = \\_ => [] ;
p = ss.p ;
sadv = [] ;
t = ss.t
} ;
-- ConjAdv : Conj -> ListAdv -> Adv ; -- here or there
ConjAdv conj ss = mkAdv (conjunctDistrSS conj (ss.l ! conj.c) ).s ;
-- ConjAdv conj ss = mkAdv (conjunctDistrSS conj (ss.l ! conj.c) ).s ;
-- ConjNP : Conj -> ListNP -> NP ; -- she or we
ConjNP conj nps =
{
s = case conj.c of {
And => case nps.isBase of {
False => (conjunctDistrTable Case conj (nps.l ! And)).s ;
True => \\c => conj.s1 ++ (nps.l ! And).s1 ! c ++ conj.s2 ++ (nps.l ! And).s2 ! c
} ;
c => (conjunctDistrTable Case conj (nps.l ! And)).s
} ;
n = case conj.c of { And => Pl ; _ => nps.n } ;
-- s = case conj.c of {
-- Et => case nps.isBase of {
-- False => (conjunctDistrTable Case conj (nps.l ! Et)).s ;
-- True => \\c => conj.s1 ++ (nps.l ! Et).s1 ! c ++ conj.s2 ++ (nps.l ! Et).s2 ! c
-- } ;
-- c => (conjunctDistrTable Case conj (nps.l ! Et)).s
-- } ;
s = \\ca => conj.s1 ++ (nps.s ! conj.c).init ! ca ++ conj.s2 ++ (nps.s ! conj.c).last ! ca++ conj.s3 ;
n = case conj.c of { Et => Pl ; _ => nps.n } ;
g = nps.g ;
p = nps.p ;
adv = nps.adv ;
preap = nps.preap ;
postap = nps.postap ;
det = { s = \\_,_ => "" ; sp = \\_,_ => "" ; n = nps.n };
postap = nps.postap ;
det = nps.det
} ;
-- ConjAP : Conj -> ListAP -> AP ;
ConjAP conj ss = conjunctDistrTable Agr conj (ss.l ! conj.c) ;
-- ConjAP conj ss = conjunctDistrTable Agr conj (ss.l ! conj.c) ;
--
-- DConjS = conjunctDistrSS ;
@@ -53,32 +66,40 @@ concrete ConjunctionLat of Conjunction =
--
-- BaseS : S -> S -> ListS
-- BaseS x y = {
-- l = \\c => { s1 = x ; s2 = y } ;
-- } ;
BaseS x y = {
s = \\c => { init = combineSentence x ; last = combineSentence y } ;
p = y.p ;
t = y.t
} ;
-- ConsS : S -> ListS -> ListS
-- TO FIX
-- ConsS x xs = { l = \\_ => consrSS bindComma (ss (x.s ! PreS)) (xs.l ! Comma) };
-- ConsS s ss = {
-- l = \\c =>
-- { s1 = ss.s1 ++
-- table {
-- And => and_Conj
-- } ! c
-- ++ ss.s2 ;
-- s2 = s }
-- } ;
ConsS s ss = {
s = \\co =>
{ init = \\s,a,c,o => coord co { init = (ss.s ! co).init ! s ! a ! c ! o ; last = (ss.s ! co).last ! s ! a ! c ! o } ;
last = combineSentence s } ;
p = s.p ;
t = s.t
} ;
-- BaseAdv : Adv -> Adv -> ListAdv
BaseAdv x y = { l = \\c => twoSS (ss (x.s ! Posit)) (ss (y.s ! Posit)) } ;
BaseAdv x y =
{
s = \\_ => { init = x.s ! Posit ; last = y.s ! Posit }
} ;
-- ConsAdv : Adv -> ListAdv -> ListAdv
ConsAdv x xs = { l = \\_ => consrSS bindComma (ss (x.s ! Posit)) (xs.l ! Comma) } ;
ConsAdv x xs =
{
-- s = \\_ => consrSS bindComma (ss (x.s ! Posit)) (xs.l ! Comma)
s = \\c => { init = coord c (xs.s ! c) ; last = x.s ! Posit }
} ;
-- BaseNP : NP -> NP -> ListNP ; -- John, Mary
-- -- BaseNP : NP -> NP -> ListNP ; -- John, Mary
BaseNP x y = {
l = \\c => twoTable Case x y ;
-- s = \\c => twoTable Case x y ;
s = \\c => { init = x.s ; last = y.s } ;
g = Masc ; -- Just guessing (but maybe sexist bullshit)
n = matchNumber x.n y.n ;
p = P3 ;
@@ -86,35 +107,35 @@ concrete ConjunctionLat of Conjunction =
preap = lin AP { s = \\a => x.preap.s ! a ++ y.preap.s ! a } ;
postap = lin AP { s = \\a => x.postap.s ! a ++ y.postap.s ! a } ;
isBase = True ;
det = { s = \\g,c => x.det.s ! g ! c ++ y.det.s ! g ! c ; sp = \\g,c => x.det.sp ! g ! c ++ y.det.sp ! g ! c ; n = matchNumber x.get.n y.get.n } ;
det = lin Det { s = \\g,c => x.det.s ! g ! c ++ y.det.s ! g ! c ; sp = \\g,c => x.det.sp ! g ! c ++ y.det.sp ! g ! c ; n = matchNumber x.det.n y.det.n } ;
} ;
-- ConsNP : NP -> ListNP -> ListNP ; -- John, Mary, Bill
-- -- ConsNP : NP -> ListNP -> ListNP ; -- John, Mary, Bill
ConsNP x xs = {
l = \\_ => consrTable Case bindComma x ( xs.l ! Comma );
-- s = \\_ => consrTable Case bindComma x ( xs.s ! Comma );
s = \\co => { init = \\ca => coord co { init = (xs.s ! co).init ! ca ; last = (xs.s ! co).last ! ca} ; last = x.s } ;
n = matchNumber x.n xs.n ;
g = xs.g ;
p = xs.p ;
adv = x.adv ++ xs.adv ;
preap = lin AP { s = \\a => x.preap.s ! a ++ xs.preap.s ! a } ;
postap = lin AP { s = \\a => x.postap.s ! a ++ xs.postap.s ! a } ;
isBase = False
-- TODO det
isBase = False ;
det = lin Det { s = \\g,c => x.det.s ! g ! c ++ xs.det.s ! g ! c ; sp = \\g,c => x.det.sp ! g ! c ++ xs.det.sp ! g ! c ; n = matchNumber x.det.n xs.det.n } ; -- try to combine the determiners, probably not what we want
} ;
-- BaseAP : AP -> AP -> ListAP
BaseAP x y = { l = \\c => twoTable Agr x y };
-- -- BaseAP : AP -> AP -> ListAP
-- BaseAP x y = { l = \\c => twoTable Agr x y };
-- ConsAP : AP -> ListAP -> ListAP
ConsAP x xs =
{ l = \\_ => consrTable Agr and_Conj.s2 x (xs.l ! Comma ) } ;
-- -- ConsAP : AP -> ListAP -> ListAP
-- ConsAP x xs =
-- { l = \\_ => consrTable Agr and_Conj.s2 x (xs.l ! Comma ) } ;
--
lincat
-- [S] = { l : Coordinator => {s1,s2 : S} } ; -- TO FIX
[Adv] = { l: Coordinator => {s1,s2 : Str}} ;
[NP] = {l : Coordinator => {s1,s2 : Case => Str} ; g : Gender ; n : Number ; p : Person ; adv : Str ; preap : AP ; postap : AP ; isBase : Bool } ;
[AP] = {l : Coordinator => {s1,s2 : Agr => Str } } ;
[S] = { s : Coordinator => {init,last : SAdvPos => AdvPos => ComplPos => Order => Str} ; p : Pol ; t : Tense } ; -- TO FIX
[Adv] = { s: Coordinator => {init,last : Str}} ;
[NP] = { s : Coordinator => {init,last : Case => Str} ; g : Gender ; n : Number ; p : Person ; adv : Str ; preap : AP ; postap : AP ; isBase : Bool ; det : Det } ;
[AP] = {s : Coordinator => {init,last : Agr => Str } } ;
oper
-- Generates a new number value given two number values.
@@ -126,5 +147,21 @@ concrete ConjunctionLat of Conjunction =
<_,Pl> => Pl ;
<_,_> => Sg
} ;
coord : Coordinator -> {init : Str ; last : Str} -> Str =
\c,l ->
l.init ++
table {
Aut => "aut" ;
Et => "et" ;
Sed => "sed" ;
Si => "si" ;
Vel => "vel" ;
Comma => bindComma ;
Colon => ":" ;
Empty => "" ;
Missing => nonExist
} ! c
++ l.last ;
--
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@ concrete ExtraLat of ExtraLatAbs =
open ResLat, ParadigmsLat, Coordination, Prelude in {
lincat CS = Str ;
lin
useS s = combineSentence s ! SPreO ! PreO ! SOV ;
useS s = combineSentence s ! SPreO ! PreO ! CPreV ! SOV ;
-- PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
-- PastPartAP vp = { s = vp.part ! VPassPerf } ;
@@ -25,13 +25,13 @@ concrete ExtraLat of ExtraLatAbs =
ConjNPque conj nps =
{
s = case conj.c of {
And => case nps.isBase of {
False => (conjunctDistrTable Case conj (nps.l ! And)).s ;
True => \\c => (nps.l ! And).s1 ! c ++ (nps.l ! And).s2 ! c ++ BIND ++ "que"
Et => case nps.isBase of {
False => \\cse => coord conj.c {init = (nps.s ! Et).init ! cse ; last = (nps.s ! Et).last ! cse } ;-- (conjunctDistrTable Case conj (nps.s ! Et)).s ;
True => \\cse => (nps.s ! Et).init ! cse ++ (nps.s ! Et).last ! cse ++ BIND ++ "que"
} ;
c => (conjunctDistrTable Case conj (nps.l ! And)).s
c => \\cse => coord conj.c {init = (nps.s ! c).init ! cse ; last = (nps.s ! c).last ! cse } -- (conjunctDistrTable Case conj (nps.l ! Et)).s
} ;
n = case conj.c of { And => Pl ; _ => nps.n } ;
n = case conj.c of { Et => Pl ; _ => nps.n } ;
g = nps.g ;
p = nps.p ;
adv = nps.adv ;

View File

@@ -178,7 +178,7 @@ lin
say_VS = mkVS (mkV "dicere" "dico" "dixi" "dictum") ; -- dico, dixi, dictum 3 (Langenscheidts)
school_N = mkN "schola" ; -- -ae f. (Langenscheidts)
-- Irregular
science_N = R.pluralN (mkN "litera" ) ; -- only pl. (Langenscheidts)
science_N = pluralN (mkN "litera" ) ; -- only pl. (Langenscheidts)
sea_N = mkN "mare" "maris" neuter ; -- -is n. (Langenscheidts)
seek_V2 = mkV2 (mkV "quaerere" "quaero" "quaesivi" "quaesitum" ) ; -- quaero, quaesivi, quaesitum 3 (Langenscheidts)
see_V2 = mkV2 (mkV "videre") ; -- video, vidi, visum 2 (Langenscheidts)

View File

@@ -111,8 +111,8 @@ concrete NounLat of Noun = CatLat ** open ResLat, Prelude, ConjunctionLat in {
-- OrdDigits n = {s = n.s ! NOrd} ;
--
lin
NumNumeral numeral = numeral.card ;
OrdNumeral numeral = numeral.ord ;
-- NumNumeral numeral = numeral.s ;
-- OrdNumeral numeral = numeral.ord ;
--
-- AdNum adn num = {s = adn.s ++ num.s ; n = num.n} ;
--

View File

@@ -1,6 +1,6 @@
concrete NumeralLat of Numeral = CatLat ** open ResLat,ParadigmsLat in {
concrete NumeralLat of Numeral = CatLat ** open ResLat,ParadigmsLat,Prelude in {
lincat
Digit = Numeral ;
Digit = TDigit ;
Sub10 = Numeral ;
Sub100 = Numeral ;
Sub1000 = Numeral ;
@@ -8,38 +8,83 @@ concrete NumeralLat of Numeral = CatLat ** open ResLat,ParadigmsLat in {
lin
num x = x ;
n2 = lin Numeral ( mkNum "duo" "secundus" ) ;
n3 = lin Numeral ( mkNum "tres" "tertius" ) ;
n4 = lin Numeral ( mkNum "quattuor" "quartus" ) ;
n5 = lin Numeral ( mkNum "quinque" "quintus" ) ;
n6 = lin Numeral ( mkNum "sex" "sextus" ) ;
n7 = lin Numeral ( mkNum "septem" "septimus" ) ;
n8 = lin Numeral ( mkNum "octo" "ocatvus" ) ;
n9 = lin Numeral ( mkNum "novem" "nonus" ) ;
n2 = lin Digit ( mkDigit "duo" "viginti" "ducenti" "secundus" ) ;
n3 = lin Digit ( mkDigit "tres" "triginta" "trecenti" "tertius" ) ;
n4 = lin Digit ( mkDigit "quattuor" "quadraginta" "quadringenti" "quartus" ) ;
n5 = lin Digit ( mkDigit "quinque" "quinquaginta" "quingenti" "quintus" ) ;
n6 = lin Digit ( mkDigit "sex" "sexaginta" "sescenti" "sextus" ) ;
n7 = lin Digit ( mkDigit "septem" "septuaginta" "septingenti" "septimus" ) ;
n8 = lin Digit ( mkDigit "octo" "octoginta" "octingenti" "ocatvus" ) ;
n9 = lin Digit ( mkDigit "novem" "nonaginta" "nongenti" "nonus") ;
lin pot01 = lin Numeral ( mkNum "unus" "primus" ) ;
lin pot0 d = d ;
--lin pot110 = regCardOrd "ten" ** {n = Pl} ;
--lin pot111 = regCardOrd "eleven" ** {n = Pl} ;
--lin pot1to19 d = {s = d.s ! teen} ** {n = Pl} ;
lin pot0as1 n = n ;
--lin pot1 d = {s = d.s ! ten} ** {n = Pl} ;
--lin pot1plus d e = {
-- s = \\c => d.s ! ten ! NCard ++ "-" ++ e.s ! unit ! c ; n = Pl} ;
pot1as2 n = n ;
--lin pot2 d = {s = \\c => d.s ! unit ! NCard ++ mkCard c "hundred"} ** {n = Pl} ;
--lin pot2plus d e = {
-- s = \\c => d.s ! unit ! NCard ++ "hundred" ++ "and" ++ e.s ! c ; n = Pl} ;
pot2as3 n = n ;
--lin pot3 n = {
-- s = \\c => n.s ! NCard ++ mkCard c "thousand" ; n = Pl} ;
--lin pot3plus n m = {
-- s = \\c => n.s ! NCard ++ "thousand" ++ m.s ! c ; n = Pl} ;
--
-- 1
pot01 = { s = n1.s ! one ; n = Sg } ;
-- d * 1
pot0 d = { s = d.s ! one ; n = Pl } ;
-- 10
pot110 = { s = n1.s ! ten ; n = Sg } ;
-- 11
-- pot111 = pot1to19 pot01 ;
-- -- 10 + d
-- -- pot1to19 d = mkNum "" "" "" "" ; -- {s = d.s ! teen} ** {n = Pl} ;
-- coercion of 1..9
pot0as1 n = n ;
-- d * 10
pot1 d = {s = d.s ! ten ; n = Pl} ;
-- d * 10 + n
-- pot1plus d e = {
-- s = \\c => d.s ! ten ++ "-" ++ e.s ! one ! c ;
-- n = Pl} ;
-- coercion of 1..99
pot1as2 n = n ;
-- m * 100
-- pot2 d = {s = d.s ! hundred ; n = Pl} ;
-- -- m * 100 + n
-- --lin pot2plus d e = {
-- -- s = \\c => d.s ! unit ! NCard ++ "hundred" ++ "and" ++ e.s ! c ; n = Pl} ;
-- coercion of 1..999
pot2as3 n = n ;
-- -- m * 1000
-- --lin pot3 n = {
-- -- s = \\c => n.s ! NCard ++ mkCard c "thousand" ; n = Pl} ;
-- -- m * 1000 + n
-- --lin pot3plus n m = {
-- -- s = \\c => n.s ! NCard ++ "thousand" ++ m.s ! c ; n = Pl} ;
oper
n1 : Digit = lin Digit ( fullDigit "unus" "decem" "primus" "decimus" "centesimus" "millesimus" ) ;
mkDigit : (ones, tens, hundreds, ord : Str) -> TDigit =
\ones, tens, hundreds, ord ->
case <tens,hundreds> of {
<"decem",_> => fullDigit ones tens hundreds ord "decimus" "centesimus" ;
<"viginti",_> => fullDigit ones tens hundreds ord "vicesimus" "ducentesimus" ;
<"triginta",_> => fullDigit ones tens hundreds ord "tricesimus" "trecentesimus" ;
<quadra + "ginta",quadringent + "i"> => fullDigit ones tens hundreds ord (quadra + "gesimus") (quadringent + "esimus") ;
_ => Predef.error "Invalid number"
} ;
fullDigit : (ones, tens, hundreds, ord1,ord10,ord100 : Str) -> TDigit =
\ones, tens, hundreds, ord1,ord10,ord100 ->
{ s = table { one => cardFlex ones ;
ten => cardFlex tens ;
hundred => cardFlex hundreds ;
thousand => \\_,_ => nonExist ;
ten_thousand => \\_,_ => nonExist ;
hundred_thousand => \\_,_ => nonExist }
-- n = case ones of { "unus" => Sg ; _ => Pl } ;
-- ord =
-- \\_,_ => [] ;
-- -- table { one => (mkA ord1).s ! Posit;
-- -- ten => (mkA ord10).s ! Posit ;
-- -- hundred => (mkA ord100).s ! Posit ;
-- -- thousand => \\_,_ => nonExist ;
-- -- ten_thousand => \\_ => nonExist ;
-- -- hundred_thousand => \\_ => nonExist } ;
} ;
-- numerals as sequences of digits
lincat
Dig = TDigit ;
Dig = TDig ;
lin
IDig d = {s = d.s ! one; unit = ten} ;
@@ -61,11 +106,11 @@ concrete NumeralLat of Numeral = CatLat ** open ResLat,ParadigmsLat in {
D_9 = mkDig "IX" "XC" "CM" "(IX)" "(XC)" "(CM)" ;
oper
TDigit = {
TDig = {
s : Unit => Str
} ;
mkDig : Str -> Str -> Str -> Str -> Str -> Str -> TDigit =
mkDig : Str -> Str -> Str -> Str -> Str -> Str -> TDig =
\one,ten,hundred,thousand,ten_thousand,hundred_thousand -> {
s = table Unit [one;ten;hundred;thousand;ten_thousand;hundred_thousand]
} ;

View File

@@ -34,6 +34,10 @@ oper
abl : Case = Abl ;
voc : Case = ResLat.Voc ;
plural : Number = Pl ;
singular : Number = Sg ;
missing : Coordinator = Missing ;
mkN = overload {
mkN : (verbum : Str) -> N
= \n -> lin N ( noun n ) ;
@@ -41,6 +45,10 @@ oper
= \x,y,z -> lin N ( noun_ngg x y z ) ;
} ;
pluralN : N -> N = \n -> lin N (ResLat.pluralNoun n) ;
singularN : N -> N = \n -> lin N (ResLat.singularNoun n) ;
constN : Str -> Gender-> N = \s,g -> lin N (ResLat.constNoun s g);
mkA = overload {
mkA : (verbum : Str) -> A -- Nominative masculine
= \n -> lin A ( adj n ** {isPre = False } ) ;
@@ -65,7 +73,7 @@ oper
False => let a = adj n in { s = table { Posit => a.s ! Posit ; _ => \\_ => nonExist } ; adv = a.adv }
} ** { isPre = False } )
} ;
constA : Str -> A = \s -> lin A (ResLat.constAdj s) ;
mkV = overload {
mkV : (tacere : Str) -> V
@@ -79,7 +87,7 @@ oper
V0 : Type = V;
mkV0 = overload {
mkV0 : V -> V0 = \v -> lin V0 v ; -- Same as in english, don't know if it's working
mkV0 : Str -> V0 = \v -> lin V0 (mkImpersonal v) ;
mkV0 : Str -> V0 = \v -> lin V0 (impersonalVerb v) ;
} ;
mkV2 = overload {
@@ -91,6 +99,7 @@ oper
= \v,p -> lin V2 ( v ** { c = p } ) ;
} ;
constV : Str -> Verb = \s -> lin V (ResLat.constVerb s) ;
mkAdv = overload {
mkAdv : Str -> Adv
@@ -101,16 +110,23 @@ oper
= \p,c -> lin Adv (mkFullAdverb p c nonExist);
};
pluralN = ResLat.pluralN ;
singularN = ResLat.singularN ;
mkConj : Str -> Str -> Number -> Coordinator -> Conjunction = mkConjunction ;
mkConj = overload {
mkConj : Str -> Str -> Str -> Number -> Coordinator -> Conjunction = mkConjunction ;
mkConj : Str -> Str -> Number -> Coordinator -> Conjunction = \s1,s2,n,c -> mkConjunction s1 s2 [] n c ;
mkConj : Str -> Coordinator -> Conjunction = \s,c -> mkConjunction [] s [] Sg c ;
} ;
mkPrep : Str -> Case -> Preposition = mkPreposition ;
mkPron = mkPronoun ;
mkNum = mkNumeral ;
-- mkNum = overload {
-- mkNum : Str -> Str -> Str -> Str -> Num = \s1,s2,s3,s4 -> lin Num (mkNumeral s1 s2 s3 s4 );
-- mkNum : Str -> Str -> Str -> Str -> Str -> Str -> Num = \s1,s2,s3,s4,s5,s6 -> lin Num (fullNumeral s1 s2 s3 s4 s5 s6 ) ;
-- } ;
-- To be implemented, just place holders
mkPN : N -> PN = \n -> lin PN n ;
mkN2 : N -> Prep -> N2 = \n,p -> lin N2 ( n ** { c = p } );

View File

@@ -3,7 +3,7 @@ concrete PhraseLat of Phrase = CatLat ** open Prelude, ResLat in {
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
--
-- UttS : S -> Utt
UttS s = { s = combineSentence s ! SPreS ! PreS ! SOV };
UttS s = { s = combineSentence s ! SPreS ! PreS ! CPreV ! SOV };
-- UttQS : QS -> Utt
UttQS qs = {s = qs.s ! QDir } ;

View File

@@ -27,6 +27,7 @@ param
param
Order = SVO | VSO | VOS | OSV | OVS | SOV ;
AdvPos = PreS | PreV | PreO | PreNeg | InV | InS ; -- | InO
ComplPos = CPreV | CPostV ;
SAdvPos = SPreS | SPreV | SPreO | SPreNeg ;
param
Agr = Ag Gender Number Case ; -- Agreement for NP et al.
@@ -55,7 +56,7 @@ param
-- massable = cn.massable;
} ;
pluralN : Noun -> Noun = \n ->
pluralNoun : Noun -> Noun = \n ->
{
s = table {
Pl => n.s ! Pl ;
@@ -67,7 +68,7 @@ param
-- massable = n.massable ;
};
singularN : Noun -> Noun = \n ->
singularNoun : Noun -> Noun = \n ->
lin N {
s = table {
Sg => n.s ! Sg ;
@@ -78,6 +79,8 @@ param
postap = n.postap
-- massable = n.massable ;
};
constNoun : Str -> Gender -> Noun = \s,g ->
{ s = \\_,_ => s ; g = g } ;
param
AdjPos = Pre | Post ;
@@ -151,7 +154,8 @@ param
AdjectivePhrase : Type = {
s : Agr => Str ;
-- isPre : Bool ; -- should have no use in latin because adjectives can appear variably before and after nouns
} ;
} ;
mkAdjective : (bonus,bona,bonum : Noun) ->
( (Agr => Str) * Str ) ->
( (Agr => Str) * Str ) ->
@@ -186,11 +190,14 @@ param
audaces audaces (audac + "ium") (audac + "ibus")
g ;
emptyAdj : Adjective =
{ s = \\_,_ => "" ; comp_adv = "" ; super_adv = "" ; adv = { s = \\_ => "" } } ;
-- verbs
constAdj : Str -> Adjective = \a ->
{ s = \\_,_ => a ; comp_adv = "" ; super_adv = "" ; adv = { s = \\_ => "" } } ;
-- verbs
param
VActForm = VAct VAnter VTense Number Person ;
@@ -377,6 +384,7 @@ param
VPass VFut Pl P3 => -- Future I
( case fut_I_base of {
_ + "bi" => ( init fut_I_base ) + "u" ;
"eri" => "eru" ; -- handle copula properly
_ => fut_I_base
}
) + passPresEnding Pl P3 ;
@@ -745,7 +753,7 @@ param
} ;
-- at the moment only fills present tense
mkImpersonal : Str -> Verb = \s ->
impersonalVerb : Str -> Verb = \s ->
{
act = table {
VAct VSim (VPres VInd) Sg P1 => s ;
@@ -759,7 +767,20 @@ param
part = \\_,_ => nonExist ;
sup = \\_ => nonExist ;
} ;
constVerb : Str -> Verb = \s ->
{
act = table {
_ => s
} ;
pass = \\_ => nonExist ;
imp = \\_ => nonExist ;
inf = \\_ => nonExist ;
ger = \\_ => nonExist ;
geriv = \\_ => nonExist ;
part = \\_,_ => nonExist ;
sup = \\_ => nonExist ;
} ;
actPresEnding : Number -> Person -> Str =
useEndingTable <"m", "s", "t", "mus", "tis", "nt"> ;
@@ -1157,10 +1178,11 @@ oper
Preposition : Type = {s : Str ; c : Case ; isPost : Bool } ;
-- conjunctions
param Coordinator = And | Or | If | Neither | Because | Comma | Colon | Empty ;
param Coordinator = Aut | Et | Sed | Si | Vel | Comma | Colon | Empty | Missing ; -- Missing means not implemented yet
oper
Conjunction : Type = { s1 : Str ; s2 : Str ; n : Number ; c : Coordinator };
mkConjunction : Str -> Str -> Number -> Coordinator -> Conjunction = \s1,s2,num,coord -> { s1 = s1; s2 = s2 ; n = num ; c = coord } ;
Conjunction : Type = { s1 : Str ; s2 : Str ; s3 : Str ; n : Number ; c : Coordinator } ; -- s1 is in the beginning of the coordination phrase, s2 in the middle and s3 is a potential enclitic, s is the prefered number of the coordination phrase and c is the parameter to define which string to put within the phrase
mkConjunction : Str -> Str -> Str -> Number -> Coordinator -> Conjunction =
\s1,s2,s3,num,coord -> { s1 = s1; s2 = s2 ; s3 = s3 ; n = num ; c = coord } ;
VPSlash = VerbPhrase ** {c : Preposition} ;
@@ -1226,19 +1248,22 @@ oper
-- clauses
Sentence =
{
s,o,v,neg : AdvPos => Str ; -- Subject, verbphrase, object and negation particle plus potential adverb
s,o,neg : AdvPos => Str ; -- Subject, verbphrase, object and negation particle plus potential adverb
v : AdvPos => ComplPos => Str ;
t : C.Tense ; -- tense marker
p : C.Pol ; -- polarity marker
sadv : Str -- sentence adverb¡
} ;
Clause = {s,o : AdvPos => Str ; v : Tense => Anteriority => VQForm => AdvPos => Str ; neg : Polarity => AdvPos => Str ; adv : Str } ;
Clause = {s,o : AdvPos => Str ; v : Tense => Anteriority => VQForm => AdvPos => ComplPos => Str ; neg : Polarity => AdvPos => Str ; adv : Str } ;
QClause = {s : C.Tense => Anteriority => C.Pol => QForm => Str} ;
mkClause : NounPhrase -> VerbPhrase -> Clause = \np,vp ->
let
-- combines adverbs from noun phrase and verb phrase
adv = np.adv ++ vp.adv ;
-- extracts the complement from the verb phrase
compl = vp.compl ! Ag np.g np.n Nom ;
-- helper functions to either place the adverb in the designated position
-- or an empty string instead
pres : AdvPos -> Str = \ap -> case ap of { PreS => adv ; _ => [] } ;
@@ -1246,33 +1271,38 @@ oper
preo : AdvPos -> Str = \ap -> case ap of { PreO => adv ; _ => [] } ;
preneg : AdvPos -> Str = \ap -> case ap of { PreNeg => adv ; _ => [] } ;
ins : AdvPos -> Str = \ap -> case ap of { InS => adv ; _ => [] } ;
inv : AdvPos -> Str = \ap -> case ap of { InV => adv ; _ => [] }
inv : AdvPos -> Str = \ap -> case ap of { InV => adv ; _ => [] } ;
cprev : ComplPos -> Str = \cp -> case cp of { CPreV => compl ; _ => [] } ;
cpostv : ComplPos -> Str = \cp -> case cp of { CPostV => compl ; _ => [] }
in
{
-- subject part of the clause:
-- ap is the adverb position in the clause
s = \\ap =>
pres ap ++ -- adverbs can be placed in the beginning of the clause
-- advpos is the adverb position in the clause
s = \\advpos =>
pres advpos ++ -- adverbs can be placed in the beginning of the clause
np.det.s ! np.g ! Nom ++ -- the determiner, if any
np.preap.s ! (Ag np.g np.n Nom) ++ -- adjectives which come before the subject noun, agreeing with it
ins ap ++ -- adverbs can be placed within the subject noun phrase
ins advpos ++ -- adverbs can be placed within the subject noun phrase
np.s ! Nom ++ -- the noun of the subject noun phrase in nominative
np.postap .s ! (Ag np.g np.n Nom) ++ -- adjectives which come after the subject noun, agreeing with it
np.det.sp ! np.g ! Nom ; -- second part of split determiners
-- verb part of the clause:
-- tense and anter(ority) for the verb tense
-- vqf is the VQForm parameter which defines if the ordinary verbform or the quistion form with suffix "-ne" will be used
-- ap is the adverb position in the clause
v = \\tense,anter,vqf,ap =>
prev ap ++ -- adverbs can be placed in the before the verb phrase
vp.compl ! Ag np.g np.n Nom ++ -- verb phrase complement, e.g. predicative expression, agreeing with the subject
inv ap ++ -- adverbs can be placed within the verb phrase
-- advposis the adverb position in the clause
-- comppos is the position of the verb complement
v = \\tense,anter,vqf,advpos,complpos =>
prev advpos ++ -- adverbs can be placed in the before the verb phrase
cprev complpos ++ -- verb phrase complement, e.g. predicative expression, agreeing with the subject, can go before the verb
inv advpos ++ -- adverbs can be placed within the verb phrase
-- verb form with conversion between different forms of tense and aspect
vp.s ! VAct ( anteriorityToVAnter anter ) ( tenseToVTense tense ) np.n np.p ! vqf ;
vp.s ! VAct ( anteriorityToVAnter anter ) ( tenseToVTense tense ) np.n np.p ! vqf ++
cpostv complpos ; -- complement can also go after the verb
-- object part of the clause
o = \\ap => preo ap ++ vp.obj ;
o = \\advpos => preo advpos ++ vp.obj ;
-- optional negation particle, adverbs can be placed before the negation
neg = \\pol,ap => preneg ap ++ negation pol ;
neg = \\pol,advpos => preneg advpos ++ negation pol ;
adv = ""
} ;
@@ -1286,20 +1316,23 @@ oper
p = pol
} ;
combineSentence : Sentence -> ( SAdvPos => AdvPos => Order => Str ) = \s ->
combineSentence : Sentence -> ( SAdvPos => AdvPos => ComplPos => Order => Str ) = \s ->
let
pres : SAdvPos -> Str = \ap -> case ap of { SPreS => s.sadv ; _ => [] } ;
prev : SAdvPos -> Str = \ap -> case ap of { SPreV => s.sadv ; _ => [] } ;
preo : SAdvPos -> Str = \ap -> case ap of { SPreO => s.sadv ; _ => [] } ;
preneg : SAdvPos -> Str = \ap -> case ap of { SPreNeg => s.sadv ; _ => [] }
in
\\sap,ap,order => case order of {
SVO => s.t.s ++ s.p.s ++ pres sap ++ s.s ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ++ preo sap ++ s.o ! ap;
VSO => s.t.s ++ s.p.s ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ++ pres sap ++ s.s ! ap ++ preo sap ++ s.o ! ap;
VOS => s.t.s ++ s.p.s ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ++ preo sap ++ s.o ! ap ++ pres sap ++ s.s ! ap ;
OSV => s.t.s ++ s.p.s ++ preo sap ++ s.o ! ap ++ pres sap ++ s.s ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap;
OVS => s.t.s ++ s.p.s ++ preo sap ++ s.o ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ++ pres sap ++ s.s ! ap ;
SOV => s.t.s ++ s.p.s ++ pres sap ++ s.s ! ap ++ preo sap ++ s.o ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap
-- sap is the position of the sentence adverbial
-- ap is the position of the adverb
-- cp is the position of the verb complement
\\sap,ap,cp,order => case order of {
SVO => s.t.s ++ s.p.s ++ pres sap ++ s.s ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp ++ preo sap ++ s.o ! ap;
VSO => s.t.s ++ s.p.s ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp ++ pres sap ++ s.s ! ap ++ preo sap ++ s.o ! ap;
VOS => s.t.s ++ s.p.s ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp ++ preo sap ++ s.o ! ap ++ pres sap ++ s.s ! ap ;
OSV => s.t.s ++ s.p.s ++ preo sap ++ s.o ! ap ++ pres sap ++ s.s ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp;
OVS => s.t.s ++ s.p.s ++ preo sap ++ s.o ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp ++ pres sap ++ s.s ! ap ;
SOV => s.t.s ++ s.p.s ++ pres sap ++ s.s ! ap ++ preo sap ++ s.o ! ap ++ preneg sap ++ s.neg ! ap ++ prev sap ++ s.v ! ap ! cp
} ;
@@ -1307,8 +1340,8 @@ oper
-- questions
mkQuestion : SS -> Clause -> QClause = \ss,cl -> {
s = \\tense,anter,pol,form => case form of {
QDir => ss.s ++ (combineSentence (combineClause cl tense anter pol VQFalse)) ! SPreS ! PreS ! OVS ;
QIndir => ss.s ++ (combineSentence (combineClause cl tense anter pol VQFalse)) ! SPreO ! PreO ! OSV
QDir => ss.s ++ (combineSentence (combineClause cl tense anter pol VQFalse)) ! SPreS ! PreS ! CPreV ! OVS ;
QIndir => ss.s ++ (combineSentence (combineClause cl tense anter pol VQFalse)) ! SPreO ! PreO ! CPreV ! OSV
}
};
@@ -1387,49 +1420,54 @@ oper
{ s = table { Posit => p ; Compar => c ; Super => s } };
-- numerals
param
CardOrd = NCard | NOrd ;
-- CardOrd = NCard | NOrd ;
Unit = one | ten | hundred | thousand | ten_thousand | hundred_thousand ;
oper
Cardinal : Type = {s : Gender => Case => Str ; n : Number};
Ordinal : Type = { s : Gender => Number => Case => Str } ;
Numeral : Type = { card : Cardinal ; ord : Ordinal } ;
-- Numerals are by default cardinal numbers but have a field for ordinal numbers
TDigit : Type = { s : Unit => Gender => Case => Str } ; -- ord : Unit => Agr => Str } ;
Numeral : Type = { s : Gender => Case => Str ; n : Number } ; -- ord : Unit => Agr => Str } ;
-- Inflection for cardinal numbers
cardFlex : Str -> Gender => Case => Str =
\c -> case c of { "unus" => \\gen,cas => case <gen,cas> of {
<Masc, Nom | Voc> => "unus" ; <Masc, Acc> => "unum" ; <Masc, Abl> => "uno" ;
<Fem, Nom | Abl | Voc> => "una" ; <Fem, Acc> => "unam" ;
<Neutr, Nom | Acc | Voc> => "unum" ; <Neutr, Abl> => "uno" ;
<_, Gen> => "unius" ; <_, Dat> => "uni"
} ;
"duo" => table {
Masc | Neutr => table Case [ "duo" ; "duo" ; "duorum" ; "duobus" ; "duobus" ; "duo" ] ;
Fem => table Case [ "duae" ; "duas" ; "duarum" ; "duabus" ; "duabus" ; "duae" ] } ;
"tres" => \\gen,cas => case <gen,cas> of {
<Neutr, Nom | Acc | Voc > => "tria" ; <_, Nom | Acc | Voc > => "tres" ;
<_, Gen> => "trium" ; <_, Dat | Abl > => "tribus"
} ;
"milia" => table {
Neutr => table Case [ "milia" ; "milia" ; "milium" ; "milibus" ; "milibus" ; "milia" ] ;
_ => \\_ => nonExist
} ;
_ => \\_,_ => c
} ;
-- ordFlex : Gender => Number => Case => Str =
-- case o of {
-- stem + "us" => table {
-- Masc => table Number [ table Case [ stem + "us" ; stem + "um" ; stem + "i" ; stem + "o" ; stem + "o" ; stem + "e" ] ;
-- table Case [ stem + "i" ; stem + "os" ; stem + "orum" ; stem + "is" ; stem + "is" ; stem + "i" ] ;
-- ];
-- Fem => table Number [ table Case [ stem + "a" ; stem + "am" ; stem + "ae" ; stem + "ae" ; stem + "a" ; stem + "a" ] ;
-- table Case [ stem + "ae" ; stem + "as" ; stem + "arum" ; stem + "is" ; stem + "is" ; stem + "ae" ] ;
-- ] ;
-- Neutr => table Number [ table Case [ stem + "um" ; stem + "um" ; stem + "i" ; stem + "o" ; stem + "o" ; stem + "um" ] ;
-- table Case [ stem + "a" ; stem + "a" ; stem + "orum" ; stem + "is" ; stem + "is" ; stem + "a" ] ;
-- ]
-- } ;
-- _ => error "unsupported ordinal form"
-- }
-- in
-- { s = cardFlex ; n = case c of { "unus" => Sg ; _ => Pl } ; ord = ordFlex } ;
-- fixedNumeral : Str -> Str -> Numeral = \c,o ->
-- { s = \\_,_,_=> c ; n = Pl ; ord = \\g,n,c => (mkA o).s ! Posit ! Ag g n c} ;
mkNumeral : Str -> Str -> Numeral = \c,o -> -- cardinal and ordinal form
let
cardFlex : Gender => Case => Str = case c of { "unus" => \\gen,cas => case <gen,cas> of {
<Masc, Nom | Voc> => "unus" ; <Masc, Acc> => "unum" ; <Masc, Abl> => "uno" ;
<Fem, Nom | Abl | Voc> => "una" ; <Fem, Acc> => "unam" ;
<Neutr, Nom | Acc | Voc> => "unum" ; <Neutr, Abl> => "uno" ;
<_, Gen> => "unius" ; <_, Dat> => "uni"
} ;
"duo" => table {
Masc | Neutr => table Case [ "duo" ; "duo" ; "duorum" ; "duobus" ; "duobus" ; "duo" ] ;
Fem => table Case [ "duae" ; "duas" ; "duarum" ; "duabus" ; "duabus" ; "duae" ] } ;
"tres" => \\gen,cas => case <gen,cas> of {
<Neutr, Nom | Acc | Voc > => "tria" ; <_, Nom | Acc | Voc > => "tres" ;
<_, Gen> => "trium" ; <_, Dat | Abl > => "tribus"
} ;
"milia" => table {
Neutr => table Case [ "milia" ; "milia" ; "milium" ; "milibus" ; "milibus" ; "milia" ] ;
_ => \\_ => nonExist
} ;
_ => \\_,_ => c
} ;
ordFlex : Gender => Number => Case => Str =
case o of {
stem + "us" => table {
Masc => table Number [ table Case [ stem + "us" ; stem + "um" ; stem + "i" ; stem + "o" ; stem + "o" ; stem + "e" ] ;
table Case [ stem + "i" ; stem + "os" ; stem + "orum" ; stem + "is" ; stem + "is" ; stem + "i" ] ;
];
Fem => table Number [ table Case [ stem + "a" ; stem + "am" ; stem + "ae" ; stem + "ae" ; stem + "a" ; stem + "a" ] ;
table Case [ stem + "ae" ; stem + "as" ; stem + "arum" ; stem + "is" ; stem + "is" ; stem + "ae" ] ;
] ;
Neutr => table Number [ table Case [ stem + "um" ; stem + "um" ; stem + "i" ; stem + "o" ; stem + "o" ; stem + "um" ] ;
table Case [ stem + "a" ; stem + "a" ; stem + "orum" ; stem + "is" ; stem + "is" ; stem + "a" ] ;
]
} ;
_ => error "unsupported ordinal form"
}
in
{ card = { s = cardFlex ; n = case c of { "unus" => Sg ; _ => Pl } } ; ord = { s = ordFlex } } ;
}

View File

@@ -11,19 +11,19 @@ concrete StructuralLat of Structural = CatLat **
almost_AdA, almost_AdN = ss "quasi" ; -- L...
although_Subj = ss "quamquam" ; -- L...
always_AdV = ss "semper" ; -- L...
and_Conj = mkConj [] "et" Pl And ; -- L...
and_Conj = mkConj [] "et" Pl Et ; -- L...
-----b and_Conj = ss "and" ** {n = Pl} ;
because_Subj = ss "cum" ; -- L...
before_Prep = mkPrep "ante" Acc ; -- acc. L...
behind_Prep = mkPrep "a tergo" Acc ; -- acc. L...
between_Prep = mkPrep "inter" Acc ; -- acc. L...
both7and_DConj = mkConj "et" "et" Pl And; --L...
both7and_DConj = mkConj "et" "et" Pl Et ; --L...
but_PConj = ss "sed" ; -- L...
by8agent_Prep = mkPrep "per" Abl ; -- L...
by8means_Prep = mkPrep "" Abl ; -- L...
can8know_VV, can_VV = mkVV IrregLat.can_V True ; --L...
during_Prep = mkPrep "inter" Acc ; -- L...
either7or_DConj = mkConj "aut" "aut" Sg Or ; -- L...
either7or_DConj = mkConj "aut" "aut" Sg Aut ; -- L...
everybody_NP = regNP "quisque" "quemque" "cuiusque" "cuique" "quoque" "quisque" Masc Sg ;-- regNP "quisquae" Sg ; -- L...
every_Det = mkDeterminer ( mkA "omnis" ) Pl ; -- Pons
everything_NP = regNP "omnia" "omnia" "omnium" "omnis" "omnis" "omnia" Neutr Pl ; --regNP "omnia" Pl ; -- L...
@@ -55,7 +55,7 @@ concrete StructuralLat of Structural = CatLat **
on_Prep = mkPrep "in" Acc ; -- L...
------ one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED
only_Predet = ss "solum" ; -- L...
or_Conj = mkConj [] "aut" Sg Or ; -- L...
or_Conj = mkConj [] "aut" Sg Aut ; -- L...
otherwise_PConj = ss "praeterea" ; -- Pons
part_Prep = mkPrep [] Gen ; -- Bayer-Lindauer 127
please_Voc = ss "queso" ; -- L...
@@ -113,7 +113,7 @@ concrete StructuralLat of Structural = CatLat **
no_Quant = { s , sp = ( mkA "nullus" ).s ! Posit } ; -- nullus L...
not_Predet = ss "non" ; -- L...
if_then_Conj = mkConj "si" [] Sg If ; -- no word in s2 field L...
if_then_Conj = mkConj "si" [] Sg Si ; -- no word in s2 field L...
at_least_AdN = ss "saltem" ; -- L...
at_most_AdN = ss "summum" ; -- Pons
nobody_NP = regNP "nemo" "neminem" "neminis" "nemini" "nemine" "nemo" Masc Sg ; -- Bayer Lindauer 60.4

View File

@@ -21,7 +21,7 @@ lin
-- } ;
--
SymbS sy = { s = \\_ => sy.s ; neg = \\_ => "" ; o = \\_ => "" ; p = PPos ; sadv = ss "" ; t = TPres ; v = \\_ => "" } ;
SymbS sy = { s = \\_ => sy.s ; neg = \\_ => "" ; o = \\_ => "" ; p = PPos ; sadv = "" ; t = TPres ; v = \\_,_ => "" } ;
--
-- SymbNum sy = {s = sy.s ; n = Pl ; hasCard = True} ;
SymbOrd sy = { s = \\g,n,c => sy.s } ; -- does not inflect properly

View File

@@ -103,7 +103,7 @@ concrete VerbLat of Verb = CatLat ** open (S=StructuralLat),ResLat,IrregLat,Extr
CompAP ap = ap ;
-- CompNP : NP -> Comp ; -- (be) the man
CompNP np = {s = \\_ => let a = Ag np.g np.n Nom in np.preap.s ! a ++ np.s ! Nom ++ np.postap.s ! a } ;
CompNP np = {s = \\_ => let a = Ag np.g np.n Nom in np.adv ++ np.det.s ! np.g ! Nom ++ np.preap.s ! a ++ np.s ! Nom ++ np.postap.s ! a } ;
-- CompAdv : Adv -> Comp ; -- (be) here
CompAdv a = {s = \\_ => a.s ! Posit } ;