API documentation and slight change in Det syntax

This commit is contained in:
aarne
2006-01-10 15:39:20 +00:00
parent d2dc0e82e8
commit da26bfb246
38 changed files with 4254 additions and 130 deletions

View File

@@ -58,7 +58,9 @@ incomplete concrete CatScand of Cat =
CN = {s : Number => DetSpecies => Case => Str ; g : Gender} ;
NP,Pron = {s : NPForm => Str ; a : Agr} ;
Det, Quant = {s : Gender => Str ; n : Number ; det : DetSpecies} ;
Det = {s : Gender => Str ; n : Number ; det : DetSpecies} ;
QuantSg = {s : Gender => Str ; det : DetSpecies} ;
QuantPl = {s : Gender => Str ; det : DetSpecies} ;
Predet = {s : GenNum => Str} ;
Num = {s : Gender => Str} ;
Ord = {s : Str} ;

View File

@@ -15,18 +15,23 @@ incomplete concrete NounScand of Noun =
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 ;
DetSg pred quant ord = {
s = \\g => pred.s ! gennum g Sg ++ quant.s ! g ++ ord.s ;
n = Sg ;
det = quant.det
} ;
DetPl pred quant num ord = {
s = \\g => pred.s ! gennum g Pl ++ quant.s ! g ++ num.s ! g ++ ord.s ;
n = Pl ;
det = quant.det
} ;
PossPronSg p = {
PossSg p = {
s = \\g => p.s ! NPPoss (gennum g Sg) ;
n = Sg ;
det = DDef Indef
} ;
PossPronPl p = {
PossPl p = {
s = \\_ => p.s ! NPPoss Plg ;
n = Pl ;
det = DDef Indef
@@ -34,7 +39,9 @@ incomplete concrete NounScand of Noun =
NoPredet, NoNum = {s = \\_ => []} ; -- these get different types!
NoOrd = {s = []} ;
NumInt n = {s = \\_ => n.s} ;
OrdInt n = {s = n.s ++ ":e"} ; ---
NumNumeral numeral = {s = \\g => numeral.s ! NCard g} ;
OrdNumeral numeral = {s = numeral.s ! NOrd SupWeak} ;
@@ -46,8 +53,15 @@ incomplete concrete NounScand of Noun =
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} ;
IndefSg = {s = artIndef ; n = Sg ; det = DIndef} ;
IndefPl = {s = \\_ => [] ; n = Pl ; det = DIndef} ;
MassDet = {s = \\_ => [] ; n = Sg ; det = DIndef} ;
UseN, UseN2, UseN3 = \noun -> {
s = \\n,d => noun.s ! n ! specDet d ;
g = noun.g
} ;
-- The genitive of this $NP$ is not correct: "sonen till mig" (not "migs").
@@ -81,9 +95,4 @@ incomplete concrete NounScand of Noun =
g = g
} ;
UseN noun = {
s = \\n,d => noun.s ! n ! specDet d ;
g = noun.g
} ;
}