Update README.md
Browse files
README.md
CHANGED
@@ -31,3 +31,16 @@ configs:
|
|
31 |
- split: train
|
32 |
path: data/train-*
|
33 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
- split: train
|
32 |
path: data/train-*
|
33 |
---
|
34 |
+
|
35 |
+
This dataset was created by filtering and adding columns needed to evaluate retrievers to "v1.1" version of [MSMARCO dataset] (https://github.com/microsoft/MSMARCO-Question-Answering). I am additionally providing the code used to filter the dataset in order to make everything clear.
|
36 |
+
|
37 |
+
```
|
38 |
+
msmarco = load_dataset("ms_marco", "v1.1", split="train").to_pandas()
|
39 |
+
msmarco["golden_passages"] = [row["passages"]["passage_text"][row["passages"]["is_selected"]==1] for _, row in msmarco.iterrows()]
|
40 |
+
msmarco_correct_answers = msmarco[msmarco["answers"].apply(lambda x: len(x) == 1)]
|
41 |
+
msmarco_correct_answers = msmarco_correct_answers[msmarco_correct_answers["wellFormedAnswers"].apply(lambda x: len(x) == 0)]
|
42 |
+
msmarco_correct_answers.dropna(inplace=True)
|
43 |
+
msmarco_correct_answers["answer"] = msmarco_correct_answers["answers"].apply(lambda x: x[0])
|
44 |
+
msmarco_correct_answers.drop(["wellFormedAnswers", "answers"], axis=1, inplace=True)
|
45 |
+
msmarco_correct_answers.reset_index(inplace=True, drop=True)
|
46 |
+
```
|