Datasets:
kocoten1992
commited on
Commit
•
70fb3b6
1
Parent(s):
0069ec8
readme: add join training set instruction
Browse files
README.md
CHANGED
@@ -1,3 +1,21 @@
|
|
1 |
---
|
2 |
license: wtfpl
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: wtfpl
|
3 |
---
|
4 |
+
|
5 |
+
# To join all training set files together
|
6 |
+
Use this script https://stackoverflow.com/a/57422761, copied here for redundancy:
|
7 |
+
|
8 |
+
```python
|
9 |
+
files=['my.json','files.json',...,'name.json']
|
10 |
+
|
11 |
+
def merge_JsonFiles(filename):
|
12 |
+
result = list()
|
13 |
+
for f1 in filename:
|
14 |
+
with open(f1, 'r') as infile:
|
15 |
+
result.extend(json.load(infile))
|
16 |
+
|
17 |
+
with open('counseling3.json', 'w') as output_file:
|
18 |
+
json.dump(result, output_file)
|
19 |
+
|
20 |
+
merge_JsonFiles(files)
|
21 |
+
```
|