p1atdev commited on
Commit
8b837b3
·
1 Parent(s): e7ea286

Upload open2ch.py

Browse files
Files changed (1) hide show
  1. open2ch.py +6 -3
open2ch.py CHANGED
@@ -132,9 +132,6 @@ def load_ng_words(filepath) -> list[str]:
132
 
133
 
134
  class Open2chDataset(ds.GeneratorBasedBuilder):
135
- OVER_SIZE_LIMIT = 6_000_000
136
- csv.field_size_limit(OVER_SIZE_LIMIT)
137
-
138
  VERSION = ds.Version("1.0.0")
139
 
140
  BUILDER_CONFIGS = [
@@ -187,6 +184,12 @@ class Open2chDataset(ds.GeneratorBasedBuilder):
187
 
188
  DEFAULT_CONFIG_NAME = "all-corpus"
189
 
 
 
 
 
 
 
190
  def _info(self):
191
  if self.config.name in ["all-corpus", "all-corpus-cleaned"]:
192
  features = ds.Features(
 
132
 
133
 
134
  class Open2chDataset(ds.GeneratorBasedBuilder):
 
 
 
135
  VERSION = ds.Version("1.0.0")
136
 
137
  BUILDER_CONFIGS = [
 
184
 
185
  DEFAULT_CONFIG_NAME = "all-corpus"
186
 
187
+ def __init__(self, *args, **kwargs):
188
+ super().__init__(*args, **kwargs)
189
+
190
+ OVER_SIZE_LIMIT = 6_000_000
191
+ csv.field_size_limit(OVER_SIZE_LIMIT)
192
+
193
  def _info(self):
194
  if self.config.name in ["all-corpus", "all-corpus-cleaned"]:
195
  features = ds.Features(