                                         )]))
                                         
 ;; during generation, will not decend deeper than this when creating a tree:
-(def ^:const max-total-depth 2)
+(def ^:const max-total-depth 3)
 
 ;; use map or pmap.
 (def ^:const mapfn map)

                    (get-in bolt (concat path [:phrasal]))))
          (let [cached (if cache
                         (get-lex immediate-parent :comp cache spec))]
            (if cached cached (lazy-seq (flatten (vals lexicon))))))
        
        complement-pre-check (fn [child parent path-to-child]
                               (let [child-in-bolt (get-in bolt path-to-child)
                                     result (not (fail?
                                                  (unifyc (get-in child [:synsem] :top)
                                                          (get-in child-in-bolt [:synsem] :top))))]
                                 (log/trace (str "add-complement: checking child: " (morph child) "success?:" result))
                                 result))
        filtered-lexical-complements (filter (fn [lexeme]
                                               (complement-pre-check lexeme bolt path))
                                             complement-candidate-lexemes)]

(ns babel.generate
  (:refer-clojure :exclude [get-in deref resolve find parents])
  (:require
   [babel.cache :refer [get-lex]]
   [babel.over :as over]
   [babel.stringutils :refer [show-as-tree]]
   #?(:clj [clojure.tools.logging :as log])
