Datasets:

ArXiv:
License:
dfki-nlp commited on
Commit
8ad83b8
·
1 Parent(s): 7dff620

code reformatting

Browse files
Files changed (1) hide show
  1. tacred_dfki.py +7 -5
tacred_dfki.py CHANGED
@@ -97,7 +97,7 @@ _LANGS = [
97
  "de",
98
  "en",
99
  "es",
100
- #"eu",
101
  "fi",
102
  "fr",
103
  "hi",
@@ -177,9 +177,11 @@ class TacredDfki(datasets.GeneratorBasedBuilder):
177
  and web text from the corpus used in the yearly TAC Knowledge Base Population (TAC KBP) challenges."""
178
 
179
  BUILDER_CONFIGS = [
180
- TacredDfkiConfig(name=f"{variant}-{lang}",
181
- description=f"{'The revised TACRED (corrected labels in dev and test split)' if variant == 'revised' else 'The original TACRED'} examples in language '{lang}'."
182
- ) for (lang,variant) in itertools.product(_LANGS, ["original", "revised"])
 
 
183
  ]
184
 
185
  DEFAULT_CONFIG_NAME = "original-en" # type: ignore
@@ -238,7 +240,7 @@ class TacredDfki(datasets.GeneratorBasedBuilder):
238
  patch_files = dl_manager.download_and_extract(_PATCH_URLs)
239
 
240
  data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
241
- lang = self.config.name.split('-')[1]
242
 
243
  if not os.path.exists(data_dir):
244
  raise FileNotFoundError(
 
97
  "de",
98
  "en",
99
  "es",
100
+ # "eu",
101
  "fi",
102
  "fr",
103
  "hi",
 
177
  and web text from the corpus used in the yearly TAC Knowledge Base Population (TAC KBP) challenges."""
178
 
179
  BUILDER_CONFIGS = [
180
+ TacredDfkiConfig(
181
+ name=f"{variant}-{lang}",
182
+ description=f"{'The revised TACRED (corrected labels in dev and test split)' if variant == 'revised' else 'The original TACRED'} examples in language '{lang}'.",
183
+ )
184
+ for (lang, variant) in itertools.product(_LANGS, ["original", "revised"])
185
  ]
186
 
187
  DEFAULT_CONFIG_NAME = "original-en" # type: ignore
 
240
  patch_files = dl_manager.download_and_extract(_PATCH_URLs)
241
 
242
  data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
243
+ lang = self.config.name.split("-")[1]
244
 
245
  if not os.path.exists(data_dir):
246
  raise FileNotFoundError(