1
0
forked from GitHub/gf-rgl

use mair/maist for comparison

This commit is contained in:
Krasimir Angelov
2026-02-24 08:54:13 +01:00
parent ec4bc75a64
commit 8e780d6263
4 changed files with 41 additions and 4 deletions

View File

@@ -1,2 +1,12 @@
concrete AdjectiveSco of Adjective = AdjectiveEng ** { concrete AdjectiveSco of Adjective = AdjectiveEng - [ComparA,UseComparA] ** open Prelude, ResSco in {
lin ComparA a np = {
s = \\_ => getCompar Nom a ++ "than" ++ np.s ! npNom ;
isPre = False
} ;
UseComparA a = {
s = \\_ => getCompar Nom a ;
isPre = a.isPre
} ;
} }

View File

@@ -1,3 +1,18 @@
--# -path=.:../abstract:../common --# -path=.:../abstract:../common
concrete DocumentationSco of Documentation = DocumentationEng ** { concrete DocumentationSco of Documentation = DocumentationEng - [InflectionA, InflectionA2] ** open ResSco, HTML in {
lin
InflectionA, InflectionA2 = \adj -> {
t = "a" ;
s1 = heading1 "Adjective" ;
s2 = frameTable (
tr (th "" ++ th "nom" ++ th "gen") ++
tr (th "posit" ++ td (adj.s ! AAdj Posit Nom) ++ td (adj.s ! AAdj Posit Gen)) ++
tr (th "compar" ++ td (getCompar Nom adj) ++ td (getCompar Gen adj)) ++
tr (th "superl" ++ td (getSuperl Nom adj) ++ td (getSuperl Gen adj))
) ++
heading1 "Adverb" ++
paragraph (adj.s ! AAdv)
} ;
} }

View File

@@ -1,4 +1,4 @@
concrete NounSco of Noun = NounEng - [IndefArt] ** open Prelude, ResSco in { concrete NounSco of Noun = NounEng - [IndefArt, OrdSuperl, OrdNumeralSuperl] ** open Prelude, ResSco in {
lin IndefArt = { lin IndefArt = {
s = \\hasCard,n => case <n,hasCard> of { s = \\hasCard,n => case <n,hasCard> of {
@@ -13,4 +13,7 @@ lin IndefArt = {
isDef = False isDef = False
} ; } ;
OrdSuperl a = {s = \\c => getSuperl c a} ;
OrdNumeralSuperl n a = {s = \\c => n.s ! True ! NOrd ! Nom ++ getSuperl c a} ;
} }

View File

@@ -1,6 +1,15 @@
resource ResSco = ResEng - [auxBe,posneg] ** { resource ResSco = ResEng - [getCompar,getSuperl,auxBe,posneg] ** {
oper oper
getCompar : Case -> Adjective -> Str = \c,a -> case a.isMost of {
True => "mair" ++ a.s ! AAdj Posit c ;
False => a.s ! AAdj Compar c
} ;
getSuperl : Case -> Adjective -> Str = \c,a -> case a.isMost of {
True => "maist" ++ a.s ! AAdj Posit c ;
False => a.s ! AAdj Superl c
} ;
auxBe : Aux = { auxBe : Aux = {
pres = \\b,a => case <b,a> of { pres = \\b,a => case <b,a> of {
<Pos,AgP1 Sg> => "am" ; <Pos,AgP1 Sg> => "am" ;