A simple, inefficient multi-language text search index.
GitHub | Clojarsje.suis/un-petit-index {:mvn/version "0.2.0-SNAPSHOT"}
(require [je.suis.un-petit-index :as pi]) (def gramdb (pi/map-to-gramdb {:foo "I am a foo, nothing more, nothing less." :bar "At a bar, one has nothing more to do but pity a foo."})) (def index (pi/gramdb-to-index gramdb)) (pi/normalized-gramdb-query gramdb "foo") ;; => {:foo 1, :bar 1} (pi/normalized-index-query index "bar") ;; => {:bar 1, :foo 1/3}