Update README.md
Browse files
README.md
CHANGED
|
@@ -14,25 +14,35 @@ 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 SciFact
|
| 18 |
|
| 19 |
## Usage
|
| 20 |
|
| 21 |
```python
|
| 22 |
# Load the artifact
|
| 23 |
import pyterrier as pt
|
| 24 |
+
index = pt.Artifact.from_hf('pyterrier/scifact.terrier')
|
| 25 |
+
index.bm25()
|
| 26 |
```
|
| 27 |
|
| 28 |
## Benchmarks
|
| 29 |
|
| 30 |
+
| name | nDCG@10 | R@1000 |
|
| 31 |
+
|:-------|----------:|---------:|
|
| 32 |
+
| bm25 | 0.6839 | 0.9767 |
|
| 33 |
+
| dph | 0.6716 | 0.9733 |
|
| 34 |
|
| 35 |
## Reproduction
|
| 36 |
|
| 37 |
```python
|
| 38 |
+
import pyterrier as pt
|
| 39 |
+
from tqdm import tqdm
|
| 40 |
+
import ir_datasets
|
| 41 |
+
dataset = ir_datasets.load('beir/scifact')
|
| 42 |
+
meta_docno_len = dataset.metadata()['docs']['fields']['doc_id']['max_len']
|
| 43 |
+
indexer = pt.IterDictIndexer("./scifact.terrier", meta={'docno': meta_docno_len, 'text': 4096})
|
| 44 |
+
docs = ({'docno': d.doc_id, 'text': d.default_text()} for d in tqdm(dataset.docs))
|
| 45 |
+
indexer.index(docs)
|
| 46 |
```
|
| 47 |
|
| 48 |
## Metadata
|