     #"ity$" :A         #"ium$" :A         #"ive$" :A         #"ize$" :F
     #"oid$" :A         #"one$" :R         #"ous$" :A
 
-    #"ae$" :A          #"al$" :BB          #"ar$" :X          #"as$" :B
+    #"ae$" :A          #"al$" :BB         #"ar$" :X          #"as$" :B
     #"ed$" :E          #"en$" :F          #"es$" :E          #"ia$" :A
     #"ic$" :A          #"is$" :A          #"ly$" :B          #"on$" :S
     #"or$" :T          #"um$" :U          #"us$" :V          #"yl$" :R
-    #"s'" :A           $"'s$" :A
+    #"s'"  :A          #"'s$" :A
 
     #"a$" :A           #"e$" :A           #"i$" :A           #"o$" :A
     #"s$" :W           #"y$" :B))

  [word]
  (-> (clojure.string/lower-case word)
      (clean)))

   :Y (fn [stem] (re-test? #"in$" stem))
   :Z (fn [stem] (not (re-test? #"f$" stem)))
   :AA (fn [stem] (re-test? #"([dflt]|ph|th|er|or|es)$" stem))
   :BB (fn [stem] (and ((conditions :B) stem) (not (re-test? #"(met|ryst)" stem))))
   :CC (fn [stem] (re-test? #"l$" stem))})

;; Transformations
(defn- dedouble
  "Drop double occurences of certain letters in the given [stem]."
  [stem]
  (clojure.string/replace stem #"([bdglmnprst])\1{1,}" "$1"))

(def ^:private transformations
  '(#"iev$" "ief"
    #"uct$" "uc"
    #"umpt$" "um"
    #"rpt$" "rb"
