chiseng-cheang commited on
Commit
c0a3f59
1 Parent(s): 55d42f8

Update TempoSum.py

Browse files
Files changed (1) hide show
  1. TempoSum.py +1 -13
TempoSum.py CHANGED
@@ -56,8 +56,6 @@ class TempoSumConfig(datasets.BuilderConfig):
56
  super(TempoSumConfig, self).__init__(version=datasets.Version("1.0.0"), **kwargs)
57
  self.features = datasets.Features({
58
  feature: datasets.Value("string") for feature in available_features
59
- # _DOCUMENT: datasets.Value("string"),
60
- # _SUMMARY: datasets.Value("string"),
61
  })
62
  self.urls = urls
63
  self.available_features = available_features
@@ -97,9 +95,6 @@ class TempoSum(datasets.GeneratorBasedBuilder):
97
  return splits
98
 
99
  def _generate_examples(self, data_file, split):
100
- # document_path = os.path.join(data_file, _DOCUMENT)
101
- # summary_path = os.path.join(data_file, _SUMMARY)
102
-
103
  features = self.config.available_features
104
  with ExitStack() as stack:
105
  files = [stack.enter_context(open(os.path.join(data_file, feature))) \
@@ -109,11 +104,4 @@ class TempoSum(datasets.GeneratorBasedBuilder):
109
  yield idx, {
110
  feature: feature_data
111
  for (feature, feature_data) in zip(features, sample_data)
112
- }
113
-
114
- # with open(document_path, 'r') as document_reader, open(summary_path, 'r') as summary_reader:
115
- # for idx, (document, summary) in enumerate(zip(document_reader, summary_reader)):
116
- # yield idx, {
117
- # _DOCUMENT: document,
118
- # _SUMMARY: summary,
119
- # }
 
56
  super(TempoSumConfig, self).__init__(version=datasets.Version("1.0.0"), **kwargs)
57
  self.features = datasets.Features({
58
  feature: datasets.Value("string") for feature in available_features
 
 
59
  })
60
  self.urls = urls
61
  self.available_features = available_features
 
95
  return splits
96
 
97
  def _generate_examples(self, data_file, split):
 
 
 
98
  features = self.config.available_features
99
  with ExitStack() as stack:
100
  files = [stack.enter_context(open(os.path.join(data_file, feature))) \
 
104
  yield idx, {
105
  feature: feature_data
106
  for (feature, feature_data) in zip(features, sample_data)
107
+ }