Tom Aarsen commited on
Commit
de1ae8d
·
1 Parent(s): bd08731

Extend README slightly

Browse files
Files changed (1) hide show
  1. README.md +10 -4
README.md CHANGED
@@ -44,7 +44,7 @@ configs:
44
 
45
  # MS MARCO Corpus
46
 
47
- This dataset allows for a convenient mapping from MS MARCO query/passage ID to the query/passage text. This corpus was downloaded from https://msmarco.z22.web.core.windows.net/msmarcoranking/collection.tar.gz.
48
 
49
  ## Usage
50
 
@@ -52,7 +52,13 @@ This dataset was designed to allow you to perform the following:
52
  ```python
53
  from datasets import load_dataset
54
 
55
- dataset = load_dataset("sentence-transformers/msmarco-corpus", "query")
56
- id_to_text = dict(zip(dataset["qid"], dataset["text"]))
57
- print(id_to_text[571018])
 
 
 
 
 
 
58
  ```
 
44
 
45
  # MS MARCO Corpus
46
 
47
+ This dataset allows for a convenient mapping from MS MARCO query/passage ID to the query/passage text. This passage corpus was downloaded from https://msmarco.z22.web.core.windows.net/msmarcoranking/collection.tar.gz, and the queries from https://msmarco.blob.core.windows.net/msmarcoranking/queries.tar.gz (via Wayback Machine).
48
 
49
  ## Usage
50
 
 
52
  ```python
53
  from datasets import load_dataset
54
 
55
+ query_dataset = load_dataset("sentence-transformers/msmarco-corpus", "query", split="train")
56
+ qid_to_query = dict(zip(query_dataset["qid"], query_dataset["text"]))
57
+ print(qid_to_query[571018])
58
+ # => "what are the liberal arts?"
59
+
60
+ passage_dataset = load_dataset("sentence-transformers/msmarco-corpus", "passage", split="train")
61
+ pid_to_passage = dict(zip(passage_dataset["pid"], passage_dataset["text"]))
62
+ print(pid_to_passage[7349777])
63
+ # => "liberal arts. 1. the academic course of instruction at a college intended to provide general knowledge and comprising the arts, humanities, natural sciences, and social sciences, as opposed to professional or technical subjects."
64
  ```