File size: 2,290 Bytes
66b5d3b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
from datasets import load_dataset
dataset_name = "ConditionalQA"
passages = load_dataset("kwang2049/dapr", f"{dataset_name}-corpus", split="test")
for passage in passages:
passage["_id"] # passage id
passage["text"] # passage text
passage["title"] # doc title
passage["doc_id"]
passage["paragraph_no"] # the paragraph number within the document
passage["total_paragraphs"] # how many paragraphs/passages in total in the document
passage["is_candidate"] # is this passage a candidate for retrieval
from datasets import load_dataset
dataset_name = "ConditionalQA"
passages = load_dataset(
"kwang2049/dapr", f"{dataset_name}-corpus", split="test", streaming=True
)
for passage in passages:
passage["_id"] # passage id
passage["text"] # passage text
passage["title"] # doc title
passage["doc_id"]
passage["paragraph_no"] # the paragraph number within the document
passage["total_paragraphs"] # how many paragraphs/passages in total in the document
passage["is_candidate"] # is this passage a candidate for retrieval
from datasets import load_dataset
dataset_name = "ConditionalQA"
docs = load_dataset("kwang2049/dapr", f"{dataset_name}-docs", split="test")
for doc in docs:
doc["doc_id"]
doc["title"] # doc title
doc["passage_ids"] # list of passage ids in the document
doc["passages"] # list of passage/paragraph texts in the document
from datasets import load_dataset
dataset_name = "ConditionalQA"
qrels = load_dataset("kwang2049/dapr", f"{dataset_name}-qrels", split="test")
for qrel in qrels:
qrel["query_id"] # query id (the text is available in ConditionalQA-queries)
qrel["corpus_id"] # passage id
qrel["score"] # gold judgement
from datasets import load_dataset
qrels = load_dataset("kwang2049/dapr", "nq-hard", split="test")
for qrel in qrels:
qrel["query_id"] # query id (the text is available in ConditionalQA-queries)
qrel["corpus_id"] # passage id
qrel["score"] # gold judgement
# Additional columns:
qrel["query"] # query text
qrel["text"] # passage text
qrel["title"] # doc title
qrel["doc_id"]
qrel["categories"] # list of categories about this query-passage pair
qrel["url"] # url to the document in Wikipedia
|