forked from GitHub/gf-core
smart consonant duplication in ParadigmsEng
This commit is contained in:
@@ -315,6 +315,13 @@ oper
|
|||||||
_ => w + "s" -- car
|
_ => w + "s" -- car
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
duplFinal : Str -> Str = \w -> case w of {
|
||||||
|
_ + ("a" | "e" | "o") + ("a" | "e" | "i" | "o" | "u") + ? => w ; -- waited, needed
|
||||||
|
_ + ("a" | "e" | "i" | "o" | "u") +
|
||||||
|
c@("b"|"d"|"g"|"m"|"n"|"p"|"r"|"t") => w + c ; -- omitted, manned
|
||||||
|
_ => w
|
||||||
|
} ;
|
||||||
|
|
||||||
mk2N = \man,men ->
|
mk2N = \man,men ->
|
||||||
let mens = case last men of {
|
let mens = case last men of {
|
||||||
"s" => men + "'" ;
|
"s" => men + "'" ;
|
||||||
@@ -376,7 +383,7 @@ oper
|
|||||||
happie = case y of {
|
happie = case y of {
|
||||||
"y" => happ + "ie" ;
|
"y" => happ + "ie" ;
|
||||||
"e" => happy ;
|
"e" => happy ;
|
||||||
_ => happy + "e"
|
_ => duplFinal happy + "e"
|
||||||
} ;
|
} ;
|
||||||
happily : Str = case happy of {
|
happily : Str = case happy of {
|
||||||
_ + "y" => happ + "ily" ;
|
_ + "y" => happ + "ily" ;
|
||||||
@@ -406,20 +413,16 @@ oper
|
|||||||
|
|
||||||
regV cry =
|
regV cry =
|
||||||
let
|
let
|
||||||
cr = init cry ;
|
|
||||||
y = last cry ;
|
|
||||||
cries = (regN cry).s ! Pl ! Nom ; -- !
|
cries = (regN cry).s ! Pl ! Nom ; -- !
|
||||||
crie = init cries ;
|
cried : Str = case cries of {
|
||||||
cried = case last crie of {
|
_ + "es" => init cries + "d" ;
|
||||||
"e" => crie + "d" ;
|
_ => duplFinal cry + "ed"
|
||||||
_ => crie + "ed"
|
|
||||||
} ;
|
} ;
|
||||||
crying = case y of {
|
crying : Str = case cry of {
|
||||||
"e" => case last cr of {
|
_ + "ee" => cry + "ing" ;
|
||||||
"e" => cry + "ing" ;
|
d + "ie" => d + "ying" ;
|
||||||
_ => cr + "ing"
|
us + "e" => us + "ing" ;
|
||||||
} ;
|
_ => duplFinal cry + "ing"
|
||||||
_ => cry + "ing"
|
|
||||||
}
|
}
|
||||||
in mk5V cry cries cried cried crying ;
|
in mk5V cry cries cried cried crying ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user