 ;; during generation, will not decend deeper than this when creating a tree:
 ;; should also be possible to override per-language.
 (def ^:const max-total-depth 20)
+(def ^:const max-generated-complements 100)
 
 ;; use map or pmap.
 (def ^:const mapfn map)


                          (and (empty? filtered-lexical-complements)
                               (empty? phrasal-complements))
                          (log/warn (str "add-complement-to-bolt: could generate neither phrasal nor lexical complements for bolt:" (show-bolt bolt language-model) "; immediate parent: "
                                          (get-in bolt (concat (butlast path) [:rule]) :norule) " "
                                          "while trying to create a complement: " (spec-info spec)))

                          lexemes-before-phrases
                          (lazy-cat (lazy-shuffle filtered-lexical-complements) phrasal-complements)

                          true
                          (lazy-cat phrasal-complements (lazy-shuffle filtered-lexical-complements))))))))

(defn spec-info [spec]
  "give a human-readable summary of _spec_."

                                       (unifyc (get-in child [:synsem] :top)
                                               (get-in child-in-bolt [:synsem] :top))))))

        filtered-lexical-complements (lazy-shuffle
                                      (filter (fn [lexeme]
                                                (complement-pre-check lexeme bolt path))
                                              complement-candidate-lexemes))]
    (filter #(not (fail? %))
            (mapfn (fn [complement]
                     (let [unified
