                            (contains? generate-with-grammar-set
                                       (u/get-in rule-structure [:rule])))
                          (:grammar model))]
-             (println (str "grammar-set for spec:" (strip-refs chosen-spec) ":" generate-with-grammar-set))
-             (morph-ps (binding [babel.generate/println? false
-                                 babel.generate/truncate? false
-                                 babel.generate/index-fn (create-index-fn verb-set grammar)
-                                 babel.generate/grammar grammar]
-                         (time (generate chosen-spec model)))))))))))
-
-(def verbcoach-pronouns
-  (fn [v]
-    (or
-     (and (= :noun (u/get-in v [:synsem :cat]))
-          (not (= :acc (u/get-in v [:synsem :case]))))
-     (and (= :noun (u/get-in v [:synsem :cat]))
-          (= :acc (u/get-in v [:synsem :case]))
-          (= true (u/get-in v [:synsem :reflexive]))))))
-
-(def
-  verbcoach-index-paths
-  [[:italiano :italiano]
-   [:synsem :aux]
-   [:synsem :cat]
-   [:synsem :essere]
-   [:synsem :infl]
-   [:synsem :sem :pred]])
-
-(def verbcoach-index-fn
-  (fn [spec]
-    (let [lexicon
-          (into {}
-                (for [[k vals] (:lexicon model)]
-                  (let [filtered-vals
-                        (filter verbcoach-pronouns
-                                vals)]
-                    (if (not (empty? filtered-vals))
-                      [k filtered-vals]))))]
-      (lookup-spec spec (create-indices lexicon verbcoach-index-paths)
-                   verbcoach-index-paths))))
-
-
-(defn stampare
-  "generate 'stampare' sentences with a grammar subset."
-  []
-  (let [grammar
-        (filter
-         #(contains? present-grammar (u/get-in % [:rule]))
-         (:grammar model))
-        spec {:root {:italiano {:italiano "stampare"}}
-              :synsem {:cat :verb
-                       :aux false
-                       :modified false
-                       :sem {:tense :past
-                             :aspect :progressive}
-                       :subcat []}}]
-
-    (repeatedly
-     #(println
-       (morph (binding [babel.generate/println? true
-                        babel.generate/truncate? false
-                        babel.generate/index-fn verbcoach-index-fn
-                        babel.generate/grammar grammar]
-                (time (generate spec model))))))))
-
-(defn chiamarsi-ps
-  "generate chiamarsi sentences with parse trees"
-  []
-  (repeatedly 
-   #(println (pprint
-              (let [expr 
-                    (time (generate {:modified false, 
-                                     :synsem {:cat :verb, :subcat []
-                                              :sem {:tense :present,
-                                                    :aspect :simple}}, 
-                                     :root {:italiano {:italiano "chiamarsi"}}}
-                                    model))]
-                {:m (morph expr)
-                 :ps (morph-ps expr)})))))
+             (morph (binding [babel.generate/println? false
+                              babel.generate/truncate? false
+                              babel.generate/index-fn (create-index-fn verb-set grammar)
+                              babel.generate/lexical-filter
+                              (fn [lexeme] (= false (u/get-in lexeme [:italiano :exception] false)))
+                              babel.generate/grammar grammar]
+                      (time (generate chosen-spec model)))))))))))

  (let [generated (generate spec model)]
    (u/get-in generated path ::none)))

(defn with-shrunken-model []
  (binding [babel.generate/truncate? true
            babel.generate/println? false
            babel.generate/index-fn (:index-fn model)
            babel.generate/morph-ps (:morph-ps model)
            babel.generate/grammar
            (filter
             (fn [rule]
               (or
                (= (:rule rule) "s-aux")
                (= (:rule rule) "vp-pronoun-phrasal")
                (= (:rule rule) "vp-aux-22-nonphrasal-comp")))
             (:grammar model))]
    (generate {:modified false
               :root {:italiano {:italiano "radersi"}}
               :synsem {:cat :verb
                        :sem {:aspect :perfect
                              :tense :present}
                        :subcat []}})))

(defn svegliarsi []
  (repeatedly 
   #(println (pprint
              (let [expr 
                    (time (generate {:modified false, 
                                     :synsem {:cat :verb, :subcat []
                                              :sem {:tense :present, :aspect :progressive}}, 
                                     :root {:italiano {:italiano "svegliarsi"}}
                                     :comp {:phrasal false}}
                                    model))]
                {:m (morph expr)
                 :ps (morph-ps expr)})))))

(defn chiamarsi
  "generate chiamarsi sentences with a grammar subset."
  []
  (let [grammar
        (filter
         #(or
           (= "s-present-phrasal" (u/get-in % [:rule]))
           (= "vp-32" (u/get-in % [:rule]))
           (= "vp-pronoun-phrasal" (u/get-in % [:rule])))
         
         (:grammar model))
        spec {:root {:italiano {:italiano "chiamarsi"}}
              :synsem {:cat :verb
                       :sem {:tense :present
                             :aspect :simple}
                       :subcat []}}]
    (repeatedly
     #(println
       (morph (binding [babel.generate/println? false
                        babel.generate/truncate? false
                        babel.generate/grammar grammar]
                (time (generate spec model))))))))

(def basic-grammar
  #{"sentence-nonphrasal-head"})


   {:synsem {:sem {:tense :future}}}
   future-grammar

   {:synsem {:sem {:tense :conditional}}}
   future-grammar

   {:synsem {:sem {:tense :past
                   :aspect :progressive}}}
   future-grammar
   
   {:synsem {:sem {:tense :present
                   :aspect :simple}}}
   present-grammar})
