macavaney commited on
Commit
2b985eb
·
verified ·
1 Parent(s): 783e5e4

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/quora.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 Quora duplicate question dataset
18
 
19
  ## Usage
20
 
21
  ```python
22
  # Load the artifact
23
  import pyterrier as pt
24
+ index = pt.Artifact.from_hf('pyterrier/quora.pisa')
25
+ index.bm25() # returns a BM25 retriever
26
  ```
27
 
28
  ## Benchmarks
29
 
30
+ `quora/dev`
31
+
32
+ | name | nDCG@10 | R@1000 |
33
+ |:-------|----------:|---------:|
34
+ | bm25 | 0.7195 | 0.9845 |
35
+ | dph | 0.5893 | 0.9711 |
36
+
37
+ `quora/test`
38
+
39
+ | name | nDCG@10 | R@1000 |
40
+ |:-------|----------:|---------:|
41
+ | bm25 | 0.7122 | 0.9875 |
42
+ | dph | 0.5809 | 0.9729 |
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("quora.pisa", threads=16)
54
+ dataset = ir_datasets.load('beir/quora')
55
+ docs = ({'docno': d.doc_id, 'text': d.default_text()} for d in tqdm(dataset.docs))
56
+ index.index(docs)
57
  ```
58
 
59
  ## Metadata