                                            (:u replace-pattern)
                                            :top)
                            unified (unify unify-against
-                                          unify-with)]
+                                          conjugate-with)]
                        (if (and from to infinitive
                                 (not (= :fail unified))
                                 (re-matches from infinitive))

                                           (get lexicon lex))))))))
                 regular-patterns))]
    (if (not (empty? retval))
      (log/info (str "analyze '" surface-form "': count=" (count retval) ";" (string/join "," (map strip-refs retval))))
      (log/warn (str " analyze: could not analyze surface-form: " surface-form)))
    retval))


               ;; ..
               
               ;; (unify) with spec should be last since it is expensive:
               (not (= :fail (unify spec lexeme)))
               
               (or (log/debug (str "lookup-in: matched: " (strip-refs lexeme))) true)))
            lexemes)))

(defn conjugate [infinitive conjugate-with & [lexicon]]
  "Conjugate an infinitive into a surface form by taking the first 
   element of regular-patterns where the element's :u unifies successfully with
   conjugate-with. If lexicon is supplied, look up infinitive in lexicon and use exceptional form of
   first return value, if any."
  (if (nil? infinitive)
    (throw (Exception. (str "conjugate passed null infinitive.")))
    (let [diag
          (log/debug (str "conjugate: infinitive=" infinitive "; conjugate-with: "
                          (strip-refs conjugate-with)))
          exceptional-lexemes
          (lookup-in lexicon
                     {:spec (unify conjugate-with
                                   {:français {:infinitive infinitive
                                               :exception true}})})
          exceptional-surface-forms
          (map #(get-in % [:français :français])
               exceptional-lexemes)
