Updated loaction
Browse files
seth.py
CHANGED
@@ -93,18 +93,28 @@ class Seth(datasets.GeneratorBasedBuilder):
|
|
93 |
|
94 |
def _split_generators(self, dl_manager):
|
95 |
"""Returns SplitGenerators."""
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
"
|
100 |
-
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
|
103 |
return [
|
104 |
-
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath":
|
105 |
-
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath":
|
106 |
]
|
107 |
|
|
|
108 |
def _generate_examples(self, filepath):
|
109 |
logger.info("⏳ Generating examples from = %s", filepath)
|
110 |
with open(filepath, encoding="utf-8") as f:
|
|
|
93 |
|
94 |
def _split_generators(self, dl_manager):
|
95 |
"""Returns SplitGenerators."""
|
96 |
+
# Dateien herunterladen
|
97 |
+
downloaded_files = dl_manager.download({
|
98 |
+
"train": "https://raw.githubusercontent.com/Erechtheus/mutationCorpora/master/corpora/IOB/SETH-train.iob",
|
99 |
+
"test": "https://raw.githubusercontent.com/Erechtheus/mutationCorpora/master/corpora/IOB/SETH-test.iob",
|
100 |
+
})
|
101 |
+
|
102 |
+
# Logging, um die Dateipfade und Inhalte zu überprüfen
|
103 |
+
logger.info(f"Train file downloaded to: {downloaded_files['train']}")
|
104 |
+
logger.info(f"Test file downloaded to: {downloaded_files['test']}")
|
105 |
+
|
106 |
+
# Inhalte der Dateien anzeigen (optional)
|
107 |
+
with open(downloaded_files["train"], 'r') as train_file:
|
108 |
+
logger.info(f"First few lines of train file: {train_file.readlines()[:5]}")
|
109 |
+
with open(downloaded_files["test"], 'r') as test_file:
|
110 |
+
logger.info(f"First few lines of test file: {test_file.readlines()[:5]}")
|
111 |
|
112 |
return [
|
113 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
|
114 |
+
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"]}),
|
115 |
]
|
116 |
|
117 |
+
|
118 |
def _generate_examples(self, filepath):
|
119 |
logger.info("⏳ Generating examples from = %s", filepath)
|
120 |
with open(filepath, encoding="utf-8") as f:
|