Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save sgrove/676206 to your computer and use it in GitHub Desktop.

Select an option

Save sgrove/676206 to your computer and use it in GitHub Desktop.
:vana-inflector plural to singular rule list
(defvar *plurals*
'(("(quiz)$" "\\1zes")
("^(ox)$" "\\1en")
("([m|l])ouse$" "\\1ice")
("(matr|vert|ind)(?:ix|ex)$" "\\1ices")
("(x|ch|ss|sh)$" "\\1es")
("([^aeiouy]|qu)y$" "\\1ies")
("(hive)$" "\\1s")
("(?:([^f])fe|([lr])f)$" "\\1\\2ves")
("sis$" "ses")
("([ti])um$" "\\1a")
("(buffal|tomat)o$" "\\1oes")
("(bu)s$" "\\1ses")
("(alias|status)$" "\\1es")
("(octop)us$" "\\1uses")
("(vir)us$" "\\1i")
("(ax|test)is$" "\\1es")
("s$" "s")
("$" "s")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment