 (ns babel.forest
   (:refer-clojure :exclude [get-in deref resolve find future parents])
   (:require
+   [babel.cache :refer (build-lex-sch-cache get-comp-phrases-of get-head-phrases-of get-lex
+                                            get-parent-phrases-for-spec)]
+   [babel.over :as over]
    [clojure.core :as core]
    [clojure.set :refer :all]
    [clojure.string :as string]
    [clojure.tools.logging :as log]
-   [babel.cache :refer (build-lex-sch-cache get-comp-phrases-of get-head-phrases-of get-lex
-                                            get-parent-phrases-for-spec)]
-   [babel.over :as over]
    [dag-unify.core :refer (dissoc-paths get-in fail? fail-path-between lazy-shuffle ref? remove-false 
                                         remove-top-values-log strip-refs show-spec unifyc)]))
 

      (do
        (list bolt)))))

(defn add-complements-to-bolts [bolts path spec grammar lexicon cache]
  (if (seq bolts)
    (lazy-cat (add-complement (first bolts) path spec grammar lexicon cache)
              (add-complements-to-bolts (rest bolts) path spec grammar lexicon cache))))

(defn path-to-map [path val]
  (let [feat (first path)]


              ;; else, no complements could be added to this bolt.
              (do
                (log/warn (str " add-complement took " run-time " msec, but found no lexical complements for "
                               (morph from-bolt) "(rule: " (:rule from-bolt) ")"
                               ". Complements tried were: " (morph complement-candidate-lexemes)))
                  
                ;; TODO: show warn about not finding ny phrasal complements, as well as not finding any lexical complements.
                (log/debug (str " fail-paths:"))
                (vec (map (fn [lexeme]
