Datasets:

Languages:
Kannada
Multilinguality:
monolingual
Size Categories:
1K<n<10K
Language Creators:
other
Annotations Creators:
other
Source Datasets:
original
License:
system HF staff commited on
Commit
a799cc2
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 +157 -0
  3. dataset_infos.json +1 -0
  4. dummy/1.0.0/dummy_data.zip +3 -0
  5. kannada_news.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,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - other
4
+ language_creators:
5
+ - other
6
+ languages:
7
+ - kn
8
+ licenses:
9
+ - cc-by-sa-4-0
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
+ - topic-classification
20
+ ---
21
+
22
+ # Dataset Card for kannada_news dataset
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:** [Kaggle link](https://www.kaggle.com/disisbig/kannada-news-dataset) for kannada news headlines dataset
50
+ - **Repository:**
51
+ - **Paper:**
52
+ - **Leaderboard:**
53
+ - **Point of Contact:** More information about the dataset and the models can be found [here](https://github.com/goru001/nlp-for-kannada)
54
+
55
+ ### Dataset Summary
56
+
57
+ The Kannada news dataset contains only the headlines of news article in three categories:
58
+ Entertainment, Tech, and Sports.
59
+
60
+ The data set contains around 6300 news article headlines which are collected from Kannada news websites.
61
+ The data set has been cleaned and contains train and test set using which can be used to benchmark topic classification models in Kannada.
62
+
63
+ ### Supported Tasks and Leaderboards
64
+
65
+ [More Information Needed]
66
+
67
+ ### Languages
68
+
69
+ Kannada (kn)
70
+
71
+ ## Dataset Structure
72
+
73
+ ### Data Instances
74
+
75
+ The data has two files. A train.csv and valid.csv. An example row of the dataset is as below:
76
+
77
+ ```
78
+ {
79
+ 'headline': 'ಫಿಫಾ ವಿಶ್ವಕಪ್ ಫೈನಲ್: ಅತಿರೇಕಕ್ಕೇರಿದ ಸಂಭ್ರಮಾಚರಣೆ; ಅಭಿಮಾನಿಗಳ ಹುಚ್ಚು ವರ್ತನೆಗೆ ವ್ಯಾಪಕ ಖಂಡನೆ',
80
+ 'label':'sports'
81
+ }
82
+ ```
83
+ NOTE: The data has very few examples on the technology (class label: 'tech') topic. [More Information Needed]
84
+
85
+ ### Data Fields
86
+
87
+ Data has two fields:
88
+ - headline: text headline in kannada (string)
89
+ - label : corresponding class label which the headlines pertains to in english (string)
90
+
91
+ ### Data Splits
92
+
93
+ The dataset is divided into two splits. All the headlines are scraped from news websites on the internet.
94
+ | | Tain | Valid |
95
+ | ----- | ------ | ----- |
96
+ | Input Sentences | 5167 | 1293 |
97
+
98
+ ## Dataset Creation
99
+
100
+ ### Curation Rationale
101
+
102
+ [More Information Needed]
103
+
104
+ ### Source Data
105
+
106
+ #### Initial Data Collection and Normalization
107
+
108
+ [More Information Needed]
109
+
110
+ #### Who are the source language producers?
111
+
112
+ [More Information Needed]
113
+
114
+ ### Annotations
115
+
116
+ #### Annotation process
117
+
118
+ [More Information Needed]
119
+
120
+ #### Who are the annotators?
121
+
122
+ [More Information Needed]
123
+
124
+ ### Personal and Sensitive Information
125
+
126
+ [More Information Needed]
127
+
128
+ ## Considerations for Using the Data
129
+
130
+ ### Social Impact of Dataset
131
+
132
+ There are starkingly less amount of data for South Indian languages, especially Kannada, available in digital format which can be used for NLP purposes.
133
+ Though having roughly 38 million native speakers, it is a little under-represented language and will benefit from active contribution from the community.
134
+
135
+ This dataset, however, can just help people get exposed to Kannada and help proceed further active participation for enabling continuous progress and development.
136
+
137
+ ### Discussion of Biases
138
+
139
+ [More Information Needed]
140
+
141
+ ### Other Known Limitations
142
+
143
+ [More Information Needed]
144
+
145
+ ## Additional Information
146
+
147
+ ### Dataset Curators
148
+
149
+ [Gaurav Arora] (https://github.com/goru001/nlp-for-kannada). Has also got some starter models an embeddings to help get started.
150
+
151
+ ### Licensing Information
152
+
153
+ cc-by-sa-4.0
154
+
155
+ ### Citation Information
156
+
157
+ [More Information Needed]
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"default": {"description": "The Kannada news dataset contains only the headlines of news article in three categories:\nEntertainment, Tech, and Sports.\n\nThe data set contains around 6300 news article headlines which collected from Kannada news websites.\nThe data set has been cleaned and contains train and test set using which can be used to benchmark\nclassification models in Kannada.\n", "citation": "", "homepage": "", "license": "CC BY-SA 4.0", "features": {"headline": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 3, "names": ["sports", "tech", "entertainment"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "kannada_news", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 969216, "num_examples": 5167, "dataset_name": "kannada_news"}, "validation": {"name": "validation", "num_bytes": 236817, "num_examples": 1293, "dataset_name": "kannada_news"}}, "download_checksums": {}, "download_size": 0, "post_processing_size": null, "dataset_size": 1206033, "size_in_bytes": 1206033}}
dummy/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6948588924c81b0bf33249960bb06e8b7a1767cefc9ca72092cd006e95b35a9a
3
+ size 1952
kannada_news.py ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
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
+ from __future__ import absolute_import, division, print_function
17
+
18
+ import csv
19
+ import os
20
+
21
+ import datasets
22
+
23
+
24
+ # no BibTeX citation
25
+ _CITATION = ""
26
+
27
+ _DESCRIPTION = """\
28
+ The Kannada news dataset contains only the headlines of news article in three categories:
29
+ Entertainment, Tech, and Sports.
30
+
31
+ The data set contains around 6300 news article headlines which collected from Kannada news websites.
32
+ The data set has been cleaned and contains train and test set using which can be used to benchmark
33
+ classification models in Kannada.
34
+ """
35
+
36
+ _LICENSE = "CC BY-SA 4.0"
37
+ _TRAIN_FILENAME = "train.csv"
38
+ _VALID_FILENAME = "valid.csv"
39
+
40
+
41
+ class KannadaNews(datasets.GeneratorBasedBuilder):
42
+ VERSION = datasets.Version("1.0.0")
43
+
44
+ @property
45
+ def manual_download_instructions(self):
46
+ return """\
47
+ \n You need to go to https://www.kaggle.com/disisbig/kannada-news-dataset,
48
+ and manually download the dataset from Kaggle. Once it is completed,
49
+ a folder named archive.zip will appear in your Downloads folder(
50
+ or whichever folder your browser chooses to save files to). Unzip the folder to obtain
51
+ a folder named "archive" having train.csv and valid.csv.
52
+
53
+ You can then specify the path to this folder for the data_dir argument in the
54
+ datasets.load_dataset(...) option.
55
+
56
+ The <path/to/folder> can e.g. be "/Downloads/archive".
57
+ The data can then be loaded using the following command `datasets.load_dataset("kannada_news", data_dir="/Downloads/archive")`.
58
+ """
59
+
60
+ def _info(self):
61
+ class_names = ["sports", "tech", "entertainment"]
62
+ features = datasets.Features(
63
+ {
64
+ "headline": datasets.Value("string"),
65
+ "label": datasets.ClassLabel(names=class_names),
66
+ }
67
+ )
68
+ return datasets.DatasetInfo(
69
+ description=_DESCRIPTION,
70
+ features=features,
71
+ supervised_keys=None,
72
+ homepage="",
73
+ license=_LICENSE,
74
+ citation=_CITATION,
75
+ )
76
+
77
+ def _split_generators(self, dl_manager):
78
+ """Returns SplitGenerators."""
79
+ path_to_manual_file = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
80
+
81
+ if not os.path.exists(path_to_manual_file):
82
+ raise FileNotFoundError(
83
+ "{} does not exist. Make sure you insert a manual dir via `datasets.load_dataset('kannada_news', data_dir=...)` that includes a file name {}. Manual download instructions: {})".format(
84
+ path_to_manual_file, _TRAIN_FILENAME, self.manual_download_instructions
85
+ )
86
+ )
87
+ return [
88
+ datasets.SplitGenerator(
89
+ name=datasets.Split.TRAIN,
90
+ # These kwargs will be passed to _generate_examples
91
+ gen_kwargs={
92
+ "filepath": os.path.join(path_to_manual_file, _TRAIN_FILENAME),
93
+ },
94
+ ),
95
+ datasets.SplitGenerator(
96
+ name=datasets.Split.VALIDATION,
97
+ # These kwargs will be passed to _generate_examples
98
+ gen_kwargs={
99
+ "filepath": os.path.join(path_to_manual_file, _VALID_FILENAME),
100
+ },
101
+ ),
102
+ ]
103
+
104
+ def _generate_examples(self, filepath):
105
+ with open(filepath, encoding="utf-8") as f:
106
+ rdr = csv.reader(f, delimiter=",")
107
+ next(rdr)
108
+ rownum = 0
109
+ for row in rdr:
110
+ rownum += 1
111
+ yield rownum, {
112
+ "headline": row[0],
113
+ "label": row[1],
114
+ }