     "vp-pronoun-nonphrasal"})
 
 (defn create-index-fn [verb-set grammar]
-  (let [future-grammar
-        #{"sentence-phrasal-head"
-          "vp-pronoun-nonphrasal"}
-
-        verbcoach-pronouns
+  (let [verbcoach-pronouns
         (fn [v]
-          (or 
+          (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]))
+                (= true (u/get-in v [:synsem :propernoun])))
            (and (= :noun (u/get-in v [:synsem :cat]))
                 (= :acc (u/get-in v [:synsem :case]))
                 (= true (u/get-in v [:synsem :reflexive])))))

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

    (fn [spec]
      (lookup-spec spec indices verbcoach-index-paths))))

;; this is a lot like a lexical compilation default map.
(def rule-matcher
  {:top
