summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-10-29 08:56:36 +0000
committeraarne <aarne@cs.chalmers.se>2008-10-29 08:56:36 +0000
commit79d3f7db863d71c4c5490efd35c0dc401c3c4617 (patch)
tree74d39d7524499b629ec6f36ddc3690df5c87ead3
parentc3c834c79eb319f1c736eebc9e17de064f0c3ef4 (diff)
smart consonant duplication in ParadigmsEng
-rw-r--r--next-lib/src/english/ParadigmsEng.gf29
1 files changed, 16 insertions, 13 deletions
diff --git a/next-lib/src/english/ParadigmsEng.gf b/next-lib/src/english/ParadigmsEng.gf
index 14c2e6061..008b4705c 100644
--- a/next-lib/src/english/ParadigmsEng.gf
+++ b/next-lib/src/english/ParadigmsEng.gf
@@ -315,6 +315,13 @@ oper
_ => 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 ->
let mens = case last men of {
"s" => men + "'" ;
@@ -376,7 +383,7 @@ oper
happie = case y of {
"y" => happ + "ie" ;
"e" => happy ;
- _ => happy + "e"
+ _ => duplFinal happy + "e"
} ;
happily : Str = case happy of {
_ + "y" => happ + "ily" ;
@@ -406,20 +413,16 @@ oper
regV cry =
let
- cr = init cry ;
- y = last cry ;
cries = (regN cry).s ! Pl ! Nom ; -- !
- crie = init cries ;
- cried = case last crie of {
- "e" => crie + "d" ;
- _ => crie + "ed"
+ cried : Str = case cries of {
+ _ + "es" => init cries + "d" ;
+ _ => duplFinal cry + "ed"
} ;
- crying = case y of {
- "e" => case last cr of {
- "e" => cry + "ing" ;
- _ => cr + "ing"
- } ;
- _ => cry + "ing"
+ crying : Str = case cry of {
+ _ + "ee" => cry + "ing" ;
+ d + "ie" => d + "ying" ;
+ us + "e" => us + "ing" ;
+ _ => duplFinal cry + "ing"
}
in mk5V cry cries cried cried crying ;