   (:refer-clojure :exclude [get-in]))
 
 (require '[babel.config :refer [language-to-root-spec]])
-(require '[babel.generate :refer [generate]])
-(require '[babel.english.grammar :refer [small small-plus-vp-pronoun small-plus-plus-np]])
+(require '[babel.directory :refer [models]])
+(require '[babel.english.grammar :refer [small-plus-vp-pronoun small-plus-plus-np]])
 (require '[babel.english.lexicon :refer [lexicon]])
 (require '[babel.english.morphology :refer [fo]])
+(require '[babel.generate :refer [generate]])
 (require '[babel.reader :refer [read-all read-one]])
 (require '[babel.writer :as writer
            :refer [delete-from-expressions

                            (process [{:fill-one-language
                                       {:count 1
                                        :spec spec
                                        :model (small)
                                        }}]
                                     source-language-short-name)]
                        ;; TODO: 'result' is currently


(defn write-one [spec]
  (log/debug (str "generating from spec: " spec))
  (let [model (-> ((-> models :en)) deref)]
    (log/debug (str "type of model is:" (type model)))
    (try
      (process [{:fill-one-language
                 {:count 1
                  :spec spec
                  :model model}}]
               "en")
      (catch Exception e
        (cond
          
          ;; TODO: make this conditional on
          ;; there being a legitimate reason for the exception -
          ;; e.g. the verb is "works (nonhuman)" (which takes a non-human
          ;; subject), but we're trying to generate with
          ;; {:agr {:person :1st or :2nd}}, for which the only lexemes
          ;; are human.
          true
          
          (log/warn (str "ignoring exception: " e))
          false
          (throw e))))))

(defn all [ & [count]]
  (let [count (if count (Integer. count) 10)
