macavaney commited on
Commit
84c276e
·
verified ·
1 Parent(s): 10104df

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -5
README.md CHANGED
@@ -14,25 +14,35 @@ viewer: false
14
 
15
  ## Description
16
 
17
- *TODO: What is the artifact?*
18
 
19
  ## Usage
20
 
21
  ```python
22
  # Load the artifact
23
  import pyterrier as pt
24
- artifact = pt.Artifact.from_hf('pyterrier/webis-touche2020.terrier')
25
- # TODO: Show how you use the artifact
26
  ```
27
 
28
  ## Benchmarks
29
 
30
- *TODO: Provide benchmarks for the artifact.*
 
 
 
31
 
32
  ## Reproduction
33
 
34
  ```python
35
- # TODO: Show how you constructed the artifact.
 
 
 
 
 
 
 
36
  ```
37
 
38
  ## Metadata
 
14
 
15
  ## Description
16
 
17
+ Terrier index for Touche2020
18
 
19
  ## Usage
20
 
21
  ```python
22
  # Load the artifact
23
  import pyterrier as pt
24
+ index = pt.Artifact.from_hf('pyterrier/webis-touche2020.terrier')
25
+ index.bm25()
26
  ```
27
 
28
  ## Benchmarks
29
 
30
+ | name | nDCG@10 | R@1000 |
31
+ |:-------|----------:|---------:|
32
+ | bm25 | 0.594 | 0.7307 |
33
+ | dph | 0.6756 | 0.7244 |
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/webis-touche2020/v2')
42
+ meta_docno_len = dataset.metadata()['docs']['fields']['doc_id']['max_len']
43
+ indexer = pt.IterDictIndexer("./webis-touche2020/v2.terrier", meta={'docno': meta_docno_len, 'text': 4096})
44
+ docs = ({'docno': d.doc_id, 'text': '{title}\n{text}'.format(**d._asdict())} for d in tqdm(dataset.docs))
45
+ indexer.index(docs)
46
  ```
47
 
48
  ## Metadata