macavaney commited on
Commit
51b173f
1 Parent(s): 1ee787d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +97 -8
README.md CHANGED
@@ -10,29 +10,118 @@ task_categories:
10
  viewer: false
11
  ---
12
 
13
- # msmarco-passage.pisa
14
 
15
  ## Description
16
 
17
- *TODO: What is the artifact?*
18
 
19
  ## Usage
20
 
21
  ```python
22
- # Load the artifact
23
- import pyterrier_alpha as pta
24
- artifact = pta.Artifact.from_hf('macavaney/msmarco-passage.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
 
10
  viewer: false
11
  ---
12
 
13
+ # MS MARCO PISA Index
14
 
15
  ## Description
16
 
17
+ This is an index of the MS MARCO passage (v1) dataset with PISA. It can be used for passage retrieval using lexical methods.
18
 
19
  ## Usage
20
 
21
  ```python
22
+ >>> from pyterrier_pisa import PisaIndex
23
+ >>> index = PisaIndex.from_hf('macavaney/msmarco-passage.pisa')
24
+ >>> bm25 = index.bm25()
25
+ >>> bm25.search('terrier breeds')
26
+ qid query docno score rank
27
+ 0 1 terrier breeds 1406578 22.686367 0
28
+ 1 1 terrier breeds 5785957 22.611134 1
29
+ 2 1 terrier breeds 7455374 22.592781 2
30
+ 3 1 terrier breeds 3984886 22.242958 3
31
+ 4 1 terrier breeds 3984893 22.009525 4
32
+ ...
33
  ```
34
 
35
  ## Benchmarks
36
 
37
+ **TREC DL 2019**
38
+
39
+ <details>
40
+ <summary>Code</summary>
41
+
42
+ ```python
43
+ from ir_measures import nDCG, RR, MAP, R
44
+ import pyterrier as pt
45
+ from pyterrier_pisa import PisaIndex
46
+ index = PisaIndex.from_hf('macavaney/msmarco-passage.pisa')
47
+ dataset = pt.get_dataset('irds:msmarco-passage/trec-dl-2019/judged')
48
+ pt.Experiment(
49
+ [index.bm25(), index.qld(), index.dph(), index.pl2()],
50
+ dataset.get_topics(),
51
+ dataset.get_qrels(),
52
+ [nDCG@10, nDCG, RR(rel=2), MAP(rel=2), R(rel=2)@1000],
53
+ ['BM25', 'QLD', 'DPH', 'PL2'],
54
+ round=4,
55
+ )
56
+ ```
57
+ </details>
58
+
59
+ | | name | nDCG@10 | nDCG | RR(rel=2) | AP(rel=2) | R(rel=2)@1000 |
60
+ |---:|:-------|----------:|-------:|------------:|------------:|----------------:|
61
+ | 0 | BM25 | 0.4989 | 0.6023 | 0.6804 | 0.3031 | 0.7555 |
62
+ | 1 | QLD | 0.468 | 0.5984 | 0.6047 | 0.3037 | 0.7601 |
63
+ | 2 | DPH | 0.4975 | 0.5907 | 0.6674 | 0.3009 | 0.7436 |
64
+ | 3 | PL2 | 0.4503 | 0.5681 | 0.6495 | 0.2679 | 0.7304 |
65
+
66
+ **TREC DL 2020**
67
+
68
+ <details>
69
+ <summary>Code</summary>
70
+
71
+ ```python
72
+ from ir_measures import nDCG, RR, MAP, R
73
+ import pyterrier as pt
74
+ from pyterrier_pisa import PisaIndex
75
+ index = PisaIndex.from_hf('macavaney/msmarco-passage.pisa')
76
+ dataset = pt.get_dataset('irds:msmarco-passage/trec-dl-2020/judged')
77
+ pt.Experiment(
78
+ [index.bm25(), index.qld(), index.dph(), index.pl2()],
79
+ dataset.get_topics(),
80
+ dataset.get_qrels(),
81
+ [nDCG@10, nDCG, RR(rel=2), MAP(rel=2), R(rel=2)@1000],
82
+ ['BM25', 'QLD', 'DPH', 'PL2'],
83
+ round=4,
84
+ )
85
+ ```
86
+ </details>
87
+
88
+ | | name | nDCG@10 | nDCG | RR(rel=2) | AP(rel=2) | R(rel=2)@1000 |
89
+ |---:|:-------|----------:|-------:|------------:|------------:|----------------:|
90
+ | 0 | BM25 | 0.4793 | 0.5963 | 0.6529 | 0.2974 | 0.8048 |
91
+ | 1 | QLD | 0.4511 | 0.587 | 0.5812 | 0.2879 | 0.8125 |
92
+ | 2 | DPH | 0.4586 | 0.5704 | 0.6123 | 0.2779 | 0.798 |
93
+ | 3 | PL2 | 0.4552 | 0.5609 | 0.5788 | 0.2666 | 0.7772 |
94
+
95
+ **MS MARCO Dev (small)**
96
+
97
+ <details>
98
+ <summary>Code</summary>
99
+
100
+ ```python
101
+ from ir_measures import RR, R
102
+ import pyterrier as pt
103
+ from pyterrier_pisa import PisaIndex
104
+ index = PisaIndex.from_hf('macavaney/msmarco-passage.pisa')
105
+ dataset = pt.get_dataset('irds:msmarco-passage/dev/small')
106
+ pt.Experiment(
107
+ [index.bm25(), index.qld(), index.dph(), index.pl2()],
108
+ dataset.get_topics(),
109
+ dataset.get_qrels(),
110
+ [RR@10, R@1000],
111
+ ['BM25', 'QLD', 'DPH', 'PL2'],
112
+ round=4,
113
+ )
114
+ ```
115
+ </details>
116
+
117
 
118
  ## Reproduction
119
 
120
  ```python
121
+ >>> import pyterrier_pisa
122
+ >>> import pyterrier as pt
123
+ >>> idx = pyterrier_pisa.PisaIndex('msmarco-passage.pisa')
124
+ >>> idx.indexer().index(pt.get_dataset('irds:msmarco-passage').get_corpus_iter())
125
  ```
126
 
127
  ## Metadata