 (ns babel.english.grammar
   (:refer-clojure :exclude [get-in])
   (:require 
-   [babel.english.lexicon :refer [deliver-lexicon vocab-entry-to-lexeme]]
+   [babel.english.lexicon :refer [deliver-lexicon transform-with-english-lexical-rules
+                                  vocab-entry-to-lexeme]]
    [babel.english.morphology :refer (analyze fo)]
    [babel.generate :as generate]
    [babel.index :refer [create-indices lookup-spec]]
-   [babel.lexiconfn :refer [edn2lexicon read-lexicon]]
+   [babel.lexiconfn :refer [edn2lexicon filtered-lexicon read-lexicon]]
    [babel.parse :as parse]
    [babel.ug :as ug
     :refer [apply-default-if comp-modifies-head

   (if (get-in tree [:head])
     {:head (morph-walk-tree (get-in tree [:head]))})))

(defn compile-lexicon []
  (into {}
        (for [[k v] (deliver-lexicon)]
          (let [filtered-v v]
            (if (not (empty? filtered-v))  ;; TODO: this empty-filtering should be done in lexicon.cljc, not here.
              [k filtered-v])))))

(defn model []
  (let [debug (log/info "  loading lexicon..")
        lexicon (read-lexicon "en")

    [result]))

(declare cache)
(declare model-with-vocab-items)

(defn fo-ps [expr]
  (parse/fo-ps expr fo))
