maier-s commited on
Commit
b8ed1af
1 Parent(s): 21721eb

Updated loaction

Browse files
Files changed (1) hide show
  1. seth.py +18 -8
seth.py CHANGED
@@ -93,18 +93,28 @@ class Seth(datasets.GeneratorBasedBuilder):
93
 
94
  def _split_generators(self, dl_manager):
95
  """Returns SplitGenerators."""
96
- downloaded_file_train = dl_manager.download("https://raw.githubusercontent.com/Erechtheus/mutationCorpora/master/corpora/IOB/SETH-train.iob")
97
- downloaded_file_test = dl_manager.download("https://raw.githubusercontent.com/Erechtheus/mutationCorpora/master/corpora/IOB/SETH-test.iob")
98
- data_files = {
99
- "train": "./SETH-train.iob",
100
- "test": "./SETH-test.iob",
101
- }
 
 
 
 
 
 
 
 
 
102
 
103
  return [
104
- datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_file_train}),
105
- datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_file_test}),
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: