Datasets:

Modalities:
Tabular
Text
Formats:
parquet
ArXiv:
Libraries:
Datasets
Dask
kwang2049 commited on
Commit
877381b
1 Parent(s): 49b6740

remove yaml

Browse files
Files changed (1) hide show
  1. create_yaml.py +0 -33
create_yaml.py DELETED
@@ -1,33 +0,0 @@
1
- import glob
2
- import os
3
-
4
-
5
- def read_folder(folder):
6
- folder_name = os.path.basename(folder)
7
-
8
- template = f"""- config_name: {folder_name}-corpus
9
- data_files:
10
- - split: train
11
- path: {folder_name}/corpus/*
12
- - config_name: {folder_name}-queries
13
- data_files:"""
14
-
15
- for filepath in glob.glob(f"{folder}/queries/*.parquet"):
16
- template += f"""
17
- - split: {os.path.basename(filepath).split('.')[0]}
18
- path: {filepath}"""
19
-
20
- template += f"""
21
- - config_name: {folder_name}-qrels
22
- data_files:"""
23
- for filepath in glob.glob(f"{folder}/qrels/*.parquet"):
24
- template += f"""
25
- - split: {os.path.basename(filepath).split('.')[0]}
26
- path: {filepath}"""
27
-
28
- return template
29
-
30
-
31
- for filepath in sorted(glob.glob("*")):
32
- if os.path.isdir(filepath):
33
- print(read_folder(filepath).strip())