willf / inverted_index_simple

Simple inverted index code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple inverted index code.

require 'inverted_index_rb'
index = InvertedIndexRb.new
index.index_file('doc1.txt')
index.index_file('doc2.txt')
puts index.query_and(['glad','us'])
puts index.query_or(['i','made'])

About

Simple inverted index code


Languages

Language:Ruby 100.0%