Handle English nouns that end in y. ----------------------------------- > builes.ado...@googlemail.com**20100724172717 > Ignore-this: 49eed82e5949fc0d8e7d2775e9fd50c0 > ] hunk ./src/English.hs 52 > instance Countable Noun where > -- more irregular nouns will just need to have their own type > plural (Noun s) | "ch" `isSuffixOf` s = showString s . showString "es" > + plural (Noun s) | "y" `isSuffixOf` s > + && length s > 1 > + && not (last (init s) `elem` "aeiou") = showString (init > s) . showString "ies" > plural (Noun s) = showString s . showChar 's' > singular (Noun s) = showString s
This version seems fine; applied thanks! -- Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow> For a faster response, please try +44 (0)1273 64 2905.
signature.asc
Description: Digital signature
_______________________________________________ darcs-users mailing list darcs-users@darcs.net http://lists.osuosl.org/mailman/listinfo/darcs-users