KennethEnevoldsen commited on
Commit
4c4c016
·
unverified ·
1 Parent(s): 3ab36be

minor fixes in spellings

Browse files
data/nordjyllandnews/create.py CHANGED
@@ -18,7 +18,7 @@ source = "nordjyllandnews"
18
 
19
 
20
  def convert_sample(example):
21
- schema = random.sample(schemas, k=1)[0]
22
  new_example = dict(
23
  text_new=schema.format(text=example["text"], summary=example["summary"]),
24
  source=source,
@@ -26,7 +26,7 @@ def convert_sample(example):
26
  license="Creative Commons Legal Code\n\nCC0 1.0 Universal",
27
  added="2024-12-16",
28
  created="2000-01-01, 2024-01-01", # best guess
29
- metadata=dict(source_pretty="Nordjylland News"),
30
  )
31
 
32
  return new_example
@@ -40,7 +40,7 @@ def main():
40
  ds = ds.rename_columns({"text_new": "text"})
41
  ds = ds.add_column("id", [f"{source}_{i}" for i in range(len(ds))]) # type: ignore
42
  ds = ds.select_columns(
43
- ["text", "source", "id", "domain", "license", "added", "created", "metadata"]
44
  )
45
 
46
  save_path = Path(__file__).parent / f"{source}.parquet"
 
18
 
19
 
20
  def convert_sample(example):
21
+ schema = random.choice(schemas)
22
  new_example = dict(
23
  text_new=schema.format(text=example["text"], summary=example["summary"]),
24
  source=source,
 
26
  license="Creative Commons Legal Code\n\nCC0 1.0 Universal",
27
  added="2024-12-16",
28
  created="2000-01-01, 2024-01-01", # best guess
29
+ metadata={"source-pretty": "Nordjylland News"},
30
  )
31
 
32
  return new_example
 
40
  ds = ds.rename_columns({"text_new": "text"})
41
  ds = ds.add_column("id", [f"{source}_{i}" for i in range(len(ds))]) # type: ignore
42
  ds = ds.select_columns(
43
+ ["text", "source", "id", "added", "created", "license", "domain", "metadata"]
44
  )
45
 
46
  save_path = Path(__file__).parent / f"{source}.parquet"
data/nordjyllandnews/nordjyllandnews.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c577afba60df86561471214e53122783bff296b440e743926948c4fe01cd7b97
3
- size 71246640
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c434925b6234607b63c4e7ab6c9a1e1b75e49c7623e03dea3bdbc6ba579f7910
3
+ size 71191536