3v324v23 commited on
Commit
824b300
1 Parent(s): f1dcf0d
Files changed (1) hide show
  1. ESCI-product-dataset.py +1 -21
ESCI-product-dataset.py CHANGED
@@ -75,24 +75,4 @@ class ESCIproduct(datasets.GeneratorBasedBuilder):
75
  with open(filepath, encoding="utf-8") as f:
76
  for line in f:
77
  data = json.loads(line)
78
- if data.get('query-stem') is None:
79
- data['query-stem'] = data['query']
80
- if data.get('query-lemmatize') is None:
81
- data['query-lemmatize'] = data['query']
82
- if data.get('query-char-delete') is None:
83
- data['query-char-delete'] = data['query']
84
- if data.get('query-char-keyboard') is None:
85
- data['query-random-char-swap'] = data['query']
86
- if data.get('query-inject-det') is None:
87
- data['query-inject-det'] = data['query']
88
- if data.get('query-synonym') is None:
89
- data['query-synonym'] = data['query']
90
- if data.get('query-char-keyboard') is None:
91
- data['query-char-keyboard'] = data['query']
92
- if data.get('query-paraphrase') is None:
93
- data['query-paraphrase'] = data['query']
94
- if data.get('query-reorder-words') is None:
95
- data['query-reorder-words'] = data['query']
96
- if data.get('query-backtranslation') is None:
97
- data['query-backtranslation'] = data['query']
98
- yield data['query_id'], data
 
75
  with open(filepath, encoding="utf-8") as f:
76
  for line in f:
77
  data = json.loads(line)
78
+ yeild data['query_id'], data