qanastek commited on
Commit
f7c1626
1 Parent(s): 00917e9
ANTILLES.py CHANGED
@@ -3,6 +3,7 @@
3
 
4
  """ANTILLES Corpus"""
5
 
 
6
  import datasets
7
  from tqdm import tqdm
8
 
@@ -86,6 +87,10 @@ Any use of the data should reference the above plus:
86
 
87
  _DESCRIPTION = "No description"
88
 
 
 
 
 
89
  class ANTILLES(datasets.GeneratorBasedBuilder):
90
  """ANTILLES dataset."""
91
 
@@ -119,29 +124,32 @@ class ANTILLES(datasets.GeneratorBasedBuilder):
119
 
120
  def _split_generators(self, dl_manager):
121
 
122
- TRAIN_PATH = 'ANTILLES/train.conllu'
123
- DEV_PATH = 'ANTILLES/dev.conllu'
124
- TEST_PATH = 'ANTILLES/test.conllu'
 
 
 
125
 
126
  return [
127
  datasets.SplitGenerator(
128
  name=datasets.Split.TRAIN,
129
  gen_kwargs={
130
- "filepath": TRAIN_PATH,
131
  "split": "train",
132
  }
133
  ),
134
  datasets.SplitGenerator(
135
  name=datasets.Split.VALIDATION,
136
  gen_kwargs={
137
- "filepath": DEV_PATH,
138
  "split": "dev",
139
  }
140
  ),
141
  datasets.SplitGenerator(
142
  name=datasets.Split.TEST,
143
  gen_kwargs={
144
- "filepath": TEST_PATH,
145
  "split": "test",
146
  }
147
  ),
 
3
 
4
  """ANTILLES Corpus"""
5
 
6
+ import os
7
  import datasets
8
  from tqdm import tqdm
9
 
 
87
 
88
  _DESCRIPTION = "No description"
89
 
90
+ _URLS = {
91
+ "ANTILLES": "https://huggingface.co/datasets/qanastek/ANTILLES/tree/main/data.zip"
92
+ }
93
+
94
  class ANTILLES(datasets.GeneratorBasedBuilder):
95
  """ANTILLES dataset."""
96
 
 
124
 
125
  def _split_generators(self, dl_manager):
126
 
127
+ urls = _URLS[self.config.name]
128
+ data_dir = dl_manager.download_and_extract(urls)
129
+
130
+ TRAIN_PATH = 'train.conllu'
131
+ DEV_PATH = 'dev.conllu'
132
+ TEST_PATH = 'test.conllu'
133
 
134
  return [
135
  datasets.SplitGenerator(
136
  name=datasets.Split.TRAIN,
137
  gen_kwargs={
138
+ "filepath": os.path.join(data_dir, TRAIN_PATH),
139
  "split": "train",
140
  }
141
  ),
142
  datasets.SplitGenerator(
143
  name=datasets.Split.VALIDATION,
144
  gen_kwargs={
145
+ "filepath": os.path.join(data_dir, DEV_PATH),
146
  "split": "dev",
147
  }
148
  ),
149
  datasets.SplitGenerator(
150
  name=datasets.Split.TEST,
151
  gen_kwargs={
152
+ "filepath": os.path.join(data_dir, TEST_PATH),
153
  "split": "test",
154
  }
155
  ),
data/dev.conllu → data.zip RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3403884962b6f21257649db1125fabea4dd2470ebd0d9ef8b05fd0d3a1cb5e4c
3
- size 2288108
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c94c4b0690a4dfdd853e63139af3cd7cd51204a5f1eca1c05f9340fd0e4a2c36
3
+ size 4623390
data/test.conllu DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:a1c61d80283738317f23eb101458ece80c7859e31b266792032417617e993501
3
- size 643327
 
 
 
 
data/train.conllu DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:a47f95165ee59a00b2940b249d6d61ac4905b1142335dd7c4317e25d7b26d26b
3
- size 22735989