 
    ;; <present non-reflexive>
    ;; <-er verbs>
-   {:i [#"^(\S+)e$" "$1er"]
-    :u {:synsem {:subcat {:1 {:agr {:number :sing
-                                    :person :1st}}}
-                 :infl :present}}}
-
-   {:i [#"^(\S+)es$" "$1er"]
-    :u {:synsem {:subcat {:1 {:agr {:number :sing
-                                    :person :2nd}}}
-                 :infl :present}}}
-
-   {:i [#"^(\S+)e$" "$1er"]
+   {:i [#"^(\S+)e$"            "$1er"]
+    :c [#"^(\S+)er$"           "$1e"]
+    :u {:synsem {:subcat {:1 {:agr {:number :sing
+                                    :person :1st}}}
+                 :infl :present}}}
+
+   {:i [#"^(\S+)es$"           "$1er"]
+    :c [#"^(\S+)er$"           "$1es"]
+    :u {:synsem {:subcat {:1 {:agr {:number :sing
+                                    :person :2nd}}}
+                 :infl :present}}}
+
+   {:i [#"^(\S+)e$"            "$1er"]
+    :c [#"^([^ ']+)er$"           "$1e"]
     :u {:synsem {:subcat {:1 {:agr {:number :sing
                                     :person :3rd}}}
                  :infl :present}}}
    
-   {:i [#"^(\S+)ons$" "$1er"]
-    :u {:synsem {:subcat {:1 {:agr {:number :plur
-                                    :person :1st}}}
-                 :infl :present}}}
-
-   {:i [#"^(\S+)ez$" "$1er"]
-    :u {:synsem {:subcat {:1 {:agr {:number :plur
-                                    :person :2nd}}}
-                 :infl :present}}}
-
-   {:i [#"^(\S+)ent$" "$1er"]
+   {:i [#"^(\S+)ons$"          "$1er"]
+    :c [#"^(\S+)er$"           "$1ons"]
+    :u {:synsem {:subcat {:1 {:agr {:number :plur
+                                    :person :1st}}}
+                 :infl :present}}}
+
+   {:i [#"^(\S+)ez$"           "$1er"]
+    :c [#"^(\S+)er$"           "$1ez"]
+    :u {:synsem {:subcat {:1 {:agr {:number :plur
+                                    :person :2nd}}}
+                 :infl :present}}}
+
+   {:i [#"^(\S+)ent$"          "$1er"]
+    :c [#"^(\S+)er$"           "$1ent"]
     :u {:synsem {:subcat {:1 {:agr {:number :plur
                                     :person :3rd}}}
                  :infl :present}}}
    ;; </-er verbs>
 
    ;; <ir verbs>
-   {:i [#"^(\S+)e$" "$1ir"]
-    :u {:synsem {:subcat {:1 {:agr {:number :sing
-                                    :person :1st}}}
-                 :infl :present}}}
-
-   {:i [#"^(\S+)es$" "$1ir"]
-    :u {:synsem {:subcat {:1 {:agr {:number :sing
-                                    :person :2nd}}}
-                 :infl :present}}}
-
-   {:i [#"^(\S+)e$" "$1ir"]
+   {:i [#"^(\S+)e$"            "$1ir"]
+    :c [#"^(\S+)ir$"           "$1e"]
+    :u {:synsem {:subcat {:1 {:agr {:number :sing
+                                    :person :1st}}}
+                 :infl :present}}}
+
+   {:i [#"^(\S+)es$"           "$1ir"]
+    :c [#"^(\S+)ir$"           "$1es"]
+    :u {:synsem {:subcat {:1 {:agr {:number :sing
+                                    :person :2nd}}}
+                 :infl :present}}}
+
+   {:i [#"^(\S+)e$"            "$1ir"]
+    :c [#"^(\S+)ir$"           "$1e"]
     :u {:synsem {:subcat {:1 {:agr {:number :sing
                                     :person :3rd}}}
                  :infl :present}}}
    
-   {:i [#"^(\S+)ons$" "$1ir"]
-    :u {:synsem {:subcat {:1 {:agr {:number :plur
-                                    :person :1st}}}
-                 :infl :present}}}
-
-   {:i [#"^(\S+)ez$" "$1ir"]
-    :u {:synsem {:subcat {:1 {:agr {:number :plur
-                                    :person :2nd}}}
-                 :infl :present}}}
-
-   {:i [#"^(\S+)ent$" "$1ir"]
+   {:i [#"^(\S+)ons$"          "$1ir"]
+    :c [#"^(\S+)ir$"           "$1ons"]
+    :u {:synsem {:subcat {:1 {:agr {:number :plur
+                                    :person :1st}}}
+                 :infl :present}}}
+
+   {:i [#"^(\S+)ez$"           "$1ir"]
+    :c [#"^(\S+)ir$"           "$1ez"]
+    :u {:synsem {:subcat {:1 {:agr {:number :plur
+                                    :person :2nd}}}
+                 :infl :present}}}
+
+   {:i [#"^(\S+)ent$"          "$1ir"]
+    :c [#"^(\S+)ir$"           "$1ent"]
     :u {:synsem {:subcat {:1 {:agr {:number :plur
                                     :person :3rd}}}
                  :infl :present}}}

        number-and-person (number-and-person number person)
        ]
    (cond

      (and number-and-person
           (get-in word [:present number-and-person]))
      (get-in word [:present number-and-person])

     ;;QUI COMINCIANO I VERBI FRANCESI REGOLARI
     (and (= person :1st) (= number :sing) er-type)
     (str stem "e")

   #?(:cljs [babel.logjs :as log])
   [dag_unify.core :refer (copy dissoc-paths fail? get-in merge ref? strip-refs unifyc)]))

(def replace-patterns-source
  [;; <reflexive past>: e.g. "amusé" => "s'amuser"
   {:i [#"^([aeéiou]\S+)é$"    "s'$1er"] ;; :i : how to transform a finite form to infinitive
    :c [#"^s'([aeéiou]\S+)er$" "$1é"]  ;; :c : how to transform an infinitive into a finite form.
    :u {:synsem {:infl :past-p ;; :u : what to unify against for these tranformations to occur.
                 :subcat {:1 {:agr {:number :sing
                                    :gender :masc}}}}}}
   {:i [#"^([aeéiou]\S+)és$"   "s'$1er"]
    :c [#"^s'([aeéiou]\S+)er$" "$1és"]
    :u {:synsem {:infl :past-p
                 :subcat {:1 {:agr {:number :plur
                                    :gender :masc}}}}}}
   {:i [#"^([aeéiou]\S+)ée$"   "s'$1er"]
    :c [#"^s'([aeéiou]\S+)er$" "$1ée"]
    :u {:synsem {:infl :past-p
                 :subcat {:1 {:agr {:number :sing
                                    :gender :fem}}}}}}
   {:i [#"^([aeéiou]\S+)ées$"  "s'$1er"]
    :c [#"^s'([aeéiou]\S+)er$" "$1ées"]
    :u {:synsem {:infl :past-p
                 :subcat {:1 {:agr {:number :plur
                                    :gender :fem}}}}}}
   {:i [#"^([^aeéiou]\S+)é$"   "se $1er"]
    :c [#"^se (\S+)er$"        "$1é"]
    :u {:synsem {:infl :past-p
                 :subcat {:1 {:agr {:number :sing
                                    :gender :masc}}}}}}

   {:i [#"^([^aeéiou]\S+)és$"  "se $1er"]
    :c [#"^se (\S+)er$"        "$1és"]
    :u {:synsem {:infl :past-p
                 :subcat {:1 {:agr {:number :plur
                                    :gender :masc}}}}}}
   {:i [#"^([^aeéiou]\S+)ée$"  "se $1er"]
    :c [#"^se (\S+)er$"        "$1é"]
    :u {:synsem {:infl :past-p
                 :subcat {:1 {:agr {:number :sing
                                    :gender :fem}}}}}}
   {:i [#"^([^aeéiou]\S+)ées$" "se $1er"]
    :c [#"^se (\S+)er$"        "$1ées"]
    :u {:synsem {:infl :past-p
                 :subcat {:1 {:agr {:number :plur
                                    :gender :fem}}}}}}
