manual URL with script
Browse files- url_script.py +22 -0
url_script.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
|
| 3 |
+
base_url = "https://huggingface.co/datasets/mehdie/sefaria/raw/main/data/"
|
| 4 |
+
local_data_dir = "data"
|
| 5 |
+
|
| 6 |
+
english_files = [f for f in os.listdir(local_data_dir) if f.endswith("_english.parquet")]
|
| 7 |
+
hebrew_files = [f for f in os.listdir(local_data_dir) if f.endswith("_hebrew.parquet")]
|
| 8 |
+
|
| 9 |
+
english_urls = [os.path.join(base_url, f) for f in english_files]
|
| 10 |
+
hebrew_urls = [os.path.join(base_url, f) for f in hebrew_files]
|
| 11 |
+
all_urls = english_urls + hebrew_urls
|
| 12 |
+
|
| 13 |
+
data_urls = {
|
| 14 |
+
"english": english_urls,
|
| 15 |
+
"hebrew": hebrew_urls,
|
| 16 |
+
"all": all_urls,
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
print("English URLs:", english_urls)
|
| 20 |
+
print("Hebrew URLs:", hebrew_urls)
|
| 21 |
+
print("All URLs:", all_urls)
|
| 22 |
+
|