system HF staff commited on
Commit
b32e422
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,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - crowdsourced
6
+ languages:
7
+ - ur
8
+ licenses:
9
+ - unknown
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 1K<n<10K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text-classification
18
+ task_ids:
19
+ - sentiment-classification
20
+ ---
21
+
22
+ # Dataset Card for Urdu Sentiment Corpus (USC)
23
+
24
+ ## Table of Contents
25
+
26
+ - [Dataset Description](#dataset-description)
27
+ - [Dataset Summary](#dataset-summary)
28
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
29
+ - [Languages](#languages)
30
+ - [Dataset Structure](#dataset-structure)
31
+ - [Data Instances](#data-instances)
32
+ - [Data Fields](#data-instances)
33
+ - [Data Splits](#data-instances)
34
+ - [Dataset Creation](#dataset-creation)
35
+ - [Curation Rationale](#curation-rationale)
36
+ - [Source Data](#source-data)
37
+ - [Annotations](#annotations)
38
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
39
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
40
+ - [Social Impact of Dataset](#social-impact-of-dataset)
41
+ - [Discussion of Biases](#discussion-of-biases)
42
+ - [Other Known Limitations](#other-known-limitations)
43
+ - [Additional Information](#additional-information)
44
+ - [Dataset Curators](#dataset-curators)
45
+ - [Licensing Information](#licensing-information)
46
+ - [Citation Information](#citation-information)
47
+
48
+ ## Dataset Description
49
+
50
+ - **Homepage:** [Github](https://github.com/MuhammadYaseenKhan/Urdu-Sentiment-Corpus)
51
+ - **Repository:** [Github](https://github.com/MuhammadYaseenKhan/Urdu-Sentiment-Corpus)
52
+ - **Paper:** [IEEE](https://ieeexplore.ieee.org/abstract/document/9080043)
53
+ - **Leaderboard:**
54
+ - **Point of Contact:** [Muhammad Yaseen Khan](https://github.com/MuhammadYaseenKhan)
55
+
56
+ ### Dataset Summary
57
+
58
+ [More Information Needed]
59
+
60
+ ### Supported Tasks and Leaderboards
61
+
62
+ [More Information Needed]
63
+
64
+ ### Languages
65
+
66
+ [More Information Needed]
67
+
68
+ ## Dataset Structure
69
+
70
+ ### Data Instances
71
+
72
+ [More Information Needed]
73
+
74
+ ### Data Fields
75
+
76
+ - sentences: The Urdu tweet
77
+ - sentiment: The sentiment that was exhibited in the tweet, which can be Positive(P) or Negative(N) or Objective(O).
78
+
79
+ ### Data Splits
80
+
81
+ [More Information Needed]
82
+
83
+ ## Dataset Creation
84
+
85
+ ### Curation Rationale
86
+
87
+ [More Information Needed]
88
+
89
+ ### Source Data
90
+
91
+ #### Initial Data Collection and Normalization
92
+
93
+ [More Information Needed]
94
+
95
+ #### Who are the source language producers?
96
+
97
+ [More Information Needed]
98
+
99
+ ### Annotations
100
+
101
+ #### Annotation process
102
+
103
+ [More Information Needed]
104
+
105
+ #### Who are the annotators?
106
+
107
+ [More Information Needed]
108
+
109
+ ### Personal and Sensitive Information
110
+
111
+ [More Information Needed]
112
+
113
+ ## Considerations for Using the Data
114
+
115
+ ### Social Impact of Dataset
116
+
117
+ [More Information Needed]
118
+
119
+ ### Discussion of Biases
120
+
121
+ [More Information Needed]
122
+
123
+ ### Other Known Limitations
124
+
125
+ [More Information Needed]
126
+
127
+ ## Additional Information
128
+
129
+ ### Dataset Curators
130
+
131
+ [More Information Needed]
132
+
133
+ ### Licensing Information
134
+
135
+ [More Information Needed]
136
+
137
+ ### Citation Information
138
+
139
+ [More Information Needed]
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "\n\u201cUrdu Sentiment Corpus\u201d (USC) shares the dat of Urdu tweets for the sentiment analysis and polarity detection.\nThe dataset is consisting of tweets and overall, the dataset is comprising over 17, 185 tokens\nwith 52% records as positive, and 48 % records as negative.\n", "citation": "\n@inproceedings{khan2020usc,\n title={Urdu Sentiment Corpus (v1.0): Linguistic Exploration and Visualization of Labeled Datasetfor Urdu Sentiment Analysis.},\n author={Khan, Muhammad Yaseen and Nizami, Muhammad Suffian},\n booktitle={2020 IEEE 2nd International Conference On Information Science & Communication Technology (ICISCT)},\n pages={},\n year={2020},\n organization={IEEE}\n}\n", "homepage": "https://github.com/MuhammadYaseenKhan/Urdu-Sentiment-Corpus", "license": "", "features": {"sentence": {"dtype": "string", "id": null, "_type": "Value"}, "sentiment": {"num_classes": 3, "names": ["P", "N", "O"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "urdu_sentiment_corpus", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 161190, "num_examples": 1000, "dataset_name": "urdu_sentiment_corpus"}}, "download_checksums": {"https://github.com/MuhammadYaseenKhan/Urdu-Sentiment-Corpus/archive/master.zip": {"num_bytes": 51583, "checksum": "793561fd1cd4931024f551c0ea4a09d159064c2536f36ac5fec225178ba6a9b2"}}, "download_size": 51583, "post_processing_size": null, "dataset_size": 161190, "size_in_bytes": 212773}}
dummy/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9883d4e412bb5479d6b723e3effb0a2d82b5b4ba6cb870c39e8080d74bdb90ee
3
+ size 972
urdu_sentiment_corpus.py ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Urdu Sentiment Corpus"""
2
+
3
+ from __future__ import absolute_import, division, print_function
4
+
5
+ import os
6
+
7
+ import datasets
8
+
9
+
10
+ _CITATION = """
11
+ @inproceedings{khan2020usc,
12
+ title={Urdu Sentiment Corpus (v1.0): Linguistic Exploration and Visualization of Labeled Datasetfor Urdu Sentiment Analysis.},
13
+ author={Khan, Muhammad Yaseen and Nizami, Muhammad Suffian},
14
+ booktitle={2020 IEEE 2nd International Conference On Information Science & Communication Technology (ICISCT)},
15
+ pages={},
16
+ year={2020},
17
+ organization={IEEE}
18
+ }
19
+ """
20
+
21
+ _DESCRIPTION = """
22
+ “Urdu Sentiment Corpus” (USC) shares the dat of Urdu tweets for the sentiment analysis and polarity detection.
23
+ The dataset is consisting of tweets and overall, the dataset is comprising over 17, 185 tokens
24
+ with 52% records as positive, and 48 % records as negative.
25
+ """
26
+
27
+ _URL = "https://github.com/MuhammadYaseenKhan/Urdu-Sentiment-Corpus/archive/master.zip"
28
+
29
+
30
+ class UrduSentimentCorpus(datasets.GeneratorBasedBuilder):
31
+ VERSION = datasets.Version("1.0.0")
32
+
33
+ labels_dic = {
34
+ "P": 0,
35
+ "N": 1,
36
+ "O": 2,
37
+ }
38
+
39
+ def _info(self):
40
+ return datasets.DatasetInfo(
41
+ description=_DESCRIPTION,
42
+ features=datasets.Features(
43
+ {
44
+ "sentence": datasets.Value("string"),
45
+ "sentiment": datasets.ClassLabel(names=list(self.labels_dic.keys())),
46
+ }
47
+ ),
48
+ homepage="https://github.com/MuhammadYaseenKhan/Urdu-Sentiment-Corpus",
49
+ citation=_CITATION,
50
+ )
51
+
52
+ def _split_generators(self, dl_manager):
53
+ """Returns SplitGenerators."""
54
+ dl_path = dl_manager.download_and_extract(_URL)
55
+ dl_dir = os.path.join(dl_path, "Urdu-Sentiment-Corpus-master", "urdu-sentiment-corpus-v1.tsv")
56
+
57
+ # This dataset has no train test split
58
+ return [
59
+ datasets.SplitGenerator(
60
+ name=datasets.Split.TRAIN,
61
+ gen_kwargs={"filepath": os.path.join(dl_dir)},
62
+ ),
63
+ ]
64
+
65
+ def _generate_examples(self, filepath=None):
66
+ """Yields examples."""
67
+ with open(filepath, encoding="utf-8") as f:
68
+ next(f)
69
+ for id_, row in enumerate(f):
70
+ row = row.strip().split("\t")
71
+ if len(row) != 2:
72
+ continue
73
+ row[1] = self.labels_dic[row[1]]
74
+
75
+ yield id_, {"sentence": row[0][::-1], "sentiment": row[1]}