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