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