system HF staff commited on
Commit
f6c7ebe
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

Files changed (5) hide show
  1. .gitattributes +27 -0
  2. README.md +140 -0
  3. dataset_infos.json +1 -0
  4. dummy/1.0.0/dummy_data.zip +3 -0
  5. tsac.py +114 -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,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - aeb
8
+ licenses:
9
+ - lgpl-3-0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 10K<n<100K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text-classification
18
+ task_ids:
19
+ - sentiment-classification
20
+ ---
21
+
22
+ # Dataset Card Creation Guide
23
+
24
+ ## Table of Contents
25
+ - [Dataset Description](#dataset-description)
26
+ - [Dataset Summary](#dataset-summary)
27
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
28
+ - [Languages](#languages)
29
+ - [Dataset Structure](#dataset-structure)
30
+ - [Data Instances](#data-instances)
31
+ - [Data Fields](#data-instances)
32
+ - [Data Splits](#data-instances)
33
+ - [Dataset Creation](#dataset-creation)
34
+ - [Curation Rationale](#curation-rationale)
35
+ - [Source Data](#source-data)
36
+ - [Annotations](#annotations)
37
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
38
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
39
+ - [Social Impact of Dataset](#social-impact-of-dataset)
40
+ - [Discussion of Biases](#discussion-of-biases)
41
+ - [Other Known Limitations](#other-known-limitations)
42
+ - [Additional Information](#additional-information)
43
+ - [Dataset Curators](#dataset-curators)
44
+ - [Licensing Information](#licensing-information)
45
+ - [Citation Information](#citation-information)
46
+
47
+ ## Dataset Description
48
+
49
+ - **Homepage:** None
50
+ - **Repository:** https://github.com/fbougares/TSAC
51
+ - **Paper:** https://www.aclweb.org/anthology/W17-1307
52
+ - **Leaderboard:** [If the dataset supports an active leaderboard, add link here]()
53
+ - **Point of Contact:** Salima Mdhaffar (firstname.lastname@univ-lemans.fr)
54
+
55
+ ### Dataset Summary
56
+
57
+ [More Information Needed]
58
+
59
+ ### Supported Tasks and Leaderboards
60
+
61
+ [More Information Needed]
62
+
63
+ ### Languages
64
+
65
+ [More Information Needed]
66
+
67
+ ## Dataset Structure
68
+
69
+ ### Data Instances
70
+
71
+ [More Information Needed]
72
+
73
+ ### Data Fields
74
+
75
+ [More Information Needed]
76
+
77
+ ### Data Splits
78
+
79
+ [More Information Needed]
80
+ ## Dataset Creation
81
+
82
+ ### Curation Rationale
83
+
84
+ [More Information Needed]
85
+
86
+ ### Source Data
87
+
88
+ [More Information Needed]
89
+
90
+ #### Initial Data Collection and Normalization
91
+
92
+ [More Information Needed]
93
+
94
+ #### Who are the source language producers?
95
+
96
+ [More Information Needed]
97
+
98
+ ### Annotations
99
+
100
+ [More Information Needed]
101
+
102
+ #### Annotation process
103
+
104
+ [More Information Needed]
105
+
106
+ #### Who are the annotators?
107
+
108
+ [More Information Needed]
109
+
110
+ ### Personal and Sensitive Information
111
+
112
+ [More Information Needed]
113
+
114
+ ## Considerations for Using the Data
115
+
116
+ ### Social Impact of Dataset
117
+
118
+ [More Information Needed]
119
+
120
+ ### Discussion of Biases
121
+
122
+ [More Information Needed]
123
+
124
+ ### Other Known Limitations
125
+
126
+ [More Information Needed]
127
+
128
+ ## Additional Information
129
+
130
+ ### Dataset Curators
131
+
132
+ [More Information Needed]
133
+
134
+ ### Licensing Information
135
+
136
+ [More Information Needed]
137
+
138
+ ### Citation Information
139
+
140
+ [More Information Needed]
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "Tunisian Sentiment Analysis Corpus.\n\nAbout 17k user comments manually annotated to positive and negative polarities. This corpus is collected from Facebook users comments written on official pages of Tunisian radios and TV channels namely Mosaique FM, JawhraFM, Shemes FM, HiwarElttounsi TV and Nessma TV. The corpus is collected from a period spanning January 2015 until June 2016.\n", "citation": "@inproceedings{medhaffar-etal-2017-sentiment,\n title = \"Sentiment Analysis of {T}unisian Dialects: Linguistic Ressources and Experiments\",\n author = \"Medhaffar, Salima and\n Bougares, Fethi and\n Est{\\`e}ve, Yannick and\n Hadrich-Belguith, Lamia\",\n booktitle = \"Proceedings of the Third {A}rabic Natural Language Processing Workshop\",\n month = apr,\n year = \"2017\",\n address = \"Valencia, Spain\",\n publisher = \"Association for Computational Linguistics\",\n url = \"https://www.aclweb.org/anthology/W17-1307\",\n doi = \"10.18653/v1/W17-1307\",\n pages = \"55--61\",\n abstract = \"Dialectal Arabic (DA) is significantly different from the Arabic language taught in schools and used in written communication and formal speech (broadcast news, religion, politics, etc.). There are many existing researches in the field of Arabic language Sentiment Analysis (SA); however, they are generally restricted to Modern Standard Arabic (MSA) or some dialects of economic or political interest. In this paper we are interested in the SA of the Tunisian Dialect. We utilize Machine Learning techniques to determine the polarity of comments written in Tunisian Dialect. First, we evaluate the SA systems performances with models trained using freely available MSA and Multi-dialectal data sets. We then collect and annotate a Tunisian Dialect corpus of 17.000 comments from Facebook. This corpus allows us a significant accuracy improvement compared to the best model trained on other Arabic dialects or MSA data. We believe that this first freely available corpus will be valuable to researchers working in the field of Tunisian Sentiment Analysis and similar areas.\",\n}\n", "homepage": "https://github.com/fbougares/TSAC", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "sentence": {"dtype": "string", "id": null, "_type": "Value"}, "target": {"num_classes": 2, "names": ["1", "-1"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "tsac", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1020146, "num_examples": 13669, "dataset_name": "tsac"}, "test": {"name": "test", "num_bytes": 268504, "num_examples": 3400, "dataset_name": "tsac"}}, "download_checksums": {"https://raw.githubusercontent.com/fbougares/TSAC/master/train_pos.txt": {"num_bytes": 323280, "checksum": "1ddedc6fce42e9d3e09a5892088700a1c9065dcd2f1739983babdf964fc21556"}, "https://raw.githubusercontent.com/fbougares/TSAC/master/train_neg.txt": {"num_bytes": 434702, "checksum": "4babaf50959d556ea879a471acc3f5c0b794c6e606f31da8002633ab8b199668"}, "https://raw.githubusercontent.com/fbougares/TSAC/master/test_pos.txt": {"num_bytes": 84007, "checksum": "36e64d31103fb770988337b0a3a71340ac2187c568d52e9eec139df4571b7eb1"}, "https://raw.githubusercontent.com/fbougares/TSAC/master/test_neg.txt": {"num_bytes": 121026, "checksum": "41e8e829d1b74196ba82c03171e793ac641dd3c936de6a662d9fa399d438a3c6"}}, "download_size": 963015, "post_processing_size": null, "dataset_size": 1288650, "size_in_bytes": 2251665}}
dummy/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a26266637c6be81b4ee6f4eb70de4c9b88cd8fd51240f68a87f7db327f5dc63
3
+ size 1389
tsac.py ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 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
+ import datasets
18
+
19
+
20
+ _DESCRIPTION = """\
21
+ Tunisian Sentiment Analysis Corpus.
22
+
23
+ About 17k user comments manually annotated to positive and negative polarities. This corpus is collected from Facebook users comments written on official pages of Tunisian radios and TV channels namely Mosaique FM, JawhraFM, Shemes FM, HiwarElttounsi TV and Nessma TV. The corpus is collected from a period spanning January 2015 until June 2016.
24
+ """
25
+ _HOMEPAGE_URL = "https://github.com/fbougares/TSAC"
26
+ _CITATION = """\
27
+ @inproceedings{medhaffar-etal-2017-sentiment,
28
+ title = "Sentiment Analysis of {T}unisian Dialects: Linguistic Ressources and Experiments",
29
+ author = "Medhaffar, Salima and
30
+ Bougares, Fethi and
31
+ Est{`e}ve, Yannick and
32
+ Hadrich-Belguith, Lamia",
33
+ booktitle = "Proceedings of the Third {A}rabic Natural Language Processing Workshop",
34
+ month = apr,
35
+ year = "2017",
36
+ address = "Valencia, Spain",
37
+ publisher = "Association for Computational Linguistics",
38
+ url = "https://www.aclweb.org/anthology/W17-1307",
39
+ doi = "10.18653/v1/W17-1307",
40
+ pages = "55--61",
41
+ abstract = "Dialectal Arabic (DA) is significantly different from the Arabic language taught in schools and used in written communication and formal speech (broadcast news, religion, politics, etc.). There are many existing researches in the field of Arabic language Sentiment Analysis (SA); however, they are generally restricted to Modern Standard Arabic (MSA) or some dialects of economic or political interest. In this paper we are interested in the SA of the Tunisian Dialect. We utilize Machine Learning techniques to determine the polarity of comments written in Tunisian Dialect. First, we evaluate the SA systems performances with models trained using freely available MSA and Multi-dialectal data sets. We then collect and annotate a Tunisian Dialect corpus of 17.000 comments from Facebook. This corpus allows us a significant accuracy improvement compared to the best model trained on other Arabic dialects or MSA data. We believe that this first freely available corpus will be valuable to researchers working in the field of Tunisian Sentiment Analysis and similar areas.",
42
+ }
43
+ """
44
+
45
+ _TRAIN_POS_URL = "https://raw.githubusercontent.com/fbougares/TSAC/master/train_pos.txt"
46
+ _TRAIN_NEG_URL = "https://raw.githubusercontent.com/fbougares/TSAC/master/train_neg.txt"
47
+ _TEST_POS_URL = "https://raw.githubusercontent.com/fbougares/TSAC/master/test_pos.txt"
48
+ _TEST_NEG_URL = "https://raw.githubusercontent.com/fbougares/TSAC/master/test_neg.txt"
49
+
50
+
51
+ class TSAC(datasets.GeneratorBasedBuilder):
52
+ VERSION = datasets.Version("1.0.0")
53
+
54
+ def _info(self):
55
+ return datasets.DatasetInfo(
56
+ description=_DESCRIPTION,
57
+ features=datasets.Features(
58
+ {
59
+ "id": datasets.Value("string"),
60
+ "sentence": datasets.Value("string"),
61
+ "target": datasets.ClassLabel(names=["1", "-1"]),
62
+ },
63
+ ),
64
+ supervised_keys=None,
65
+ homepage=_HOMEPAGE_URL,
66
+ citation=_CITATION,
67
+ )
68
+
69
+ def _split_generators(self, dl_manager):
70
+ train_pos_path = dl_manager.download_and_extract(_TRAIN_POS_URL)
71
+ train_neg_path = dl_manager.download_and_extract(_TRAIN_NEG_URL)
72
+ test_pos_path = dl_manager.download_and_extract(_TEST_POS_URL)
73
+ test_neg_path = dl_manager.download_and_extract(_TEST_NEG_URL)
74
+ return [
75
+ datasets.SplitGenerator(
76
+ name=datasets.Split.TRAIN,
77
+ gen_kwargs={"pospath": train_pos_path, "negpath": train_neg_path},
78
+ ),
79
+ datasets.SplitGenerator(
80
+ name=datasets.Split.TEST,
81
+ gen_kwargs={"pospath": test_pos_path, "negpath": test_neg_path},
82
+ ),
83
+ ]
84
+
85
+ def _generate_examples(self, pospath, negpath):
86
+ sentence_counter = 0
87
+
88
+ with open(pospath, encoding="utf-8") as f:
89
+ for row in f:
90
+ row = row.strip()
91
+ result = (
92
+ sentence_counter,
93
+ {
94
+ "id": str(sentence_counter),
95
+ "sentence": row,
96
+ "target": "1",
97
+ },
98
+ )
99
+ yield result
100
+ sentence_counter += 1
101
+
102
+ with open(negpath, encoding="utf-8") as f:
103
+ for row in f:
104
+ row = row.strip()
105
+ result = (
106
+ sentence_counter,
107
+ {
108
+ "id": str(sentence_counter),
109
+ "sentence": row,
110
+ "target": "-1",
111
+ },
112
+ )
113
+ yield result
114
+ sentence_counter += 1