gsarti commited on
Commit
dc27a26
1 Parent(s): 5e078e2

Fixed data

Browse files
Files changed (2) hide show
  1. ik_nlp_22_slp.py +3 -5
  2. slp3ed.tsv +0 -0
ik_nlp_22_slp.py CHANGED
@@ -27,6 +27,8 @@ _HOMEPAGE = "https://www.rug.nl/masters/information-science/?lang=en"
27
 
28
  _LICENSE = "See https://web.stanford.edu/~jurafsky/slp3/"
29
 
 
 
30
 
31
  class IkNlp22SlpConfig(datasets.BuilderConfig):
32
  """BuilderConfig for ItaCoLA."""
@@ -34,18 +36,15 @@ class IkNlp22SlpConfig(datasets.BuilderConfig):
34
  def __init__(
35
  self,
36
  features,
37
- data_url,
38
  **kwargs,
39
  ):
40
  """
41
  Args:
42
  features: `list[string]`, list of the features that will appear in the
43
  feature dict. Should not include "label".
44
- data_url: `string`, url to download the zip file from.
45
  **kwargs: keyword arguments forwarded to super.
46
  """
47
  super().__init__(version=datasets.Version("1.0.0"), **kwargs)
48
- self.data_url = data_url
49
  self.features = features
50
 
51
 
@@ -56,7 +55,6 @@ class IkNlp22Slp(datasets.GeneratorBasedBuilder):
56
  IkNlp22SlpConfig(
57
  name="paragraphs",
58
  features=["n_chapter", "chapter", "n_section", "section", "n_subsection", "subsection", "text"],
59
- data_url="https://huggingface.co/datasets/GroNLP/ik-nlp-22_slp/resolve/main/slp3ed.tsv"
60
  ),
61
  ]
62
 
@@ -73,7 +71,7 @@ class IkNlp22Slp(datasets.GeneratorBasedBuilder):
73
 
74
  def _split_generators(self, dl_manager):
75
  """Returns SplitGenerators."""
76
- data_file = dl_manager.download_and_extract(self.config.data_url)
77
  return [
78
  datasets.SplitGenerator(
79
  name=datasets.Split.TRAIN,
 
27
 
28
  _LICENSE = "See https://web.stanford.edu/~jurafsky/slp3/"
29
 
30
+ _PARAGRAPHS_URL = "https://huggingface.co/datasets/GroNLP/ik-nlp-22_slp/raw/main/slp3ed.tsv"
31
+
32
 
33
  class IkNlp22SlpConfig(datasets.BuilderConfig):
34
  """BuilderConfig for ItaCoLA."""
 
36
  def __init__(
37
  self,
38
  features,
 
39
  **kwargs,
40
  ):
41
  """
42
  Args:
43
  features: `list[string]`, list of the features that will appear in the
44
  feature dict. Should not include "label".
 
45
  **kwargs: keyword arguments forwarded to super.
46
  """
47
  super().__init__(version=datasets.Version("1.0.0"), **kwargs)
 
48
  self.features = features
49
 
50
 
 
55
  IkNlp22SlpConfig(
56
  name="paragraphs",
57
  features=["n_chapter", "chapter", "n_section", "section", "n_subsection", "subsection", "text"],
 
58
  ),
59
  ]
60
 
 
71
 
72
  def _split_generators(self, dl_manager):
73
  """Returns SplitGenerators."""
74
+ data_file = dl_manager.download_and_extract(_PARAGRAPHS_URL)
75
  return [
76
  datasets.SplitGenerator(
77
  name=datasets.Split.TRAIN,
slp3ed.tsv CHANGED
The diff for this file is too large to render. See raw diff