progress with scandinavian

This commit is contained in:
aarne
2005-12-07 11:32:04 +00:00
parent 141fa43eb8
commit 0dfd8c1517
20 changed files with 414 additions and 316 deletions

View File

@@ -1,50 +1,73 @@
--concrete NounScand of Noun = CatScand ** open ResScand, Prelude in {
--
-- flags optimize=all_subs ;
--
-- lin
-- DetCN det cn = {
-- s = \\c => det.s ++ cn.s ! det.n ! c ;
-- a = agrP3 det.n
-- } ;
-- UsePN pn = pn ** {a = agrP3 Sg} ;
-- UsePron p = p ;
--
-- MkDet pred quant num ord = {
-- s = pred.s ++ quant.s ++ num.s ++ ord.s ;
-- n = quant.n
-- } ;
--
-- PossPronSg p = {s = p.s ! Gen ; n = Sg} ;
-- PossPronPl p = {s = p.s ! Gen ; n = Pl} ;
--
-- NoPredet, NoNum, NoOrd = {s = []} ;
-- NumInt n = n ;
--
-- NumNumeral numeral = {s = numeral.s ! NCard} ;
-- OrdNumeral numeral = {s = numeral.s ! NOrd} ;
--
-- AdNum adn num = {s = adn.s ++ num.s} ;
--
-- OrdSuperl a = {s = a.s ! AAdj Superl} ;
--
-- DefSg = {s = artDef ; n = Sg} ;
-- DefPl = {s = artDef ; n = Pl} ;
--
-- IndefSg = {s = artIndef ; n = Sg} ;
-- IndefPl = {s = [] ; n = Pl} ;
--
-- ComplN2 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c} ;
-- ComplN3 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ; c2 = f.c3} ;
--
-- AdjCN ap cn = {
-- s = \\n,c => preOrPost ap.isPre (ap.s ! agrP3 n) (cn.s ! n ! c)
-- } ;
-- RelCN cn rs = {s = \\n,c => cn.s ! n ! c ++ rs.s ! {n = n ; p = P3}} ;
--
-- SentCN cn s = {s = \\n,c => cn.s ! n ! c ++ conjThat ++ s.s} ;
-- QuestCN cn qs = {s = \\n,c => cn.s ! n ! c ++ qs.s ! QIndir} ;
--
-- UseN n = n ;
--
--}
incomplete concrete NounScand of Noun =
CatScand ** open DiffScand, ResScand, Prelude in {
flags optimize=all_subs ;
lin
DetCN det cn = let g = cn.g in {
s = \\c => det.s ! g ++ cn.s ! det.n ! det.det ! caseNP c ;
a = agrP3 g det.n
} ;
UsePN pn = {
s = \\c => pn.s ! caseNP c ;
a = agrP3 pn.g Sg
} ;
UsePron p = p ;
MkDet pred quant num ord = let n = quant.n in {
s = \\g => pred.s ! gennum g n ++ quant.s ! g ++ num.s ! g ++ ord.s ;
n = n ;
det = quant.det
} ;
PossPronSg p = {
s = \\g => p.s ! NPPoss (gennum g Sg) ;
n = Sg ;
det = DDef Indef
} ;
PossPronPl p = {
s = \\_ => p.s ! NPPoss Plg ;
n = Pl ;
det = DDef Indef
} ;
NoPredet, NoNum = {s = \\_ => []} ; -- these get different types!
NoOrd = {s = []} ;
NumInt n = {s = \\_ => n.s} ;
---- NumNumeral numeral = {s = \\g => numeral.s ! NCard g} ;
OrdNumeral numeral = {s = numeral.s ! NOrd} ;
AdNum adn num = {s = \\g => adn.s ++ num.s ! g} ;
OrdSuperl a = {s = a.s ! AF (ASuperl SupWeak) Nom} ;
DefSg = {s = \\g => artDef (gennum g Sg) ; n = Sg ; det = DDef detDef} ;
DefPl = {s = \\_ => artDef Plg ; n = Pl ; det = DDef detDef} ;
IndefSg = {s = artIndef ; n = Sg ; det = DIndef} ;
IndefPl = {s = \\_ => [] ; n = Pl ; det = DIndef} ;
---- ComplN2 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c} ;
---- ComplN3 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ; c2 = f.c3} ;
AdjCN ap cn = let g = cn.g in {
s = \\n,d,c => preOrPost ap.isPre
(ap.s ! agrAdj (gennum g n) d)
(cn.s ! n ! d ! c) ;
g = g
} ;
{-
RelCN cn rs = {s = \\n,c => cn.s ! n ! c ++ rs.s ! {n = n ; p = P3}} ;
SentCN cn s = {s = \\n,c => cn.s ! n ! c ++ conjThat ++ s.s} ;
QuestCN cn qs = {s = \\n,c => cn.s ! n ! c ++ qs.s ! QIndir} ;
-}
UseN noun = {
s = \\n,d => noun.s ! n ! specDet d ;
g = noun.g
} ;
}