Datasets:
Tasks:
Text Generation
Formats:
parquet
Sub-tasks:
language-modeling
Languages:
Danish
Size:
1M - 10M
License:
KennethEnevoldsen
commited on
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.
|
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=
|
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", "
|
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:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c434925b6234607b63c4e7ab6c9a1e1b75e49c7623e03dea3bdbc6ba579f7910
|
3 |
+
size 71191536
|