Divyanshu commited on
Commit
caeff72
·
1 Parent(s): 469ce3f
Files changed (1) hide show
  1. IE_SemParse.py +4 -1
IE_SemParse.py CHANGED
@@ -56,6 +56,9 @@ mapping = {"itop": "IE-mTOP",
56
  "indic-atis": "IE-ATIS",
57
  "indic-TOP": "IE-multilingualTOP"}
58
 
 
 
 
59
  _URL = "https://huggingface.co/datasets/Divyanshu/IE_SemParse/resolve/main/"
60
 
61
 
@@ -77,7 +80,7 @@ class IE_SemParseConfig(datasets.BuilderConfig):
77
  self.datasets = _DATASETS
78
 
79
  self._URLS = [os.path.join(
80
- _URL, "unfiltered_data", dataset, f"{language}.json")]
81
 
82
 
83
  class IE_SemParse(datasets.GeneratorBasedBuilder):
 
56
  "indic-atis": "IE-ATIS",
57
  "indic-TOP": "IE-multilingualTOP"}
58
 
59
+
60
+ reverse_map = {v:k for k,v in mapping.items()}
61
+
62
  _URL = "https://huggingface.co/datasets/Divyanshu/IE_SemParse/resolve/main/"
63
 
64
 
 
80
  self.datasets = _DATASETS
81
 
82
  self._URLS = [os.path.join(
83
+ _URL, "unfiltered_data", reverse_map[dataset], f"{language}.json")]
84
 
85
 
86
  class IE_SemParse(datasets.GeneratorBasedBuilder):