Datasets:

Modalities:
Text
Formats:
json
Libraries:
Datasets
pandas
License:
Per Egil Kummervold commited on
Commit
2d8e7af
·
1 Parent(s): 0c6c610
.gitattributes CHANGED
@@ -63,3 +63,5 @@ ndla_long_context_1024.jsonl filter=lfs diff=lfs merge=lfs -text
63
  ndla_long_context_1024_with_tags.jsonl filter=lfs diff=lfs merge=lfs -text
64
  npk_long_context_1024.jsonl filter=lfs diff=lfs merge=lfs -text
65
  npk_long_context_1024_with_tags.jsonl filter=lfs diff=lfs merge=lfs -text
 
 
 
63
  ndla_long_context_1024_with_tags.jsonl filter=lfs diff=lfs merge=lfs -text
64
  npk_long_context_1024.jsonl filter=lfs diff=lfs merge=lfs -text
65
  npk_long_context_1024_with_tags.jsonl filter=lfs diff=lfs merge=lfs -text
66
+ *.jsonl filter=lfs diff=lfs merge=lfs -text
67
+ */*.jsonl filter=lfs diff=lfs merge=lfs -text
dataset_info.json CHANGED
@@ -1,44 +1,36 @@
1
  {
2
  "splits": {
3
- "ndla_1024": {
4
- "name": "ndla_1024",
5
- "num_bytes": 53727594,
6
  "num_examples": 15866
7
  },
8
- "ndla_1024_tags": {
9
- "name": "ndla_1024_tags",
10
- "num_bytes": 47967074,
11
  "num_examples": 15816
12
  },
13
- "npk_1024": {
14
- "name": "npk_1024",
15
- "num_bytes": 404082302,
16
  "num_examples": 109893
17
  },
18
- "npk_1024_tags": {
19
- "name": "npk_1024_tags",
20
- "num_bytes": 501035578,
21
  "num_examples": 186912
22
  },
23
- "npk_8192": {
24
- "name": "npk_8192",
25
- "num_bytes": 380248150,
26
  "num_examples": 12559
27
  },
28
- "npk_8192_tags": {
29
- "name": "npk_8192_tags",
30
- "num_bytes": 460430466,
31
  "num_examples": 20606
32
  }
33
  },
34
- "download_size": 1895992564,
35
- "dataset_size": 1895992564,
36
  "data_files": {
37
- "ndla_1024": "ndla_long_context_1024.jsonl",
38
- "ndla_1024_tags": "ndla_long_context_1024_with_tags.jsonl",
39
- "npk_1024": "npk_long_context_1024.jsonl",
40
- "npk_1024_tags": "npk_long_context_1024_with_tags.jsonl",
41
- "npk_8192": "npk_long_context_8192.jsonl",
42
- "npk_8192_tags": "npk_long_context_8192_with_tags.jsonl"
43
  }
44
  }
 
1
  {
2
  "splits": {
3
+ "ndla_long_context_1024": {
4
+ "name": "ndla_long_context_1024",
 
5
  "num_examples": 15866
6
  },
7
+ "ndla_long_context_1024_with_tags": {
8
+ "name": "ndla_long_context_1024_with_tags",
 
9
  "num_examples": 15816
10
  },
11
+ "npk_long_context_1024": {
12
+ "name": "npk_long_context_1024",
 
13
  "num_examples": 109893
14
  },
15
+ "npk_long_context_1024_with_tags": {
16
+ "name": "npk_long_context_1024_with_tags",
 
17
  "num_examples": 186912
18
  },
19
+ "npk_long_context_8192": {
20
+ "name": "npk_long_context_8192",
 
21
  "num_examples": 12559
22
  },
23
+ "npk_long_context_8192_with_tags": {
24
+ "name": "npk_long_context_8192_with_tags",
 
25
  "num_examples": 20606
26
  }
27
  },
 
 
28
  "data_files": {
29
+ "ndla_long_context_1024": "ndla_long_context_1024/data.jsonl",
30
+ "ndla_long_context_1024_with_tags": "ndla_long_context_1024_with_tags/data.jsonl",
31
+ "npk_long_context_1024": "npk_long_context_1024/data.jsonl",
32
+ "npk_long_context_1024_with_tags": "npk_long_context_1024_with_tags/data.jsonl",
33
+ "npk_long_context_8192": "npk_long_context_8192/data.jsonl",
34
+ "npk_long_context_8192_with_tags": "npk_long_context_8192_with_tags/data.jsonl"
35
  }
36
  }
ndla_long_context_1024.jsonl → ndla_long_context_1024/data.jsonl RENAMED
File without changes
ndla_long_context_1024_with_tags.jsonl → ndla_long_context_1024_with_tags/data.jsonl RENAMED
File without changes
npk_long_context_1024.jsonl → npk_long_context_1024/data.jsonl RENAMED
File without changes
npk_long_context_1024_with_tags.jsonl → npk_long_context_1024_with_tags/data.jsonl RENAMED
File without changes
npk_long_context_8192.jsonl → npk_long_context_8192/data.jsonl RENAMED
File without changes
npk_long_context_8192_with_tags.jsonl → npk_long_context_8192_with_tags/data.jsonl RENAMED
File without changes
restructure.sh ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Move each JSONL into its split-named folder
4
+ for f in *.jsonl; do
5
+ split_name="${f%.jsonl}"
6
+ mkdir -p "$split_name"
7
+ mv "$f" "$split_name/data.jsonl"
8
+ done
9
+
10
+ # Create a new dataset_info.json
11
+ echo '{ "splits": {' > dataset_info.json
12
+ first=true
13
+ for d in */; do
14
+ split="${d%/}"
15
+ num_examples=$(wc -l < "$d/data.jsonl")
16
+ if [ "$first" = true ]; then
17
+ first=false
18
+ else
19
+ echo ',' >> dataset_info.json
20
+ fi
21
+ echo " \"$split\": { \"name\": \"$split\", \"num_examples\": $num_examples }" >> dataset_info.json
22
+ done
23
+ echo '}, "data_files": {' >> dataset_info.json
24
+ first=true
25
+ for d in */; do
26
+ split="${d%/}"
27
+ if [ "$first" = true ]; then
28
+ first=false
29
+ else
30
+ echo ',' >> dataset_info.json
31
+ fi
32
+ echo " \"$split\": \"$split/data.jsonl\"" >> dataset_info.json
33
+ done
34
+ echo '} }' >> dataset_info.json
35
+
36
+ echo "[✓] Restructuring complete."