macavaney commited on
Commit
be1bdb2
·
verified ·
1 Parent(s): bfdb0be

Update README.md

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