From 0c538bf80bbf91a616d555a14018f2c6b2464b72 Mon Sep 17 00:00:00 2001 From: bjorn Date: Wed, 19 Nov 2008 13:11:45 +0000 Subject: Added case inflection to English numerals and adjectives, in order to get genitive forms of stand-alone determiners that use Num or Ord right. --- next-lib/src/english/SymbolEng.gf | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'next-lib/src/english/SymbolEng.gf') diff --git a/next-lib/src/english/SymbolEng.gf b/next-lib/src/english/SymbolEng.gf index 6092902c9..b3425c90a 100644 --- a/next-lib/src/english/SymbolEng.gf +++ b/next-lib/src/english/SymbolEng.gf @@ -3,37 +3,42 @@ concrete SymbolEng of Symbol = CatEng ** open Prelude, ResEng in { lin - SymbPN i = {s = \\c => i.s ; g = Neutr} ; --- c - IntPN i = {s = \\c => i.s ; g = Neutr} ; --- c - FloatPN i = {s = \\c => i.s ; g = Neutr} ; --- c - NumPN i = {s = \\c => i.s ; g = Neutr} ; --- c + SymbPN i = {s = addGenitiveS i.s ; g = Neutr} ; + IntPN i = {s = addGenitiveS i.s ; g = Neutr} ; + FloatPN i = {s = addGenitiveS i.s ; g = Neutr} ; + NumPN i = {s = i.s ; g = Neutr} ; CNIntNP cn i = { - s = \\c => (cn.s ! Sg ! Nom ++ i.s) ; + s = \\c => cn.s ! Sg ! Nom ++ (addGenitiveS i.s) ! c ; a = agrgP3 Sg cn.g } ; CNSymbNP det cn xs = { - s = \\c => det.s ++ cn.s ! det.n ! c ++ xs.s ; + s = \\c => det.s ++ cn.s ! det.n ! Nom ++ (addGenitiveS xs.s) ! c ; a = agrgP3 det.n cn.g } ; CNNumNP cn i = { - s = \\c => (cn.s ! Sg ! Nom ++ i.s) ; + s = \\c => cn.s ! Sg ! Nom ++ i.s ! c ; a = agrgP3 Sg cn.g } ; SymbS sy = sy ; - SymbNum sy = {s = sy.s ; n = Pl ; hasCard = True} ; - SymbOrd sy = {s = sy.s ++ "th"} ; + SymbNum sy = { s = addGenitiveS sy.s ; n = Pl ; hasCard = True } ; + SymbOrd sy = { s = addGenitiveS (sy.s ++ "th")} ; lincat Symb, [Symb] = SS ; lin - MkSymb s = s ; BaseSymb = infixSS "and" ; ConsSymb = infixSS "," ; +oper + -- Note: this results in a space before 's, but there's + -- not mauch we can do about that. + addGenitiveS : Str -> Case => Str = \s -> + table { Gen => s ++ "'s"; _ => s } ; + } -- cgit v1.2.3