macavaney commited on
Commit
2de9c0a
·
verified ·
1 Parent(s): d971537

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +17 -5
README.md CHANGED
@@ -12,25 +12,37 @@ viewer: false
12
 
13
  ## Description
14
 
15
- *TODO: What is the artifact?*
16
 
17
  ## Usage
18
 
19
  ```python
20
  # Load the artifact
21
  import pyterrier as pt
22
- artifact = pt.Artifact.from_hf('pyterrier/climate-fever.terrier')
23
- # TODO: Show how you use the artifact
24
  ```
25
 
26
  ## Benchmarks
27
 
28
- *TODO: Provide benchmarks for the artifact.*
 
 
 
29
 
30
  ## Reproduction
31
 
32
  ```python
33
- # TODO: Show how you constructed the artifact.
 
 
 
 
 
 
 
 
 
34
  ```
35
 
36
  ## Metadata
 
12
 
13
  ## Description
14
 
15
+ Terrier index for Climate-Fever
16
 
17
  ## Usage
18
 
19
  ```python
20
  # Load the artifact
21
  import pyterrier as pt
22
+ index = pt.Artifact.from_hf('pyterrier/climate-fever.terrier')
23
+ index.bm25()
24
  ```
25
 
26
  ## Benchmarks
27
 
28
+ | name | nDCG@10 | R@1000 |
29
+ |:-------|----------:|---------:|
30
+ | bm25 | 0.1354 | 0.5844 |
31
+ | dph | 0.1693 | 0.6394 |
32
 
33
  ## Reproduction
34
 
35
  ```python
36
+ import pyterrier as pt
37
+ from tqdm import tqdm
38
+ import pandas as pd
39
+ import ir_datasets
40
+ from pyterrier_pisa import PisaIndex
41
+ dataset = ir_datasets.load('beir/climate-fever')
42
+ meta_docno_len = dataset.metadata()['docs']['fields']['doc_id']['max_len']
43
+ indexer = pt.IterDictIndexer("./climate-fever.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