1
0
forked from GitHub/gf-core

Added n : Number field to the Num category for English.

This commit is contained in:
bringert
2007-05-11 13:38:54 +00:00
parent f40b784f16
commit 8438ba16de
2 changed files with 13 additions and 6 deletions

View File

@@ -52,7 +52,8 @@ concrete CatEng of Cat = CommonX ** open ResEng, Prelude in {
CN = {s : Number => Case => Str} ;
NP, Pron = {s : Case => Str ; a : Agr} ;
Det = {s : Str ; n : Number} ;
Predet, QuantSg, QuantPl, Num, Ord = {s : Str} ;
Predet, QuantSg, QuantPl, Ord = {s : Str} ;
Num = {s : Str; n : Number } ;
Quant = {s : Number => Str} ;
-- Numeral

View File

@@ -32,7 +32,7 @@ concrete NounEng of Noun = CatEng ** open ResEng, Prelude in {
DetPl quant num ord = {
s = quant.s ++ num.s ++ ord.s ;
n = Pl
n = num.n
} ;
SgQuant quant = {s = quant.s ! Sg} ;
@@ -40,15 +40,21 @@ concrete NounEng of Noun = CatEng ** open ResEng, Prelude in {
PossPron p = {s = \\_ => p.s ! Gen} ;
NoNum, NoOrd = {s = []} ;
NoNum = {s = []; n = Pl } ;
NoOrd = {s = []} ;
NumInt n = {s = n.s; n = table (Predef.Ints 1 * Predef.Ints 9) {
<0,1> => Sg ;
_ => Pl
} ! <n.size,n.last>
} ;
NumInt n = n ;
OrdInt n = {s = n.s ++ "th"} ; ---
NumNumeral numeral = {s = numeral.s ! NCard} ;
NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n } ;
OrdNumeral numeral = {s = numeral.s ! NOrd} ;
AdNum adn num = {s = adn.s ++ num.s} ;
AdNum adn num = {s = adn.s ++ num.s; n = num.n } ;
OrdSuperl a = {s = a.s ! AAdj Superl} ;