Update README.md
Browse files
README.md
CHANGED
@@ -14,25 +14,46 @@ viewer: false
|
|
14 |
|
15 |
## Description
|
16 |
|
17 |
-
|
18 |
|
19 |
## Usage
|
20 |
|
21 |
```python
|
22 |
# Load the artifact
|
23 |
import pyterrier as pt
|
24 |
-
|
25 |
-
|
26 |
```
|
27 |
|
28 |
## Benchmarks
|
29 |
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
## Reproduction
|
33 |
|
34 |
```python
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
```
|
37 |
|
38 |
## Metadata
|
|
|
14 |
|
15 |
## Description
|
16 |
|
17 |
+
Terrier index for HotpotQA
|
18 |
|
19 |
## Usage
|
20 |
|
21 |
```python
|
22 |
# Load the artifact
|
23 |
import pyterrier as pt
|
24 |
+
index = pt.Artifact.from_hf('pyterrier/hotpotqa.terrier')
|
25 |
+
index.bm25()
|
26 |
```
|
27 |
|
28 |
## Benchmarks
|
29 |
|
30 |
+
`hotpotqa/dev`
|
31 |
+
|
32 |
+
| name | nDCG@10 | R@1000 |
|
33 |
+
|:-------|----------:|---------:|
|
34 |
+
| bm25 | 0.6093 | 0.8784 |
|
35 |
+
| dph | 0.6361 | 0.8883 |
|
36 |
+
|
37 |
+
`hotpotqa/test`
|
38 |
+
|
39 |
+
| name | nDCG@10 | R@1000 |
|
40 |
+
|:-------|----------:|---------:|
|
41 |
+
| bm25 | 0.5858 | 0.8689 |
|
42 |
+
| dph | 0.6169 | 0.8824 |
|
43 |
|
44 |
## Reproduction
|
45 |
|
46 |
```python
|
47 |
+
import pyterrier as pt
|
48 |
+
from tqdm import tqdm
|
49 |
+
import pandas as pd
|
50 |
+
import ir_datasets
|
51 |
+
from pyterrier_pisa import PisaIndex
|
52 |
+
dataset = ir_datasets.load('beir/hotpotqa')
|
53 |
+
meta_docno_len = dataset.metadata()['docs']['fields']['doc_id']['max_len']
|
54 |
+
indexer = pt.IterDictIndexer("./hotpotqa.terrier", meta={'docno': meta_docno_len, 'text': 4096})
|
55 |
+
docs = ({'docno': d.doc_id, 'text': d.default_text()} for d in tqdm(dataset.docs))
|
56 |
+
indexer.index(docs)
|
57 |
```
|
58 |
|
59 |
## Metadata
|