             complement-candidate-lexemes (if (not (= true
                                                      (get-in bolt (concat path [:phrasal]))))
                                            (if cached cached (flatten (vals lexicon))))]
-        (log/debug (str "add-complement(depth=" depth "): immediate parent:" (get-in immediate-parent [:rule])))
         (let [complement-pre-check (fn [child parent path-to-child]
                                      (let [child-in-bolt (get-in bolt path-to-child)]
                                        (and (not (fail?

(defn lexemes-before-phrases [depth]
  ;; takes depth as an argument; make phrases decreasingly likely as depth increases.
  (let [result (> (rand-int (+ 1 depth)) 0)]
    (log/debug (str "lexemes-before-phrases: depth=" depth " => " result))
    result))

;; TODO: add usage of rule-to-lexicon cache (rather than using lexicon directly)

                    (if (fail? complement)
                      true
                      (do
                        (log/debug (str "add-complement(depth=" depth ",path=" path ")=>"
                                        (get-in complement [:synsem :cat] :none) "):" (morph complement)))
                        false)))
                  (map (fn [complement]
                         (unify (copy bolt)
