static SS singular_specials = litmap( "children", "child", "images", "image", "chess", "chess"); static Set singular_specials2 = litset("time", "machine", "line"); static S singular(S s) { if (s == null) null; try answer singular_specials.get(s); //try answer hippoSingulars().get(lower(s)); if (singular_specials2.contains(dropSuffix("s", lastWord(s)))) ret dropSuffix("s", s); if (s.endsWith("ness")) ret s; if (s.endsWith("ges")) ret dropSuffix("s", s); if (endsWith(s, "bases")) ret dropLast(s); s = dropSuffix("es", s); s = dropSuffix("s", s); ret s; }