rbawden commited on
Commit
7590452
·
verified ·
1 Parent(s): 569d348

Update discevalmt.py

Browse files
Files changed (1) hide show
  1. discevalmt.py +7 -4
discevalmt.py CHANGED
@@ -33,6 +33,7 @@ _URLS = {
33
 
34
  class DiscEvalMTConfig(datasets.BuilderConfig):
35
  '''BuilderConfig for DiscEvalMT.'''
 
36
 
37
  def __init__(self, **kwargs):
38
  """BuilderConfig for DiscEvalMT.
@@ -50,16 +51,18 @@ class DiscEvalMT(datasets.GeneratorBasedBuilder):
50
 
51
  BUILDER_CONFIGS = [
52
  DiscEvalMTConfig(
53
- name='plain_text',
 
 
 
 
54
  version=datasets.Version('2.0.0', ''),
55
- description='Plain text',
56
  ),
57
  ]
58
 
59
  def _split_generators(self, dl_manager):
60
  downloaded_files = dl_manager.download_and_extract(_URLS)
61
 
62
- return [datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={'filepath': downloaded_files['test-anaphora']}),
63
- datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={'filepath': downloaded_files['test-lexical_choice']}),
64
  ]
65
 
 
33
 
34
  class DiscEvalMTConfig(datasets.BuilderConfig):
35
  '''BuilderConfig for DiscEvalMT.'''
36
+ type: str = None
37
 
38
  def __init__(self, **kwargs):
39
  """BuilderConfig for DiscEvalMT.
 
51
 
52
  BUILDER_CONFIGS = [
53
  DiscEvalMTConfig(
54
+ type='anaphora',
55
+ version=datasets.Version('2.0.0', ''),
56
+ ),
57
+ DiscEvalMTConfig(
58
+ type='lexical choice',
59
  version=datasets.Version('2.0.0', ''),
 
60
  ),
61
  ]
62
 
63
  def _split_generators(self, dl_manager):
64
  downloaded_files = dl_manager.download_and_extract(_URLS)
65
 
66
+ return [datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={'filepath': downloaded_files['test' + self.type]}),
 
67
  ]
68