mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
Added n : Number field to the Num category for English.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user