close
Pre Reading : http://kwcheng0119.pixnet.net/blog/post/31466286 (Lemur , 建立document inverted index)
Outline:
1. 使用Lemur進行Retrieval
在我們建立好 index file之後 , 接下來我們便可利用 IndriRunQuery來進行Retrieval ,
其指令格式描述如下:
IndriRunQuery query_parameter_file -count=1000 -index=path/to/index -trecFormat=true
我們可以看到 , 共需要輸入四個參數 , 分別為:
1. query_parameter_file (待會會在Example中詳述)
2. -count= 1000 , 表示對每個query限制最多只能return多少結果 , 1000就表示最多只能return 1000個結果.
3. -index = path/to/index , 敘述index資料夾所在的位置.
4. -trecFormat = true , 表示讓輸出的資料格式可以給trec_eval 或 ireval 進行辨識.
另外 , 我們也可以在參數中描述query的形式 , 即使用這樣的方式 : -query="apple juice" 或者是 -query="#combine(apple juice)" .
以下是一個 query_parameter_file的example :
<parameters> <query> <type>indri</type> <number>751</number> //表示這個topic所代表的number <text> #combine( popular scrabble players ) //描述query的內容 </text> </query> <query> <type>indri</type> <number>752</number> <text> #combine( dam removal environmental impact ) </text> </query> </parameters>
以之前建立invert index的內容為例 , 我們需要輸入的指令為:
IndriRunQuery query_parameter_file -count=1000 -index=path/to/outputIndex -trecFormat=true > result
文章標籤
全站熱搜