system HF staff commited on
Commit
2f93a00
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.0

.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ - found
5
+ language_creators:
6
+ - crowdsourced
7
+ - found
8
+ languages:
9
+ - en
10
+ licenses:
11
+ - unknown
12
+ multilinguality:
13
+ - monolingual
14
+ size_categories:
15
+ - 1K<n<10K
16
+ source_datasets:
17
+ - extended|other-nus-sms-corpus
18
+ task_categories:
19
+ - text-classification
20
+ task_ids:
21
+ - intent-classification
22
+ ---
23
+
24
+ # Dataset Card for [Dataset Name]
25
+
26
+ ## Table of Contents
27
+ - [Dataset Description](#dataset-description)
28
+ - [Dataset Summary](#dataset-summary)
29
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
30
+ - [Languages](#languages)
31
+ - [Dataset Structure](#dataset-structure)
32
+ - [Data Instances](#data-instances)
33
+ - [Data Fields](#data-instances)
34
+ - [Data Splits](#data-instances)
35
+ - [Dataset Creation](#dataset-creation)
36
+ - [Curation Rationale](#curation-rationale)
37
+ - [Source Data](#source-data)
38
+ - [Annotations](#annotations)
39
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
40
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
41
+ - [Social Impact of Dataset](#social-impact-of-dataset)
42
+ - [Discussion of Biases](#discussion-of-biases)
43
+ - [Other Known Limitations](#other-known-limitations)
44
+ - [Additional Information](#additional-information)
45
+ - [Dataset Curators](#dataset-curators)
46
+ - [Licensing Information](#licensing-information)
47
+ - [Citation Information](#citation-information)
48
+
49
+ ## Dataset Description
50
+
51
+ - **Homepage:** http://archive.ics.uci.edu/ml/datasets/SMS+Spam+Collection
52
+ - **Repository:**
53
+ - **Paper:** Almeida, T.A., Gomez Hidalgo, J.M., Yamakami, A. Contributions to the study of SMS Spam Filtering: New Collection and Results. Proceedings of the 2011 ACM Symposium on Document Engineering (ACM DOCENG'11), Mountain View, CA, USA, 2011.
54
+ - **Leaderboard:**
55
+ - **Point of Contact:**
56
+
57
+ ### Dataset Summary
58
+
59
+ The SMS Spam Collection v.1 is a public set of SMS labeled messages that have been collected for mobile phone spam research.
60
+ It has one collection composed by 5,574 English, real and non-enconded messages, tagged according being legitimate (ham) or spam.
61
+
62
+ ### Supported Tasks and Leaderboards
63
+
64
+ [More Information Needed]
65
+
66
+ ### Languages
67
+
68
+ English
69
+
70
+ ## Dataset Structure
71
+
72
+ ### Data Instances
73
+
74
+ [More Information Needed]
75
+
76
+ ### Data Fields
77
+
78
+ - sms: the sms message
79
+ - label: indicating if the sms message is ham or spam, ham means it is not spam
80
+
81
+ ### Data Splits
82
+
83
+ [More Information Needed]
84
+
85
+ ## Dataset Creation
86
+
87
+ ### Curation Rationale
88
+
89
+ [More Information Needed]
90
+
91
+ ### Source Data
92
+
93
+ #### Initial Data Collection and Normalization
94
+
95
+ [More Information Needed]
96
+
97
+ #### Who are the source language producers?
98
+
99
+ [More Information Needed]
100
+
101
+ ### Annotations
102
+
103
+ #### Annotation process
104
+
105
+ [More Information Needed]
106
+
107
+ #### Who are the annotators?
108
+
109
+ [More Information Needed]
110
+
111
+ ### Personal and Sensitive Information
112
+
113
+ [More Information Needed]
114
+
115
+ ## Considerations for Using the Data
116
+
117
+ ### Social Impact of Dataset
118
+
119
+ [More Information Needed]
120
+
121
+ ### Discussion of Biases
122
+
123
+ [More Information Needed]
124
+
125
+ ### Other Known Limitations
126
+
127
+ [More Information Needed]
128
+
129
+ ## Additional Information
130
+
131
+ ### Dataset Curators
132
+
133
+ [More Information Needed]
134
+
135
+ ### Licensing Information
136
+
137
+ [More Information Needed]
138
+
139
+ ### Citation Information
140
+
141
+ @inproceedings{Almeida2011SpamFiltering,
142
+ title={Contributions to the Study of SMS Spam Filtering: New Collection and Results},
143
+ author={Tiago A. Almeida and Jose Maria Gomez Hidalgo and Akebo Yamakami},
144
+ year={2011},
145
+ booktitle = "Proceedings of the 2011 ACM Symposium on Document Engineering (DOCENG'11)",
146
+ }
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"plain_text": {"description": "The SMS Spam Collection v.1 is a public set of SMS labeled messages that have been collected for mobile phone spam research. \nIt has one collection composed by 5,574 English, real and non-enconded messages, tagged according being legitimate (ham) or spam.\n", "citation": "@inproceedings{Almeida2011SpamFiltering,\n title={Contributions to the Study of SMS Spam Filtering: New Collection and Results},\n author={Tiago A. Almeida and Jose Maria Gomez Hidalgo and Akebo Yamakami},\n year={2011},\n booktitle = \"Proceedings of the 2011 ACM Symposium on Document Engineering (DOCENG'11)\",\n}\n", "homepage": "http://archive.ics.uci.edu/ml/datasets/SMS+Spam+Collection", "license": "", "features": {"sms": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": ["ham", "spam"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "sms_spam", "config_name": "plain_text", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 521756, "num_examples": 5574, "dataset_name": "sms_spam"}}, "download_checksums": {"http://archive.ics.uci.edu/ml/machine-learning-databases/00228/smsspamcollection.zip": {"num_bytes": 203415, "checksum": "1587ea43e58e82b14ff1f5425c88e17f8496bfcdb67a583dbff9eefaf9963ce3"}}, "download_size": 203415, "post_processing_size": null, "dataset_size": 521756, "size_in_bytes": 725171}}
dummy/plain_text/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:105b0e273e0da2af4b3dd786241ae4eb12bf36d1c41f67f7f82dd41e305ff77a
3
+ size 733
sms_spam.py ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ # Lint as: python3
17
+ """SMS Spam Collection Data Set"""
18
+
19
+ from __future__ import absolute_import, division, print_function
20
+
21
+ import os
22
+
23
+ import datasets
24
+
25
+
26
+ _CITATION = """\
27
+ @inproceedings{Almeida2011SpamFiltering,
28
+ title={Contributions to the Study of SMS Spam Filtering: New Collection and Results},
29
+ author={Tiago A. Almeida and Jose Maria Gomez Hidalgo and Akebo Yamakami},
30
+ year={2011},
31
+ booktitle = "Proceedings of the 2011 ACM Symposium on Document Engineering (DOCENG'11)",
32
+ }
33
+ """
34
+
35
+ _DESCRIPTION = """\
36
+ The SMS Spam Collection v.1 is a public set of SMS labeled messages that have been collected for mobile phone spam research.
37
+ It has one collection composed by 5,574 English, real and non-enconded messages, tagged according being legitimate (ham) or spam.
38
+ """
39
+
40
+ _DATA_URL = "http://archive.ics.uci.edu/ml/machine-learning-databases/00228/smsspamcollection.zip"
41
+
42
+
43
+ class SmsSpam(datasets.GeneratorBasedBuilder):
44
+ """SMS Spam Collection Data Set"""
45
+
46
+ BUILDER_CONFIGS = [
47
+ datasets.BuilderConfig(
48
+ name="plain_text",
49
+ version=datasets.Version("1.0.0", ""),
50
+ description="Plain text import of SMS Spam Collection Data Set",
51
+ )
52
+ ]
53
+
54
+ def _info(self):
55
+ return datasets.DatasetInfo(
56
+ description=_DESCRIPTION,
57
+ features=datasets.Features(
58
+ {
59
+ "sms": datasets.Value("string"),
60
+ "label": datasets.features.ClassLabel(names=["ham", "spam"]),
61
+ }
62
+ ),
63
+ supervised_keys=("sms", "label"),
64
+ homepage="http://archive.ics.uci.edu/ml/datasets/SMS+Spam+Collection",
65
+ citation=_CITATION,
66
+ )
67
+
68
+ def _split_generators(self, dl_manager):
69
+ dl_dir = dl_manager.download_and_extract(_DATA_URL)
70
+ return [
71
+ datasets.SplitGenerator(
72
+ name=datasets.Split.TRAIN, gen_kwargs={"filepath": os.path.join(dl_dir, "SMSSpamCollection")}
73
+ ),
74
+ ]
75
+
76
+ def _generate_examples(self, filepath):
77
+ """This function returns the examples in the raw (text) form."""
78
+
79
+ with open(filepath, encoding="utf-8") as sms_file:
80
+ for idx, line in enumerate(sms_file):
81
+ fields = line.split("\t")
82
+
83
+ if fields[0] == "ham":
84
+ label = 0
85
+ else:
86
+ label = 1
87
+
88
+ yield idx, {
89
+ "sms": fields[1],
90
+ "label": label,
91
+ }