macavaney commited on
Commit
01db142
1 Parent(s): 4203d8a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -5
README.md CHANGED
@@ -14,25 +14,36 @@ 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/arguana.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 Arguana dataset
18
 
19
  ## Usage
20
 
21
  ```python
22
  # Load the artifact
23
  import pyterrier as pt
24
+ index = pt.Artifact.from_hf('my terrier/arguana.pisa')
25
+ index.bm25() # returns a BM25 retriever
26
  ```
27
 
28
  ## Benchmarks
29
 
30
+ | name | nDCG@10 | R@1000 |
31
+ |:-------|----------:|---------:|
32
+ | bm25 | 0.3436 | 0.9808 |
33
+ | dph | 0.3502 | 0.9815 |
34
 
35
  ## Reproduction
36
 
37
  ```python
38
+ import pyterrier as pt
39
+ from tqdm import tqdm
40
+ import pandas as pd
41
+ import ir_datasets
42
+ from pyterrier_pisa import PisaIndex
43
+ index = PisaIndex("arguana.pisa", threads=16)
44
+ dataset = ir_datasets.load('beir/arguana')
45
+ docs = ({'docno': d.doc_id, 'text': d.default_text()} for d in tqdm(dataset.docs))
46
+ index.index(docs)
47
  ```
48
 
49
  ## Metadata