1
0
forked from GitHub/gf-rgl

(Hun) WIP: comparative and superlative forms

This commit is contained in:
Inari Listenmaa
2020-04-13 20:57:56 +02:00
parent 57ad749ecc
commit e71c959a09
3 changed files with 44 additions and 16 deletions

View File

@@ -5,12 +5,12 @@ concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in {
lin
-- : A -> AP ;
PositA a = a ;
PositA a = {s = a.s ! Posit} ;
-- : A -> NP -> AP ;
-- ComparA a np = a ** {
--
-- } ;
ComparA a np = a ** {
s = \\n => a.s ! Compar ! n ++ np.s ! Ade ;
} ;
-- : A2 -> NP -> AP ; -- married to her
-- ComplA2 a2 np = a2 ** { } ;
@@ -19,13 +19,12 @@ concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in {
-- ReflA2 a2 = a2 ** { } ;
-- : A2 -> AP ; -- married
-- UseA2 = PositA ;
UseA2 = PositA ;
-- : A -> AP ; -- warmer
-- UseComparA a = a ** {
-- s = \\af => "???" ++ a.s ! af ;
-- compar = []
-- } ;
UseComparA a = a ** {
s = \\n => a.s ! Compar ! n ;
} ;
-- : CAdv -> AP -> NP -> AP ; -- as cool as John

View File

@@ -46,7 +46,7 @@ concrete CatHun of Cat = CommonX ** open ResHun, Prelude in {
-- Constructed in AdjectiveHun.
AP = ResHun.Adjective ;
AP = ResHun.AdjPhrase ;
--2 Nouns and noun phrases

View File

@@ -116,16 +116,45 @@ oper
--------------------------------------------------------------------------------
-- Adjectives
Adjective : Type = {s : Number => Str} ;
AdjPhrase : Type = {s : Number => Str} ;
Adjective : Type = {s : Degree => Number => Str} ;
mkAdj : Str -> Adjective = \sg -> {
s = \\n =>
let plural = case n of {
Sg => [] ;
Pl => pluralAllomorph sg }
in sg + plural
s = \\d,n =>
let adj = case d of {
Compar => comparAdj sg ;
Superl => "leg" + comparAdj sg ;
_ => sg } ;
plural = case n of {
Sg => [] ;
Pl => pluralAdj adj }
in adj + plural
} ;
-- https://en.wikisource.org/wiki/Simplified_Grammar_of_the_Hungarian_Language/Adjectives
comparAdj : Str -> Str = \stem ->
case stem of {
-- Final a and e become lengthened at the end of a word, if the comparative suffix -bb is joined to it—e.g., drága, drágább; fekete, feketébb, &c.; ó shortens its sound only in jó; jobb, legjobb.
"szép" => "szebb" ;
"könnyű" => "könnyebb" ;
"ifju" => "ifjabb" ;
"hosszú" => "hosszabb" ;
"sok" => "több" ;
_ + #v => stem + "bb" ;
_ => harm "abb" "ebb" ! getHarm stem
} ;
pluralAdj : Str -> Str = \stem ->
case vowFinal stem of {
True => -- https://en.wikisource.org/wiki/Simplified_Grammar_of_the_Hungarian_Language/Adjectives
case last stem of { "ü" => "ek" ;
"i" => harm "ak" "ek" ! getHarm stem ;
_ => "k" } ;
False => harm3 "ok" "ek" "ök" ! getHarm stem
} ;
--------------------------------------------------------------------------------
-- Verbs