Update README.md
Browse files
README.md
CHANGED
|
@@ -14,25 +14,47 @@ 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 Fever
|
| 18 |
|
| 19 |
## Usage
|
| 20 |
|
| 21 |
```python
|
| 22 |
# Load the artifact
|
| 23 |
import pyterrier as pt
|
| 24 |
+
index = pt.Artifact.from_hf('pyterrier/fever.terrier')
|
| 25 |
+
index.bm25()
|
| 26 |
```
|
| 27 |
|
| 28 |
## Benchmarks
|
| 29 |
|
| 30 |
+
`fever/dev`
|
| 31 |
+
|
| 32 |
+
| name | nDCG@10 | R@1000 |
|
| 33 |
+
|:-------|----------:|---------:|
|
| 34 |
+
| bm25 | 0.5179 | 0.9368 |
|
| 35 |
+
| dph | 0.689 | 0.9513 |
|
| 36 |
+
|
| 37 |
+
`fever/test`
|
| 38 |
+
|
| 39 |
+
| name | nDCG@10 | R@1000 |
|
| 40 |
+
|:-------|----------:|---------:|
|
| 41 |
+
| bm25 | 0.5045 | 0.934 |
|
| 42 |
+
| dph | 0.6767 | 0.9505 |
|
| 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 |
+
dataset = ir_datasets.load('beir/fever')
|
| 54 |
+
meta_docno_len = dataset.metadata()['docs']['fields']['doc_id']['max_len']
|
| 55 |
+
indexer = pt.IterDictIndexer("./fever.terrier", meta={'docno': meta_docno_len, 'text': 4096})
|
| 56 |
+
docs = ({'docno': d.doc_id, 'text': d.default_text()} for d in tqdm(dataset.docs))
|
| 57 |
+
indexer.index(docs)
|
| 58 |
```
|
| 59 |
|
| 60 |
## Metadata
|