                             (= (:rule %) "s-imperfect-nonphrasal")
                             (= (:rule %) "s-aux")
                             (= (:rule %) "vp-aux"))
-                          grammar)))]
+                          grammar)))
+        indices (create-indices lexicon index-lexicon-on-paths)]
     {:name "medium"
+     :index-fn (fn [spec] (lookup-spec spec indices index-lexicon-on-paths))
      :enrich enrich
      :grammar grammar
      ;; Will throw exception if more than 1 rule has the same :rule value:

                   grammar)
     :lexical-cache (atom (cache/fifo-cache-factory {} :threshold 1024))
     :lexicon lexicon
     :index (create-index grammar (flatten (vals lexicon)) head-principle)
     :morph-walk-tree (fn [tree]
                        (do
                          (merge tree
                                 (morph-walk-tree tree))))

     :pred2lex ;; map:<pred => subset of lexicon with that pred>
     (map-subset-by-path lexicon [:synsem :sem :pred])
     
     :cat2lex ;; map:<cat => subset of lexicon with that cat>
     (map-subset-by-path lexicon [:synsem :cat])

     :morph-ps fo-ps
     :language "fr"
     :language-keyword :français

                   grammar)
     :lexical-cache (atom (cache/fifo-cache-factory {} :threshold 1024))
     :lexicon lexicon
     :morph fo}))

(defn analyze [arg]
  (morph/analyze arg lexicon))
