 ;; used for parsing: TODO: unify with generation
 (def pattern-to-structure
   {
-   #"^([jmst])$" [{:replace-with "e" ;; j' -> je,m' -> me, s' -> se, etc
+   #"^([jlmst])$" [{:replace-with "e" ;; j' -> je,m' -> me, s' -> se, etc
               :structure :top}]
    #"^(\S+)ée$" [{:replace-with "er" ;; allée -> aller
                   :structure {:synsem {:infl :past-p

                                       :subcat {:1 {:agr {:number :plur
                                                          :gender :masc}}}}}}]
   ;; -er and -ir type verbs
   #"^(\S+)e$" [{:replace-with "er" ;; parle -> parler
                 :structure {:synsem {:subcat {:1 {:agr {:number :sing
                                                         :person :1st}}}
                                      :infl :present}}}
                {:replace-with "ir" ;; dorme -> dormir
                 :structure {:synsem {:subcat {:1 {:agr {:number :sing
                                                         :person :1st}}}
                                      :infl :present}}}

                {:replace-with "er" ;; parle -> parler
                 :structure {:synsem {:subcat {:1 {:agr {:number :sing
                                                         :person :3rd}}}
                                      :infl :present}}}
                {:replace-with "ir" ;; dorme -> dormir
                 :structure {:synsem {:subcat {:1 {:agr {:number :sing
                                                         :person :3rd}}}
                                      :infl :present}}}
                ]

   ;; -er and -ir type verbs
   #"^(\S+)es$" [{:replace-with "er" ;; parle -> parler
                  :structure {:synsem {:subcat {:1 {:agr {:number :sing
                                                          :person :2nd}}}
                                       :infl :present}}}

                       (unifyc
                        lexeme
                        (:structure match)))
                     (let [replace-pattern (if (:replace-pattern match)
                                             (:replace-pattern match)
                                             "$1")]
                       (get lexicon (str (string/replace surface-form (:pattern match) replace-pattern)
                                         (:replace-with match))))))
              matches)
      (get lexicon surface-form))
     
