system HF staff commited on
Commit
60e7f30
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,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - found
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - tr
8
+ licenses:
9
+ - unknown
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 100k<n<1M
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text_classification
18
+ task_ids:
19
+ - text_classification-other-news-category-classification
20
+ ---
21
+
22
+ # Dataset Card for Interpress Turkish News Category Dataset (270K)
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
+ - [Discussion of Social Impact and Biases](#discussion-of-social-impact-and-biases)
40
+ - [Other Known Limitations](#other-known-limitations)
41
+ - [Additional Information](#additional-information)
42
+ - [Dataset Curators](#dataset-curators)
43
+ - [Licensing Information](#licensing-information)
44
+ - [Citation Information](#citation-information)
45
+
46
+ ## Dataset Description
47
+
48
+ - **Homepage:** [Interpress](https://www.interpress.com/)
49
+ - **Point of Contact:** [Yavuz Komecoglu](mailto:[email protected])
50
+
51
+ ### Dataset Summary
52
+
53
+ Turkish News Category Dataset (270K) is a Turkish news data set consisting of 273601 news in 17 categories, compiled from printed media and news websites between 2010 and 2017 by the Interpress (https://www.interpress.com/) media monitoring company.
54
+
55
+ ### Languages
56
+
57
+ The dataset is based on Turkish.
58
+
59
+ ## Dataset Structure
60
+
61
+ ### Data Instances
62
+
63
+ A text classification dataset with 17 different news category.
64
+
65
+ ### Data Fields
66
+
67
+ [More Information Needed]
68
+
69
+ ### Data Splits
70
+
71
+ The data is split into a training and testing. The split is organized as the following
72
+
73
+ | | Tain | Test |
74
+ |---------- | ------- | ----- |
75
+ |data split | 218,880 | 54,721|
76
+
77
+ ## Dataset Creation
78
+
79
+ ### Curation Rationale
80
+
81
+ [More Information Needed]
82
+
83
+ ### Source Data
84
+
85
+ [More Information Needed]
86
+
87
+ #### Initial Data Collection and Normalization
88
+
89
+ Downloaded over 270,000 news from the printed media and news websites between 2010 and 2017 by the Interpress (https://www.interpress.com/) media monitoring company. This data collection compiled from print media and internet news is presented in its raw form. For this reason, it is appropriate to use it with careful pre-processing steps regarding various OCR errors and typos.
90
+
91
+
92
+ #### Who are the source language producers?
93
+
94
+ Turkish printed news sources and online news sites.
95
+
96
+ ### Annotations
97
+
98
+ The dataset does not contain any additional annotations.
99
+
100
+ #### Annotation process
101
+
102
+ [More Information Needed]
103
+
104
+ #### Who are the annotators?
105
+
106
+ [More Information Needed]
107
+
108
+ ### Personal and Sensitive Information
109
+
110
+ [More Information Needed]
111
+
112
+ ## Considerations for Using the Data
113
+
114
+ ### Discussion of Social Impact and Biases
115
+
116
+ [More Information Needed]
117
+
118
+ ### Other Known Limitations
119
+
120
+ [More Information Needed]
121
+
122
+ ## Additional Information
123
+
124
+ ### Dataset Curators
125
+
126
+ [More Information Needed]
127
+
128
+ ### Licensing Information
129
+
130
+ [More Information Needed]
131
+
132
+ ### Citation Information
133
+
134
+ [More Information Needed]
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"270k": {"description": "It is a Turkish news data set consisting of 273601 news in 17 categories, compiled from print media and news websites between 2010 and 2017 by the Interpress (https://www.interpress.com/) media monitoring company.\n", "citation": "", "homepage": "https://www.interpress.com/", "license": "", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}, "category": {"num_classes": 17, "names": ["aktuel", "bilisim", "egitim", "ekonomi", "gida", "iletisim", "kultursanat", "magazin", "saglik", "savunma", "seyahat", "siyasi", "spor", "teknoloji", "ticaret", "turizm", "yasam"], "names_file": null, "id": null, "_type": "ClassLabel"}, "categorycode": {"num_classes": 17, "names": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"], "names_file": null, "id": null, "_type": "ClassLabel"}, "publishdatetime": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "interpress_news_category_tr", "config_name": "270k", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 736098052, "num_examples": 218880, "dataset_name": "interpress_news_category_tr"}, "test": {"name": "test", "num_bytes": 184683629, "num_examples": 54721, "dataset_name": "interpress_news_category_tr"}}, "download_checksums": {"https://www.interpress.com/downloads/interpress_news_category_tr_270k.zip": {"num_bytes": 354802486, "checksum": "f41659ed1f38e36759e382eaef2b6bd3680b3a8d49f4d6ef1829d8d0d999e246"}}, "download_size": 354802486, "post_processing_size": null, "dataset_size": 920781681, "size_in_bytes": 1275584167}}
dummy/270k/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4aecc3f9d12fdcef888c6c93facff8b921fdb732d3a30c886b0ce1c47f90e578
3
+ size 10025
interpress_news_category_tr.py ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ # Lint as: python3
16
+ """Turkish News Category Dataset (270K) - Interpress Media Monitoring Company"""
17
+
18
+ from __future__ import absolute_import, division, print_function
19
+
20
+ import csv
21
+ import logging
22
+ import os
23
+
24
+ import datasets
25
+
26
+
27
+ _DESCRIPTION = """\
28
+ It is a Turkish news data set consisting of 273601 news in 17 categories, compiled from print media and news websites between 2010 and 2017 by the Interpress (https://www.interpress.com/) media monitoring company.
29
+ """
30
+
31
+ _CITATION = ""
32
+ _LICENSE = "unknown"
33
+ _HOMEPAGE = "https://www.interpress.com/"
34
+ _DOWNLOAD_URL = "https://www.interpress.com/downloads/interpress_news_category_tr_270k.zip"
35
+ _DATASET_URLS = {
36
+ "train": "interpress_news_category_tr_270k_train.tsv",
37
+ "test": "interpress_news_category_tr_270k_test.tsv",
38
+ }
39
+
40
+
41
+ class InterpressNewsCategoryTRConfig(datasets.BuilderConfig):
42
+ """BuilderConfig for InterpressNewsCategoryTR."""
43
+
44
+ def __init__(self, **kwargs):
45
+ """BuilderConfig for InterpressNewsCategoryTR.
46
+
47
+ Args:
48
+ **kwargs: keyword arguments forwarded to super.
49
+ """
50
+ super(InterpressNewsCategoryTRConfig, self).__init__(**kwargs)
51
+
52
+
53
+ class InterpressNewsCategoryTR(datasets.GeneratorBasedBuilder):
54
+ """Turkish News Category Dataset (270K) - Interpress Media Monitoring Company"""
55
+
56
+ BUILDER_CONFIGS = [
57
+ InterpressNewsCategoryTRConfig(
58
+ name="270k",
59
+ version=datasets.Version("1.0.0"),
60
+ description="Turkish News Category Dataset (270K) - Interpress Media Monitoring Company",
61
+ ),
62
+ ]
63
+
64
+ def _info(self):
65
+ return datasets.DatasetInfo(
66
+ description=_DESCRIPTION,
67
+ features=datasets.Features(
68
+ {
69
+ "id": datasets.Value("int32"),
70
+ "title": datasets.Value("string"),
71
+ "content": datasets.Value("string"),
72
+ "category": datasets.features.ClassLabel(
73
+ names=[
74
+ "aktuel",
75
+ "bilisim",
76
+ "egitim",
77
+ "ekonomi",
78
+ "gida",
79
+ "iletisim",
80
+ "kultursanat",
81
+ "magazin",
82
+ "saglik",
83
+ "savunma",
84
+ "seyahat",
85
+ "siyasi",
86
+ "spor",
87
+ "teknoloji",
88
+ "ticaret",
89
+ "turizm",
90
+ "yasam",
91
+ ]
92
+ ),
93
+ "categorycode": datasets.features.ClassLabel(num_classes=17),
94
+ "publishdatetime": datasets.Value("string"),
95
+ }
96
+ ),
97
+ supervised_keys=None,
98
+ homepage=_HOMEPAGE,
99
+ citation=_CITATION,
100
+ )
101
+
102
+ def _split_generators(self, dl_manager):
103
+ dl_dir = dl_manager.download_and_extract(_DOWNLOAD_URL)
104
+ return [
105
+ datasets.SplitGenerator(
106
+ name=datasets.Split.TRAIN, gen_kwargs={"filepath": os.path.join(dl_dir, _DATASET_URLS["train"])}
107
+ ),
108
+ datasets.SplitGenerator(
109
+ name=datasets.Split.TEST, gen_kwargs={"filepath": os.path.join(dl_dir, _DATASET_URLS["test"])}
110
+ ),
111
+ ]
112
+
113
+ def _generate_examples(self, filepath):
114
+ """Generate InterpressNewsCategoryTR examples."""
115
+ logging.info("⏳ Generating examples from = %s", filepath)
116
+ with open(filepath, encoding="utf-8") as f:
117
+ reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
118
+ for idx, row in enumerate(reader):
119
+ yield idx, {
120
+ "id": row["ID"],
121
+ "title": row["Title"],
122
+ "content": row["Content"],
123
+ "category": row["Category"],
124
+ "categorycode": row["CategoryCode"],
125
+ "publishdatetime": row["PublishDateTime"],
126
+ }