Blame view

main.rb 568 Bytes
7043da90b   Romain Deveaud   first commit
1
  $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), "lib"))
b3995017e   Romain Deveaud   changing the name...
2
  require 'mirimiri'
fd4cb285a   Romain Deveaud   doc changes + doc...
3

b3995017e   Romain Deveaud   changing the name...
4
  w = Mirimiri::WikipediaPage.new("http://en.wikipedia.org/wiki/The_Dillinger_Escape_Plan")
a79a22843   Romain Deveaud   new TreeTagger mo...
5
6
  p w.entropy("dillinger escape plan")
  p w.tf("guitar")
e0e33fca0   Romain Deveaud   new way of queryi...
7
8
9
10
  
  query = Indri::IndriQuery.new({:query => "dillinger escape plan".sequential_dependence_model, :count => 10}, "-trecFormat=true -printDocuments=true")
  index = Indri::IndriIndex.new "/mnt/disk1/ClueWeb09_English_1noSpam"
  s = Indri::IndriPrintedDocuments.new(index.runquery(query).force_encoding("ISO-8859-1").encode("UTF-8"))