macavaney commited on
Commit
cc0cf09
1 Parent(s): a6e05bc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -5
README.md CHANGED
@@ -14,25 +14,46 @@ viewer: false
14
 
15
  ## Description
16
 
17
- *TODO: What is the artifact?*
18
 
19
  ## Usage
20
 
21
  ```python
22
  # Load the artifact
23
  import pyterrier as pt
24
- artifact = pt.Artifact.from_hf('pyterrier/hotpotqa.pisa')
25
- # TODO: Show how you use the artifact
26
  ```
27
 
28
  ## Benchmarks
29
 
30
- *TODO: Provide benchmarks for the artifact.*
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
  ## Reproduction
33
 
34
  ```python
35
- # TODO: Show how you constructed the artifact.
 
 
 
 
 
 
 
 
36
  ```
37
 
38
  ## Metadata
 
14
 
15
  ## Description
16
 
17
+ A PISA index for the Hotpot QA dataset
18
 
19
  ## Usage
20
 
21
  ```python
22
  # Load the artifact
23
  import pyterrier as pt
24
+ index = pt.Artifact.from_hf('pyterrier/hotpotqa.pisa')
25
+ index.bm25() # returns a BM25 retriever
26
  ```
27
 
28
  ## Benchmarks
29
 
30
+ `hotpotqa/dev`
31
+
32
+ | name | nDCG@10 | R@1000 |
33
+ |:-------|----------:|---------:|
34
+ | bm25 | 0.6525 | 0.8909 |
35
+ | dph | 0.6445 | 0.8888 |
36
+
37
+ `hotpotqa/test`
38
+
39
+ | name | nDCG@10 | R@1000 |
40
+ |:-------|----------:|---------:|
41
+ | bm25 | 0.6318 | 0.8851 |
42
+ | dph | 0.6246 | 0.8837 |
43
+
44
 
45
  ## Reproduction
46
 
47
  ```python
48
+ import pyterrier as pt
49
+ from tqdm import tqdm
50
+ import pandas as pd
51
+ import ir_datasets
52
+ from pyterrier_pisa import PisaIndex
53
+ index = PisaIndex("hotpotqa.pisa", threads=16)
54
+ dataset = ir_datasets.load('beir/hotpotqa')
55
+ docs = ({'docno': d.doc_id, 'text': d.default_text()} for d in tqdm(dataset.docs))
56
+ index.index(docs)
57
  ```
58
 
59
  ## Metadata