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 Quora
|
18 |
|
19 |
## Usage
|
20 |
|
21 |
```python
|
22 |
# Load the artifact
|
23 |
import pyterrier as pt
|
24 |
+
index = pt.Artifact.from_hf('pyterrier/quora.terrier')
|
25 |
+
index.bm25()
|
26 |
```
|
27 |
|
28 |
## Benchmarks
|
29 |
|
30 |
+
`quora/dev`
|
31 |
+
|
32 |
+
| name | nDCG@10 | R@1000 |
|
33 |
+
|:-------|----------:|---------:|
|
34 |
+
| bm25 | 0.7712 | 0.9908 |
|
35 |
+
| dph | 0.4529 | 0.9005 |
|
36 |
+
|
37 |
+
`quora/test`
|
38 |
+
|
39 |
+
| name | nDCG@10 | R@1000 |
|
40 |
+
|:-------|----------:|---------:|
|
41 |
+
| bm25 | 0.7676 | 0.9926 |
|
42 |
+
| dph | 0.4429 | 0.9026 |
|
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/quora')
|
53 |
+
meta_docno_len = dataset.metadata()['docs']['fields']['doc_id']['max_len']
|
54 |
+
indexer = pt.IterDictIndexer("./quora.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
|