A Ruby class to generate a trigram substring inverted index for a set of strings provided in a CSV.
The index generated could be used for high speed text matching, such as in autocompletes, or in search services. You could, for example, dump the indexes to JSON and use them client side.
cd examples ruby spanish_municipalities.rb
cd examples ruby benchmark.rb user system total real 0.950000 0.010000 0.960000 ( 0.959077)
1ms per search
Graduate the JS example to a real library Add localstorage to the JS demo to store generated search index so only the source strings are downloaded