working towards tram in 4 langs

This commit is contained in:
aarne
2006-01-20 23:03:50 +00:00
parent 6f89da4591
commit 29a4ef3172
25 changed files with 142 additions and 93 deletions

View File

@@ -1,9 +1,11 @@
incomplete concrete MathRomance of Math =
CatRomance ** open Prelude, ResRomance, DiffRomance in {
CatRomance ** open Prelude, CommonRomance, ResRomance in {
lin
SymbPN i = {s = \\c => i.s ; g = Neutr} ; --- c
IntPN i = {s = \\c => i.s ; g = Neutr} ; --- c
SymbPN i = {s = i.s ; g = Masc} ;
IntPN i = {s = i.s ; g = Masc} ;
{-
CNIntNP cn i = {
s = \\c => (cn.s ! Sg ! DIndef ! Nom ++ i.s) ;
a = agrP3 cn.g Sg
@@ -12,6 +14,7 @@ lin
s = \\c => det.s ! g ++ cn.s ! det.n ! det.det ! caseNP c ++ xs.s ;
a = agrP3 g det.n
} ;
-}
lincat
@@ -21,7 +24,7 @@ lin
MkSymb s = s ;
BaseSymb = infixSS conjAnd ;
BaseSymb = infixSS "et" ; ----
ConsSymb = infixSS "," ;
}

View File

@@ -14,11 +14,7 @@ incomplete concrete NounRomance of Noun =
c = Clit0
} ;
UsePN pn = {
s = \\c => prepCase (npform2case c) ++ pn.s ;
a = agrP3 pn.g Sg ;
c = Clit0
} ;
UsePN = pn2np ;
UsePron p = p ;

View File

@@ -1,24 +1,24 @@
incomplete concrete PhraseRomance of Phrase =
CatRomance, TenseX ** open DiffRomance, ResRomance, Prelude in {
CatRomance, TenseX ** open CommonRomance, ResRomance, Prelude in {
lin
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
UttS s = {s = s.s ! Main} ;
UttS s = {s = s.s ! Indic} ;
UttQS qs = {s = qs.s ! QDir} ;
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Sg} ;
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Pl} ;
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! aagr Fem Sg} ;
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! aagr Fem Pl} ;
UttIP ip = {s = ip.s ! nominative} ; --- Acc also
UttIP ip = {s = ip.s ! Nom} ; --- Acc also
UttIAdv iadv = iadv ;
UttNP np = {s = np.s ! accusative} ;
UttVP vp = {s = infMark ++ infVP vp (agrP3 Utr Sg)} ;
UttNP np = {s = np.s ! Ton Nom} ;
---- UttVP vp = {s = infVP vp (agrP3 Utr Sg)} ;
UttAdv adv = adv ;
NoPConj = {s = []} ;
PConjConj conj = conj ;
NoVoc = {s = []} ;
VocNP np = {s = "," ++ np.s ! nominative} ;
VocNP np = {s = "," ++ np.s ! Ton Nom} ;
}

View File

@@ -1,5 +1,5 @@
incomplete concrete QuestionRomance of Question =
CatRomance ** open DiffRomance, ResRomance in {
CatRomance ** open CommonRomance, ResRomance in {
flags optimize=all_subs ;
@@ -9,23 +9,19 @@ incomplete concrete QuestionRomance of Question =
s = \\t,a,p =>
let cls = cl.s ! t ! a ! p
in table {
QDir => cls ! Inv ;
QIndir => subjIf ++ cls ! Sub
QDir => cls ! Indic ;
QIndir => "si" ++ cls ! Indic ---- subjIf
}
} ;
QuestVP qp vp = {
s = \\t,a,b,q =>
let
somo = case q of {
QIndir => <"som",Sub> ;
_ => <[], Main>
} ;
cl = mkClause (qp.s ! nominative ++ somo.p1) {gn = qp.gn ; p = P3} vp
s = \\t,a,b,_ =>
let
cl = mkClause (qp.s ! Nom) (agrP3 qp.a.g qp.a.n) vp
in
cl.s ! t ! a ! b ! somo.p2
cl.s ! t ! a ! b ! Indic
} ;
{-
QuestSlash ip slash = {
s = \\t,a,p =>
let
@@ -62,5 +58,5 @@ incomplete concrete QuestionRomance of Question =
idet.s ! g ++ num.s ! g ++ ord.s ++ cn.s ! idet.n ! idet.det ! caseNP c ;
gn = gennum g idet.n
} ;
-}
}

View File

@@ -26,6 +26,12 @@ oper
complGen : Compl = {s = [] ; c = genitive ; isDir = False} ;
complDat : Compl = {s = [] ; c = dative ; isDir = True} ;
pn2np : {s : Str ; g : Gender} -> Pronoun = \pn -> {
s = \\c => prepCase (npform2case c) ++ pn.s ;
a = agrP3 pn.g Sg ;
c = Clit0
} ;
npform2case : NPForm -> Case = \p -> case p of {
Ton x => x ;
Aton x => x ;

View File

@@ -5,18 +5,18 @@ incomplete concrete SentenceRomance of Sentence =
lin
PredVP np vp = mkClause (np.s ! Aton Nom) np.a vp ;
{-
PredSCVP sc vp = mkClause sc.s (agrP3 neutrum Sg) vp ;
-- PredSCVP sc vp = mkClause sc.s (agrP3 neutrum Sg) vp ;
ImpVP vp = {
s = \\pol,n =>
s = \\pol,aag =>
let
agr = {gn = gennum utrum n ; p = P2} ;
verb = vp.s ! VPImperat ;
agr = aag ** {p = P2} ;
verb = (vp.s ! VPImperat).fin ! agr
in
verb.fin ++ vp.a1 ! pol ++ verb.inf ++ vp.n2 ! agr ++ vp.a2 ++ vp.ext
verb ++ vp.comp ! agr ++ vp.ext --- neg,clit
} ;
{-
SlashV2 np v2 =
mkClause
(np.s ! nominative) np.a

View File

@@ -6,6 +6,6 @@ incomplete concrete TensedRomance of Tensed = CatRomance, TenseX **
lin
UseCl t a p cl = {s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o} ;
UseQCl t a p cl = {s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q} ;
UseRCl t a p cl = {s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r} ;
-- UseRCl t a p cl = {s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r} ;
}