               (get rule-matcher key-in-rule-matcher))))
         (keys rule-matcher))))
 
-(defn generate-arrabbiarsi
+;; (take 10 (generate-for-verbcoach))
+(defn generate-for-verbcoach
   "generate sentences efficiently given specific constraints."
   []
-  (let [verb-set #{"arrabbiarsi"}
+  (let [verb-set #{"arrabbiarsi" "chiamarsi" "fermarsi" "parlare" "sedersi"}
         specs
         (map (fn [root]
                {:root {:italiano {:italiano root}}})
              verb-set)
-        tense-specs [{:synsem {:cat :verb
+        tense-specs [
+                     {:synsem {:cat :verb
                                :sem {:tense :present
                                      :aspect :perfect}
-                               :subcat []}}]]
-                                        ;                     {:synsem {:cat :verb
-                                        ;                               :sem {:tense :future}
-                                        ;                               :subcat []}}]]
-                                        ;                     {:synsem {:cat :verb
-                                        ;                               :sem {:tense :present
-                                        ;                                     :aspect :simple}}]]
-    
-    (let [chosen-spec
-          (unify (first (shuffle specs))
-                 (first (shuffle tense-specs)))]
-      (let [generate-with-grammar-set
-            (rule-matcher-reducer chosen-spec)
-            grammar
-            (filter (fn [rule-structure]
-                      (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))
-        (binding [babel.generate/println? true
-                  babel.generate/truncate? false
-                  babel.generate/index-fn (create-index-fn verb-set grammar)
-                  babel.generate/grammar grammar]
-          (time (generate chosen-spec model)))))))
-
-(defn generate-for-verbcoach
-  "generate sentences efficiently given specific constraints."
-  []
-  (let [verb-set #{"arrabbiarsi"}
-        
-        specs
-        (map (fn [root]
-               {:root {:italiano {:italiano root}}})
-             verb-set)
-        tense-specs [{:synsem {:cat :verb
+                               :subcat []}}
+                     {:synsem {:cat :verb
+                               :sem {:tense :future}
+                               :subcat []}}
+                     {:synsem {:cat :verb
+                               :sem {:tense :conditional}
+                               :subcat []}}
+                     {:synsem {:cat :verb
+                               :sem {:tense :past
+                                     :aspect :progressive}
+                               :subcat []}}
+                     {:synsem {:cat :verb
                                :sem {:tense :present
-                                     :aspect :perfect}
-                               :subcat []}}]]
-                                        ;                     {:synsem {:cat :verb
-                                        ;                               :sem {:tense :future}
-                                        ;                               :subcat []}}]]
-                                        ;                     {:synsem {:cat :verb
-                                        ;                               :sem {:tense :present
-                                        ;                                     :aspect :simple}}]]
+                                     :aspect :simple}}}
+                     ]
+        ]
     
     (repeatedly
-     #(do ;;(println "")
+     #(do
         (println
          (let [chosen-spec
                (unify (first (shuffle specs))

  (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"})


                           (contains? generate-with-grammar-set
                                      (u/get-in rule-structure [:rule])))
                         (:grammar model))]
             (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)))))))))))
