Datasets:

Modalities:
Tabular
Text
ArXiv:
Libraries:
Datasets
License:
Maxime commited on
Commit
6f54ac4
1 Parent(s): 91dac38

add domain_id, pair_id for flat representation

Browse files
Files changed (1) hide show
  1. mfaq.py +4 -2
mfaq.py CHANGED
@@ -58,7 +58,8 @@ class MFAQ(datasets.GeneratorBasedBuilder):
58
  if "_flat" in self.config.name:
59
  features = datasets.Features(
60
  {
61
- "id": datasets.Value("int64"),
 
62
  "language": datasets.Value("string"),
63
  "num_pairs": datasets.Value("int64"),
64
  "domain": datasets.Value("string"),
@@ -117,7 +118,8 @@ class MFAQ(datasets.GeneratorBasedBuilder):
117
  if "flat" in self.config.name:
118
  for i, pair in enumerate(data["qa_pairs"]):
119
  yield f"{filepath}_{_id}_{i}", {
120
- "id": data["id"],
 
121
  "domain": data["domain"],
122
  "language": data["language"],
123
  "num_pairs": 1,
 
58
  if "_flat" in self.config.name:
59
  features = datasets.Features(
60
  {
61
+ "domain_id": datasets.Value("int64"),
62
+ "pair_id": datasets.Value("int64"),
63
  "language": datasets.Value("string"),
64
  "num_pairs": datasets.Value("int64"),
65
  "domain": datasets.Value("string"),
 
118
  if "flat" in self.config.name:
119
  for i, pair in enumerate(data["qa_pairs"]):
120
  yield f"{filepath}_{_id}_{i}", {
121
+ "domain_id": data["id"],
122
+ "pair_id": i,
123
  "domain": data["domain"],
124
  "language": data["language"],
125
  "num_pairs": 1,