Datasets:

Modalities:
Tabular
Text
Formats:
parquet
ArXiv:
Libraries:
Datasets
Dask
kwang2049 commited on
Commit
56a8867
1 Parent(s): 90bd12d
Files changed (1) hide show
  1. create_yaml.py +5 -6
create_yaml.py CHANGED
@@ -1,6 +1,7 @@
1
  import glob
2
  import os
3
 
 
4
  def read_folder(folder):
5
  folder_name = os.path.basename(folder)
6
 
@@ -10,9 +11,9 @@ def read_folder(folder):
10
  path: {folder_name}/corpus/*
11
  - config_name: {folder_name}-queries
12
  data_files:"""
13
-
14
  for filepath in glob.glob(f"{folder}/queries/*.parquet"):
15
- template += f"""
16
  - split: {os.path.basename(filepath).split('.')[0]}
17
  path: {filepath}"""
18
 
@@ -20,13 +21,11 @@ def read_folder(folder):
20
  - config_name: {folder_name}-qrels
21
  data_files:"""
22
  for filepath in glob.glob(f"{folder}/qrels/*.parquet"):
23
- template += f"""
24
  - split: {os.path.basename(filepath).split('.')[0]}
25
  path: {filepath}"""
26
-
27
- return template
28
-
29
 
 
30
 
31
 
32
  for filepath in sorted(glob.glob("*")):
 
1
  import glob
2
  import os
3
 
4
+
5
  def read_folder(folder):
6
  folder_name = os.path.basename(folder)
7
 
 
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
 
 
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("*")):