christopher commited on
Commit
ff8d123
1 Parent(s): fdaf02d

Change example generation to use dummy.jsonl

Browse files
Files changed (1) hide show
  1. german_common_crawl.py +3 -2
german_common_crawl.py CHANGED
@@ -40,7 +40,7 @@ This Dataset is for pretraining a German Language Model (Unsupervised) or tune a
40
  REPO_URL = "https://huggingface.co/datasets/flax-community/german_common_crawl/resolve/main/"
41
 
42
  _URL_FIRST = [REPO_URL + file_name for file_name in [
43
- "de_head_0000_2015-48.txt.gz",
44
  # "dummy.txt.gz",
45
  ]]
46
 
@@ -222,7 +222,8 @@ class GermanCommonCrawl(datasets.GeneratorBasedBuilder):
222
  def _generate_examples(self, data_files):
223
  """This function returns the examples in the raw (text) form by iterating on all the files."""
224
  for filepath in data_files:
225
- with gzip.open(filepath, "rt", encoding="utf-8") as f:
 
226
  for id_, line in enumerate(f):
227
  item = literal_eval(line)
228
  yield id_, {
 
40
  REPO_URL = "https://huggingface.co/datasets/flax-community/german_common_crawl/resolve/main/"
41
 
42
  _URL_FIRST = [REPO_URL + file_name for file_name in [
43
+ "dummy.jsonl",
44
  # "dummy.txt.gz",
45
  ]]
46
 
 
222
  def _generate_examples(self, data_files):
223
  """This function returns the examples in the raw (text) form by iterating on all the files."""
224
  for filepath in data_files:
225
+ with open(filepath, encoding="utf-8") as f:
226
+ # with gzip.open(filepath, "rt", encoding="utf-8") as f:
227
  for id_, line in enumerate(f):
228
  item = literal_eval(line)
229
  yield id_, {