forked from GitHub/gf-rgl
(Hun) WIP: comparative and superlative forms
This commit is contained in:
@@ -5,12 +5,12 @@ concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in {
|
|||||||
lin
|
lin
|
||||||
|
|
||||||
-- : A -> AP ;
|
-- : A -> AP ;
|
||||||
PositA a = a ;
|
PositA a = {s = a.s ! Posit} ;
|
||||||
|
|
||||||
-- : A -> NP -> AP ;
|
-- : 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
|
-- : A2 -> NP -> AP ; -- married to her
|
||||||
-- ComplA2 a2 np = a2 ** { } ;
|
-- ComplA2 a2 np = a2 ** { } ;
|
||||||
@@ -19,13 +19,12 @@ concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in {
|
|||||||
-- ReflA2 a2 = a2 ** { } ;
|
-- ReflA2 a2 = a2 ** { } ;
|
||||||
|
|
||||||
-- : A2 -> AP ; -- married
|
-- : A2 -> AP ; -- married
|
||||||
-- UseA2 = PositA ;
|
UseA2 = PositA ;
|
||||||
|
|
||||||
-- : A -> AP ; -- warmer
|
-- : A -> AP ; -- warmer
|
||||||
-- UseComparA a = a ** {
|
UseComparA a = a ** {
|
||||||
-- s = \\af => "???" ++ a.s ! af ;
|
s = \\n => a.s ! Compar ! n ;
|
||||||
-- compar = []
|
} ;
|
||||||
-- } ;
|
|
||||||
|
|
||||||
|
|
||||||
-- : CAdv -> AP -> NP -> AP ; -- as cool as John
|
-- : CAdv -> AP -> NP -> AP ; -- as cool as John
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ concrete CatHun of Cat = CommonX ** open ResHun, Prelude in {
|
|||||||
|
|
||||||
-- Constructed in AdjectiveHun.
|
-- Constructed in AdjectiveHun.
|
||||||
|
|
||||||
AP = ResHun.Adjective ;
|
AP = ResHun.AdjPhrase ;
|
||||||
|
|
||||||
|
|
||||||
--2 Nouns and noun phrases
|
--2 Nouns and noun phrases
|
||||||
|
|||||||
@@ -116,16 +116,45 @@ oper
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Adjectives
|
-- Adjectives
|
||||||
|
|
||||||
Adjective : Type = {s : Number => Str} ;
|
AdjPhrase : Type = {s : Number => Str} ;
|
||||||
|
|
||||||
|
Adjective : Type = {s : Degree => Number => Str} ;
|
||||||
|
|
||||||
mkAdj : Str -> Adjective = \sg -> {
|
mkAdj : Str -> Adjective = \sg -> {
|
||||||
s = \\n =>
|
s = \\d,n =>
|
||||||
let plural = case n of {
|
let adj = case d of {
|
||||||
Sg => [] ;
|
Compar => comparAdj sg ;
|
||||||
Pl => pluralAllomorph sg }
|
Superl => "leg" + comparAdj sg ;
|
||||||
in sg + plural
|
_ => 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
|
-- Verbs
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user