Vadim Alperovich
commited on
Commit
·
e49aeea
1
Parent(s):
cec4908
Update toxic_comments.py
Browse files- toxic_comments.py +4 -6
toxic_comments.py
CHANGED
|
@@ -9,12 +9,10 @@ from datasets.tasks import TextClassification
|
|
| 9 |
import sys
|
| 10 |
csv.field_size_limit(sys.maxsize)
|
| 11 |
|
| 12 |
-
_DESCRIPTION = """
|
| 13 |
-
This data collection contains all the data used in our learning question classification experiments(see [1]), which has question class definitions, the training and testing question sets, examples of preprocessing the questions, feature definition scripts and examples of semantically related word features.
|
| 14 |
-
This work has been done by Xin Li and Dan Roth and supported by [2].
|
| 15 |
"""
|
| 16 |
|
| 17 |
-
_CITATION = """"""
|
| 18 |
|
| 19 |
_TRAIN_DOWNLOAD_URL = "https://huggingface.co/datasets/vmalperovich/toxic_comments/raw/main/train.csv"
|
| 20 |
_TEST_DOWNLOAD_URL = "https://huggingface.co/datasets/vmalperovich/toxic_comments/raw/main/test.csv"
|
|
@@ -24,7 +22,7 @@ _VALID_DOWNLOAD_URL = "https://huggingface.co/datasets/vmalperovich/toxic_commen
|
|
| 24 |
CATEGORY_MAPPING = ['neutral', 'toxic', 'severe_toxic', 'obscene', 'threat', 'insult', 'identity_hate']
|
| 25 |
|
| 26 |
class NG(datasets.GeneratorBasedBuilder):
|
| 27 |
-
"""
|
| 28 |
|
| 29 |
def _info(self):
|
| 30 |
return datasets.DatasetInfo(
|
|
@@ -37,7 +35,7 @@ class NG(datasets.GeneratorBasedBuilder):
|
|
| 37 |
),
|
| 38 |
homepage="",
|
| 39 |
citation=_CITATION,
|
| 40 |
-
task_templates=[TextClassification(text_column="text", label_column="label")],
|
| 41 |
)
|
| 42 |
|
| 43 |
def _split_generators(self, dl_manager):
|
|
|
|
| 9 |
import sys
|
| 10 |
csv.field_size_limit(sys.maxsize)
|
| 11 |
|
| 12 |
+
_DESCRIPTION = """
|
|
|
|
|
|
|
| 13 |
"""
|
| 14 |
|
| 15 |
+
_CITATION = """jigsaw_toxicity_pred"""
|
| 16 |
|
| 17 |
_TRAIN_DOWNLOAD_URL = "https://huggingface.co/datasets/vmalperovich/toxic_comments/raw/main/train.csv"
|
| 18 |
_TEST_DOWNLOAD_URL = "https://huggingface.co/datasets/vmalperovich/toxic_comments/raw/main/test.csv"
|
|
|
|
| 22 |
CATEGORY_MAPPING = ['neutral', 'toxic', 'severe_toxic', 'obscene', 'threat', 'insult', 'identity_hate']
|
| 23 |
|
| 24 |
class NG(datasets.GeneratorBasedBuilder):
|
| 25 |
+
"""toxic_comments classification dataset."""
|
| 26 |
|
| 27 |
def _info(self):
|
| 28 |
return datasets.DatasetInfo(
|
|
|
|
| 35 |
),
|
| 36 |
homepage="",
|
| 37 |
citation=_CITATION,
|
| 38 |
+
# task_templates=[TextClassification(text_column="text", label_column="label")],
|
| 39 |
)
|
| 40 |
|
| 41 |
def _split_generators(self, dl_manager):
|