Datasets:
Tasks:
Text Generation
Formats:
parquet
Sub-tasks:
language-modeling
Languages:
Danish
Size:
1M - 10M
License:
KennethEnevoldsen
commited on
Only compute descriptive statistics when required
Browse files- data/adl/descriptive_stats.json +1 -1
- data/botxt/descriptive_stats.json +1 -1
- data/dannet/descriptive_stats.json +1 -1
- data/depbank/descriptive_stats.json +1 -1
- data/ep/descriptive_stats.json +1 -1
- data/ft/descriptive_stats.json +1 -1
- data/gutenberg/descriptive_stats.json +1 -1
- data/hest/descriptive_stats.json +1 -1
- data/jvj/descriptive_stats.json +1 -1
- data/naat/descriptive_stats.json +1 -1
- data/nordjyllandnews/descriptive_stats.json +1 -1
- data/relig/descriptive_stats.json +1 -1
- data/retsinformationdk/descriptive_stats.json +1 -1
- data/retspraksis/descriptive_stats.json +1 -1
- data/skat/descriptive_stats.json +1 -1
- data/spont/descriptive_stats.json +1 -1
- data/synne/descriptive_stats.json +1 -1
- data/tv2r/descriptive_stats.json +1 -1
- data/wiki/descriptive_stats.json +1 -1
- data/wikibooks/descriptive_stats.json +1 -1
- data/wikisource/descriptive_stats.json +1 -1
- descriptive_stats.json +1 -1
- scripts/update_descriptive_statistics.py +3 -4
data/adl/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 498, "average_document_length": 324932.2429718876, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 498, "average_document_length": 324932.2429718876, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/botxt/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 106, "average_document_length": 18972.415094339623, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 106, "average_document_length": 18972.415094339623, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/dannet/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 49040, "average_document_length": 90.80340538336053, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 49040, "average_document_length": 90.80340538336053, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/depbank/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 536, "average_document_length": 1018.8992537313433, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 536, "average_document_length": 1018.8992537313433, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/ep/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 4213, "average_document_length": 74063.40469973891, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 4213, "average_document_length": 74063.40469973891, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/ft/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 1315, "average_document_length": 266745.19163498096, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 1315, "average_document_length": 266745.19163498096, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/gutenberg/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 66, "average_document_length": 290147.9393939394, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 66, "average_document_length": 290147.9393939394, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/hest/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 14391, "average_document_length": 82950.79104996179, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 14391, "average_document_length": 82950.79104996179, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/jvj/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 42, "average_document_length": 254893.66666666666, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 42, "average_document_length": 254893.66666666666, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/naat/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 129, "average_document_length": 6832.387596899225, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 129, "average_document_length": 6832.387596899225, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/nordjyllandnews/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 75219, "average_document_length": 1540.2673659580691, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 75219, "average_document_length": 1540.2673659580691, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/relig/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 66, "average_document_length": 53873.56060606061, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 66, "average_document_length": 53873.56060606061, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/retsinformationdk/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 64043, "average_document_length": 22248.525506300455, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 64043, "average_document_length": 22248.525506300455, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/retspraksis/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 4413, "average_document_length": 46323.66915930206, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 4413, "average_document_length": 46323.66915930206, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/skat/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 14716, "average_document_length": 24026.800964936123, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 14716, "average_document_length": 24026.800964936123, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/spont/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 411, "average_document_length": 9736.79805352798, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 411, "average_document_length": 9736.79805352798, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/synne/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 178, "average_document_length": 785.3258426966293, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 178, "average_document_length": 785.3258426966293, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/tv2r/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 49137, "average_document_length": 1303.3820746077295, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 49137, "average_document_length": 1303.3820746077295, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/wiki/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 264502, "average_document_length": 1386.6366794958071, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 264502, "average_document_length": 1386.6366794958071, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/wikibooks/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 1319, "average_document_length": 13291.027293404093, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 1319, "average_document_length": 13291.027293404093, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
data/wikisource/descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 2429, "average_document_length": 6372.487855084397, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 2429, "average_document_length": 6372.487855084397, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
descriptive_stats.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"number_of_samples": 546769, "average_document_length": 8461.252984349881, "language": "dan, dansk, Danish"}
|
|
|
1 |
+
{"number_of_samples": 546769, "average_document_length": 8461.252984349881, "language": "dan, dansk, Danish", "revision": "f2ad4e16f68745b42ccd1b8e614b6e6908d15ffc"}
|
scripts/update_descriptive_statistics.py
CHANGED
@@ -16,8 +16,7 @@ from textwrap import dedent
|
|
16 |
from typing import Self, cast
|
17 |
|
18 |
from datasets import Dataset, load_dataset
|
19 |
-
|
20 |
-
from .git_utilities import check_is_ancestor, get_current_revision, get_latest_revision
|
21 |
|
22 |
logger = logging.getLogger(__name__)
|
23 |
|
@@ -140,6 +139,7 @@ def create_parser():
|
|
140 |
parser.add_argument(
|
141 |
"--force",
|
142 |
type=bool,
|
|
|
143 |
action=argparse.BooleanOptionalAction,
|
144 |
help="Should the statistics be forcefully recomputed. By default it checks the difference in commit ids.",
|
145 |
)
|
@@ -170,7 +170,6 @@ def main(
|
|
170 |
update_statitics(dataset_path, dataset_path.name, force=force)
|
171 |
|
172 |
update_statitics(repo_path, "default", "README.md", force=force)
|
173 |
-
# TODO: Only compute statistics is there has been changed in repo + add force flag
|
174 |
|
175 |
|
176 |
if __name__ == "__main__":
|
@@ -181,5 +180,5 @@ if __name__ == "__main__":
|
|
181 |
args.dataset,
|
182 |
logging_level=args.logging_level,
|
183 |
force=args.force,
|
184 |
-
repo_path=args.repo_path,
|
185 |
)
|
|
|
16 |
from typing import Self, cast
|
17 |
|
18 |
from datasets import Dataset, load_dataset
|
19 |
+
from git_utilities import check_is_ancestor, get_current_revision, get_latest_revision
|
|
|
20 |
|
21 |
logger = logging.getLogger(__name__)
|
22 |
|
|
|
139 |
parser.add_argument(
|
140 |
"--force",
|
141 |
type=bool,
|
142 |
+
default=False,
|
143 |
action=argparse.BooleanOptionalAction,
|
144 |
help="Should the statistics be forcefully recomputed. By default it checks the difference in commit ids.",
|
145 |
)
|
|
|
170 |
update_statitics(dataset_path, dataset_path.name, force=force)
|
171 |
|
172 |
update_statitics(repo_path, "default", "README.md", force=force)
|
|
|
173 |
|
174 |
|
175 |
if __name__ == "__main__":
|
|
|
180 |
args.dataset,
|
181 |
logging_level=args.logging_level,
|
182 |
force=args.force,
|
183 |
+
repo_path=Path(args.repo_path),
|
184 |
)
|