Datasets:

Languages:
Chinese
ArXiv:
License:
qian commited on
Commit
389d322
1 Parent(s): 1251b0e

Update T2Ranking.py

Browse files
Files changed (1) hide show
  1. T2Ranking.py +68 -0
T2Ranking.py CHANGED
@@ -36,7 +36,14 @@ year={2022}
36
  _URLS_DICT = {
37
  "collection": "data/collection.tsv",
38
  "qrels.train": "data/qrels.train.tsv",
 
 
 
39
  "queries.train": "data/queries.train.tsv",
 
 
 
 
40
  }
41
 
42
  _FEATURES_DICT = {
@@ -50,10 +57,43 @@ _FEATURES_DICT = {
50
  "pid": datasets.Value("int64"),
51
  "rel": datasets.Value("int64"),
52
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  'queries.train': {
54
  "qid": datasets.Value("int64"),
55
  "text": datasets.Value("string"),
56
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  }
58
 
59
  class T2RankingConfig(datasets.BuilderConfig):
@@ -76,10 +116,38 @@ class T2Ranking(datasets.GeneratorBasedBuilder):
76
  name="qrels.train",
77
  splits=['train'],
78
  ),
 
 
 
 
79
  T2RankingConfig(
80
  name="queries.train",
81
  splits=['train'],
82
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  ]
84
 
85
  def _info(self):
 
36
  _URLS_DICT = {
37
  "collection": "data/collection.tsv",
38
  "qrels.train": "data/qrels.train.tsv",
39
+ "qrels.dev": "data/qrels.dev.tsv",
40
+ "qrels.retrieval.train": "qrels.retrieval.train.tsv",
41
+ "qrels.retrieval.dev": "qrels.retrieval.dev.tsv",
42
  "queries.train": "data/queries.train.tsv",
43
+ "queries.test": "data/queries.test.tsv",
44
+ "queries.dev": "data/queries.dev.tsv",
45
+ "train.bm25.tsv": "data/train.bm25.tsv",
46
+ "train.mined.tsv": "data/train.mined.tsv",
47
  }
48
 
49
  _FEATURES_DICT = {
 
57
  "pid": datasets.Value("int64"),
58
  "rel": datasets.Value("int64"),
59
  },
60
+ 'qrels.retrieval.train': {
61
+ "qid": datasets.Value("int64"),
62
+ "pid": datasets.Value("int64"),
63
+ },
64
+ 'qrels.dev': {
65
+ "qid": datasets.Value("int64"),
66
+ "-": datasets.Value("int64"),
67
+ "pid": datasets.Value("int64"),
68
+ "rel": datasets.Value("int64"),
69
+ },
70
+ 'qrels.retrieval.dev': {
71
+ "qid": datasets.Value("int64"),
72
+ "pid": datasets.Value("int64"),
73
+ },
74
  'queries.train': {
75
  "qid": datasets.Value("int64"),
76
  "text": datasets.Value("string"),
77
  },
78
+ 'queries.dev': {
79
+ "qid": datasets.Value("int64"),
80
+ "text": datasets.Value("string"),
81
+ },
82
+ 'queries.test': {
83
+ "qid": datasets.Value("int64"),
84
+ "text": datasets.Value("string"),
85
+ },
86
+ "train.bm25.tsv": {
87
+ "qid": datasets.Value("int64"),
88
+ "pid": datasets.Value("int64"),
89
+ "score": datasets.Value("float32"),
90
+ },
91
+ "train.mined.tsv": {
92
+ "qid": datasets.Value("int64"),
93
+ "pid": datasets.Value("int64"),
94
+ "index": datasets.Value("int64"),
95
+ "score": datasets.Value("float32"),
96
+ },
97
  }
98
 
99
  class T2RankingConfig(datasets.BuilderConfig):
 
116
  name="qrels.train",
117
  splits=['train'],
118
  ),
119
+ T2RankingConfig(
120
+ name="qrels.dev",
121
+ splits=['train'],
122
+ ),
123
  T2RankingConfig(
124
  name="queries.train",
125
  splits=['train'],
126
  ),
127
+ T2RankingConfig(
128
+ name="queries.dev",
129
+ splits=['train'],
130
+ ),
131
+ T2RankingConfig(
132
+ name="queries.test",
133
+ splits=['train'],
134
+ ),
135
+ T2RankingConfig(
136
+ name="qrels.retrieval.train",
137
+ splits=['train'],
138
+ ),
139
+ T2RankingConfig(
140
+ name="qrels.retrieval.dev",
141
+ splits=['train'],
142
+ ),
143
+ T2RankingConfig(
144
+ name="train.bm25.tsv",
145
+ splits=['train'],
146
+ ),
147
+ T2RankingConfig(
148
+ name="train.mined.tsv",
149
+ splits=['train'],
150
+ ),
151
  ]
152
 
153
  def _info(self):