macavaney commited on
Commit
d6938b5
1 Parent(s): 5f77918

Update wrapup.md

Browse files
Files changed (1) hide show
  1. wrapup.md +3 -4
wrapup.md CHANGED
@@ -12,15 +12,14 @@ When you use the document encoder in an indexing pipeline, the rewritten documen
12
 
13
  ```python
14
  import pyterrier as pt
15
- pt.init(version='snapshot')
16
  import pyt_splade
17
 
18
  dataset = pt.get_dataset('irds:msmarco-passage')
19
- splade = pyt_splade.SpladeFactory()
20
 
21
  indexer = pt.IterDictIndexer('./msmarco_psg', pretokenised=True)
22
 
23
- indxer_pipe = splade.indexing() >> indexer
24
  indxer_pipe.index(dataset.get_corpus_iter())
25
  ```
26
 
@@ -36,7 +35,7 @@ and then performs retrieval:
36
  </div>
37
 
38
  ```python
39
- splade_retr = splade.query() >> pt.BatchRetrieve('./msmarco_psg', wmodel='Tf')
40
  ```
41
 
42
  ### References & Credits
 
12
 
13
  ```python
14
  import pyterrier as pt
 
15
  import pyt_splade
16
 
17
  dataset = pt.get_dataset('irds:msmarco-passage')
18
+ splade = pyt_splade.Splade()
19
 
20
  indexer = pt.IterDictIndexer('./msmarco_psg', pretokenised=True)
21
 
22
+ indxer_pipe = splade.doc_encoder() >> indexer
23
  indxer_pipe.index(dataset.get_corpus_iter())
24
  ```
25
 
 
35
  </div>
36
 
37
  ```python
38
+ splade_retr = splade.query_encoder() >> pt.terrier.Retriever('./msmarco_psg', wmodel='Tf')
39
  ```
40
 
41
  ### References & Credits