Datasets:

Languages:
Estonian
License:
henryharm commited on
Commit
5054fde
·
1 Parent(s): 5f16ef9

Added validation split.

Browse files
Files changed (1) hide show
  1. ERRnews.py +12 -4
ERRnews.py CHANGED
@@ -7,16 +7,14 @@ import regex as re
7
 
8
  class ERRNewsConfig(datasets.BuilderConfig):
9
  def __init__(self, data_url, features, recordings_url, **kwargs):
10
- super().__init__(version=datasets.Version("1.0.0"), **kwargs)
11
  self.data_url = data_url
12
  self.recordings_url = recordings_url
13
  self.features = features
14
 
15
 
16
  class ERRNews(datasets.GeneratorBasedBuilder):
17
- VERSION = datasets.Version("1.0.0")
18
- # data_url = "http://bark.phon.ioc.ee/lw/korpused/err_uudised/data.zip"
19
- data_url = "https://huggingface.co/datasets/TalTechNLP/ERRnews/resolve/main/data.zip"
20
  recordings_url = "http://bark.phon.ioc.ee/lw/korpused/err_uudised/recordings.tar"
21
  features = ["name", "summary", "transcript", "url", "meta"]
22
 
@@ -105,6 +103,7 @@ class ERRNews(datasets.GeneratorBasedBuilder):
105
  """Returns SplitGenerators."""
106
  train = "train.csv"
107
  test = "test.csv"
 
108
 
109
  data_archive = dl_manager.download_and_extract(self.config.data_url)
110
 
@@ -126,6 +125,15 @@ class ERRNews(datasets.GeneratorBasedBuilder):
126
  "data_archive": data_archive
127
  },
128
  ),
 
 
 
 
 
 
 
 
 
129
  datasets.SplitGenerator(
130
  name=datasets.Split.TEST,
131
  gen_kwargs={
 
7
 
8
  class ERRNewsConfig(datasets.BuilderConfig):
9
  def __init__(self, data_url, features, recordings_url, **kwargs):
10
+ super().__init__(version=datasets.Version("1.1.0"), **kwargs)
11
  self.data_url = data_url
12
  self.recordings_url = recordings_url
13
  self.features = features
14
 
15
 
16
  class ERRNews(datasets.GeneratorBasedBuilder):
17
+ data_url = "http://bark.phon.ioc.ee/lw/korpused/err_uudised/data.zip"
 
 
18
  recordings_url = "http://bark.phon.ioc.ee/lw/korpused/err_uudised/recordings.tar"
19
  features = ["name", "summary", "transcript", "url", "meta"]
20
 
 
103
  """Returns SplitGenerators."""
104
  train = "train.csv"
105
  test = "test.csv"
106
+ val = "val.csv"
107
 
108
  data_archive = dl_manager.download_and_extract(self.config.data_url)
109
 
 
125
  "data_archive": data_archive
126
  },
127
  ),
128
+ datasets.SplitGenerator(
129
+ name=datasets.Split.VALIDATION,
130
+ gen_kwargs={
131
+ "file_path": val,
132
+ "audio_files": audio_files,
133
+ "recordings_archive": recordings_archive,
134
+ "data_archive": data_archive
135
+ },
136
+ ),
137
  datasets.SplitGenerator(
138
  name=datasets.Split.TEST,
139
  gen_kwargs={