controlling the substantival and adjectival det forms in english

This commit is contained in:
aarne
2010-12-17 14:04:05 +00:00
parent b3dc045e3f
commit 6250c85417
3 changed files with 11 additions and 6 deletions

View File

@@ -51,7 +51,7 @@ concrete CatEng of Cat = CommonX ** open ResEng, Prelude in {
CN = {s : Number => Case => Str ; g : Gender} ;
NP = {s : Case => Str ; a : Agr} ;
Pron = {s : Case => Str ; sp : Case => Str ; a : Agr} ;
Det = {s : Str ; sp : Case => Str ; n : Number} ;
Det = {s : Str ; sp : Case => Str ; n : Number ; hasNum : Bool} ;
Predet = {s : Str} ;
Ord = { s : Case => Str } ;
Num = {s : Case => Str ; n : Number ; hasCard : Bool} ;

View File

@@ -16,10 +16,13 @@ resource MorphoEng = open Prelude, (Predef=Predef), ResEng in {
oper
mkDeterminer : Number -> Str -> {s : Str ; sp : Case => Str; n : Number} = \n,s ->
mkDeterminer : Number -> Str ->
{s : Str ; sp : Case => Str; n : Number ; hasNum : Bool} = \n,s ->
{s = s;
sp = regGenitiveS s ;
n = n} ;
n = n ;
hasNum = True ; -- doesn't matter since s = sp
} ;
--2 Pronouns

View File

@@ -37,17 +37,19 @@ concrete NounEng of Noun = CatEng ** open MorphoEng, ResEng, Prelude in {
False => quant.sp ! num.hasCard ! num.n ! c ++ num.s ! Nom ;
True => quant.sp ! num.hasCard ! num.n ! Nom ++ num.s ! c
} ;
n = num.n
n = num.n ;
hasNum = num.hasCard
} ;
DetQuantOrd quant num ord = {
s = quant.s ! num.hasCard ! num.n ++ num.s ! Nom ++ ord.s ! Nom;
sp = \\c => quant.sp ! num.hasCard ! num.n ! Nom ++ num.s ! Nom ++ ord.s ! c ;
n = num.n
n = num.n ;
hasNum = True
} ;
DetNP det = {
s = det.sp ;
s = case det.hasNum of {True => \\_ => det.s ; _ => det.sp} ;
a = agrP3 det.n
} ;