1
0
forked from GitHub/gf-core

two-place Dut.mkA to deal with unpredictable attributive form

This commit is contained in:
aarne
2015-04-16 07:03:29 +00:00
parent 2bd5bba87c
commit 14ad792ce7
3 changed files with 19 additions and 12 deletions

View File

@@ -92,7 +92,7 @@ lin
let dritt = init dritte in
table {
NCard _ _ => drei ;
NOrd a => (regAdjective dritt).s ! Posit ! a
NOrd a => (reg2Adjective dritt dritte).s ! Posit ! a
} ;
mkDigit : (x1,_,_,x4 : Str) -> LinDigit =

View File

@@ -81,6 +81,7 @@ oper
mkA : overload {
mkA : (vers : Str) -> A ; -- regular adjective
mkA : (tweed,tweede : Str) -> A ; -- with deviant second form
mkA : (goed,goede,goeds,beter,best : Str) -> A ; -- irregular adjective
} ;
@@ -245,6 +246,7 @@ oper
mkA = overload {
mkA : (vers : Str) -> A = \a -> lin A (regAdjective a) ;
mkA : (vers,verse : Str) -> A = \a,b -> lin A (reg2Adjective a b) ;
mkA : (goed,goede,goeds,beter,best : Str) -> A = \a,b,c,d,e -> lin A (mkAdjective a b c d e) ;
} ;

View File

@@ -80,16 +80,9 @@ resource ResDut = ParamX ** open Prelude, Predef in {
Superl => table {APred => as ; AAttr => as + "e" ; AGen => as + "s"} ----
}
} ;
regAdjective : Str -> Adjective = \s -> ----
let
se : Str = case s of {
_ + ("er"|"en"|"ig") => s + "e" ; --- for unstressed adjective suffixes
_ + ("i"|"u"|"ij") => endCons s + "e" ;
b + v@("aa"|"ee"|"oo"|"uu") + c@? => b + shortVoc v c + "e" ;
b + ("ei"|"eu"|"oe"|"ou"|"ie"|"ij"|"ui") + ? => endCons s + "e" ;
b + v@("a"|"e"|"i"|"o"|"u" ) + c@? => b + v + c + c + "e" ;
_ => endCons s + "e"
} ;
reg2Adjective : Str -> Str -> Adjective = \s,se ->
let
ser : Str = case s of {
_ + "r" => s + "der" ;
_ => se + "r"
@@ -101,7 +94,19 @@ resource ResDut = ParamX ** open Prelude, Predef in {
in
mkAdjective s se (s + "s") ser sst ;
param
regAdjective : Str -> Adjective = \s ->
let
se : Str = case s of {
_ + ("er"|"en"|"ig") => s + "e" ; --- for unstressed adjective suffixes
_ + ("i"|"u"|"ij") => endCons s + "e" ;
b + v@("aa"|"ee"|"oo"|"uu") + c@? => b + shortVoc v c + "e" ;
b + ("ei"|"eu"|"oe"|"ou"|"ie"|"ij"|"ui") + ? => endCons s + "e" ;
b + v@("a"|"e"|"i"|"o"|"u" ) + c@? => b + v + c + c + "e" ;
_ => endCons s + "e"
} ;
in reg2Adjective s se ;
param
VForm =
VInf -- zijn
| VPresSg1 -- ben