system HF staff commited on
Commit
b4133df
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 +167 -0
  3. dataset_infos.json +1 -0
  4. dummy/1.1.0/dummy_data.zip +3 -0
  5. wiki_summary.py +86 -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,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - no-annotation
4
+ language_creators:
5
+ - crowdsourced
6
+ languages:
7
+ - fa
8
+ licenses:
9
+ - apache-2-0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 10K<n<100K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - conditional-text-generation
18
+ - question-answering
19
+ task_ids:
20
+ - abstractive-qa
21
+ - explanation-generation
22
+ - extractive-qa
23
+ - machine-translation
24
+ - open-domain-qa
25
+ - summarization
26
+ - text-simplification
27
+ ---
28
+
29
+ # Dataset Card for [Needs More Information]
30
+
31
+ ## Table of Contents
32
+ - [Dataset Description](#dataset-description)
33
+ - [Dataset Summary](#dataset-summary)
34
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
35
+ - [Languages](#languages)
36
+ - [Dataset Structure](#dataset-structure)
37
+ - [Data Instances](#data-instances)
38
+ - [Data Fields](#data-instances)
39
+ - [Data Splits](#data-instances)
40
+ - [Dataset Creation](#dataset-creation)
41
+ - [Curation Rationale](#curation-rationale)
42
+ - [Source Data](#source-data)
43
+ - [Annotations](#annotations)
44
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
45
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
46
+ - [Social Impact of Dataset](#social-impact-of-dataset)
47
+ - [Discussion of Biases](#discussion-of-biases)
48
+ - [Other Known Limitations](#other-known-limitations)
49
+ - [Additional Information](#additional-information)
50
+ - [Dataset Curators](#dataset-curators)
51
+ - [Licensing Information](#licensing-information)
52
+ - [Citation Information](#citation-information)
53
+
54
+ ## Dataset Description
55
+
56
+ - **Homepage:** https://github.com/m3hrdadfi/wiki-summary
57
+ - **Repository:** https://github.com/m3hrdadfi/wiki-summary
58
+ - **Paper:** [More Information Needed]
59
+ - **Leaderboard:** [More Information Needed]
60
+ - **Point of Contact:** [Mehrdad Farahani](mailto:m3hrdadphi@gmail.com)
61
+
62
+ ### Dataset Summary
63
+
64
+ The dataset extracted from Persian Wikipedia into the form of articles and highlights and cleaned the dataset into pairs of articles and highlights and reduced the articles' length (only version 1.0.0) and highlights' length to a maximum of 512 and 128, respectively, suitable for parsBERT. This dataset is created to achieve state-of-the-art results on some interesting NLP tasks like Text Summarization.
65
+
66
+ ### Supported Tasks and Leaderboards
67
+
68
+ [More Information Needed]
69
+
70
+ ### Languages
71
+
72
+ The text in the dataset is in Percy.
73
+
74
+ ## Dataset Structure
75
+
76
+ ### Data Instances
77
+
78
+ ```
79
+ {
80
+ 'id' :'0598cfd2ac491a928615945054ab7602034a8f4f',
81
+ 'link': 'https://fa.wikipedia.org/wiki/انقلاب_1917_روسیه',
82
+ 'title': 'انقلاب 1917 روسیه',
83
+ 'article': 'نخست انقلاب فوریه ۱۹۱۷ رخ داد . در این انقلاب پس از یک‌سری اعتصابات ، تظاهرات و درگیری‌ها ، نیکولای دوم ، آخرین تزار روسیه از سلطنت خلع شد و یک دولت موقت به قدرت رسید . دولت موقت زیر نظر گئورگی لووف و الکساندر کرنسکی تشکیل شد . اکثر اعضای دولت موقت ، از شاخه منشویک حزب سوسیال دموکرات کارگری روسیه بودند . دومین مرحله ، انقلاب اکتبر ۱۹۱۷ بود . انقلاب اکتبر ، تحت نظارت حزب بلشویک (شاخه رادیکال از حزب سوسیال دموکرات کارگری روسیه) و به رهبری ولادیمیر لنین به پیش رفت و طی یک یورش نظامی همه‌جانبه به کاخ زمستانی سن پترزبورگ و سایر اماکن مهم ، قدرت را از دولت موقت گرفت . در این انقلاب افراد بسیار کمی کشته شدند . از زمان شکست روسیه در جنگ ۱۹۰۵ با ژاپن ، اوضاع بد اقتصادی ، گرسنگی ، عقب‌ماندگی و سرمایه‌داری و نارضایتی‌های گوناگون در بین مردم ، سربازان ، کارگران ، کشاورزان و نخبگان روسیه به‌وجود آمده‌بود . سرکوبهای تزار و ایجاد مجلس دوما نظام مشروطه حاصل آن دوران است . حزب سوسیال دموکرات ، اصلی‌ترین معترض به سیاست‌های نیکلای دوم بود که به‌طور گسترده بین دهقانان کشاورزان و کارگران کارخانجات صنعتی علیه سیاست‌های سیستم تزار فعالیت داشت . در اوت ۱۹۱۴ میلادی ، امپراتوری روسیه به دستور تزار وقت و به منظور حمایت از اسلاوهای صربستان وارد جنگ جهانی اول در برابر امپراتوری آلمان و امپراتوری اتریش-مجارستان شد . نخست فقط بلشویک‌ها ، مخالف ورود روسیه به این جنگ بودند و می‌گفتند که این جنگ ، سبب بدتر شدن اوضاع نابسامان اقتصادی و اجتماعی روسیه خواهد شد . در سال ۱۹۱۴ میلادی �� یعنی در آغاز جنگ جهانی اول ، روسیه بزرگترین ارتش جهان را داشت ، حدود ۱۲ میلیون سرباز و ۶ میلیون سرباز ذخیره ؛ ولی در پایان سال ۱۹۱۶ میلادی ، پنج میلیون نفر از سربازان روسیه کشته ، زخمی یا اسیر شده بودند . حدود دو میلیون سرباز نیز محل خدمت خود را ترک کرده و غالبا با اسلحه به شهر و دیار خود بازگشته بودند . در میان ۱۰ یا ۱۱ میلیون سرباز باقی‌مانده نیز ، اعتبار تزار و سلسله مراتب ارتش و اتوریته افسران بالا دست از بین رفته بود . عوامل نابسامان داخلی اعم از اجتماعی کشاورزی و فرماندهی نظامی در شکستهای روسیه بسیار مؤثر بود . شکست‌های روسیه در جنگ جهانی اول ، حامیان نیکلای دوم در روسیه را به حداقل خود رساند . در اوایل فوریه ۱۹۱۷ میلادی اکثر کارگران صنعتی در پتروگراد و مسکو دست به اعتصاب زدند . سپس شورش به پادگان‌ها و سربازان رسید . اعتراضات دهقانان نیز گسترش یافت . سوسیال دموکرات‌ها هدایت اعتراضات را در دست گرفتند . در ۱۱ مارس ۱۹۱۷ میلادی ، تزار وقت روسیه ، نیکلای دوم ، فرمان انحلال مجلس روسیه را صادر کرد ، اما اکثر نمایندگان مجلس متفرق نشدند و با تصمیمات نیکلای دوم مخالفت کردند . سرانجام در پی تظاهرات گسترده کارگران و سپس نافرمانی سربازان در سرکوب تظاهرکنندگان در پتروگراد ، نیکلای دوم از مقام خود استعفا داد . بدین ترتیب حکم‌رانی دودمان رومانوف‌ها بر روسیه پس از حدود سیصد سال پایان یافت .',
84
+ 'highlights': 'انقلاب ۱۹۱۷ روسیه ، جنبشی اعتراضی ، ضد امپراتوری روسیه بود که در سال ۱۹۱۷ رخ داد و به سرنگونی حکومت تزارها و برپایی اتحاد جماهیر شوروی انجامید . مبانی انقلاب بر پایه صلح-نان-زمین استوار بود . این انقلاب در دو مرحله صورت گرفت : در طول این انقلاب در شهرهای اصلی روسیه همانند مسکو و سن پترزبورگ رویدادهای تاریخی برجسته‌ای رخ داد . انقلاب در مناطق روستایی و رعیتی نیز پا به پای مناطق شهری در حال پیشروی بود و دهقانان زمین‌ها را تصرف کرده و در حال بازتوزیع آن در میان خود بودند .'
85
+ }
86
+ ```
87
+
88
+ ### Data Fields
89
+
90
+ - `id`: Article id
91
+ - `link`: Article link
92
+ - `title`: Title of the article
93
+ - `article`: Full text content in the article
94
+ - `highlights`: Summary of the article
95
+
96
+ ### Data Splits
97
+
98
+ | Train | Test | Validation |
99
+ |-------------|-------------|-------------|
100
+ | 45,654 | 5,638 | 5,074 |
101
+
102
+ ## Dataset Creation
103
+
104
+ ### Curation Rationale
105
+
106
+ [More Information Needed]
107
+
108
+ ### Source Data
109
+
110
+ #### Initial Data Collection and Normalization
111
+
112
+ [More Information Needed]
113
+
114
+ #### Who are the source language producers?
115
+
116
+ [More Information Needed]
117
+
118
+ ### Annotations
119
+
120
+ #### Annotation process
121
+
122
+ No annotations.
123
+
124
+ #### Who are the annotators?
125
+
126
+ [More Information Needed]
127
+
128
+ ### Personal and Sensitive Information
129
+
130
+ [More Information Needed]
131
+
132
+ ## Considerations for Using the Data
133
+
134
+ ### Social Impact of Dataset
135
+
136
+ [More Information Needed]
137
+
138
+ ### Discussion of Biases
139
+
140
+ [More Information Needed]
141
+
142
+ ### Other Known Limitations
143
+
144
+ [More Information Needed]
145
+
146
+ ## Additional Information
147
+
148
+ ### Dataset Curators
149
+
150
+ The dataset was created by Mehrdad Farahani.
151
+
152
+ ### Licensing Information
153
+
154
+ [Apache License 2.0](https://github.com/m3hrdadfi/wiki-summary/blob/master/LICENSE)
155
+
156
+ ### Citation Information
157
+
158
+ ```
159
+ @misc{Bert2BertWikiSummaryPersian,
160
+ author = {Mehrdad Farahani},
161
+ title = {Summarization using Bert2Bert model on WikiSummary dataset},
162
+ year = {2020},
163
+ publisher = {GitHub},
164
+ journal = {GitHub repository},
165
+ howpublished = {https://github.com/m3hrdadfi/wiki-summary},
166
+ }
167
+ ```
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"default": {"description": "The dataset extracted from Persian Wikipedia into the form of articles and highlights and cleaned the dataset into pairs of articles and highlights and reduced the articles' length (only version 1.0.0) and highlights' length to a maximum of 512 and 128, respectively, suitable for parsBERT.\n", "citation": "@misc{Bert2BertWikiSummaryPersian,\n author = {Mehrdad Farahani},\n title = {Summarization using Bert2Bert model on WikiSummary dataset},\n year = {2020},\n publisher = {GitHub},\n journal = {GitHub repository},\n howpublished = {https://github.com/m3hrdadfi/wiki-summary},\n}\n", "homepage": "https://github.com/m3hrdadfi/wiki-summary", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "link": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "article": {"dtype": "string", "id": null, "_type": "Value"}, "highlights": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "wiki_summary", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 207186608, "num_examples": 45654, "dataset_name": "wiki_summary"}, "test": {"name": "test", "num_bytes": 25693509, "num_examples": 5638, "dataset_name": "wiki_summary"}, "validation": {"name": "validation", "num_bytes": 23130954, "num_examples": 5074, "dataset_name": "wiki_summary"}}, "download_checksums": {"https://drive.google.com/u/0/uc?id=1-CaP3xHgZxOGjQ3pXC5tr9YnIajmel-t&export=download": {"num_bytes": 206504156, "checksum": "a1dc2dc6cf3722e8cdd8a89dac48b32b43532ccdefce0d141404ba4d492bbd87"}, "https://drive.google.com/u/0/uc?id=1-9G4yYP6YO8oMA-o4cTe9NJpEyr7x5jg&export=download": {"num_bytes": 25609226, "checksum": "af0ea6a959dfada1b665a03c1ce19683b37a6b48825dd3bf09b1404c825ed87c"}, "https://drive.google.com/u/0/uc?id=1-2g2gkDeNaN-vth-8Mgit_ovmSkVh91u&export=download": {"num_bytes": 23055122, "checksum": "9ca21f6fb4760ad2da1cdcd510be3cdaea60314388e041a10a2b9c4ef2f70f33"}}, "download_size": 255168504, "post_processing_size": null, "dataset_size": 256011071, "size_in_bytes": 511179575}}
dummy/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:80bfbdbce79f69ecdd8d68e4ea504e873ab4db9e52e9ea49ea9c85020c8b00e1
3
+ size 17766
wiki_summary.py ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """Wiki Summary."""
18
+
19
+ from __future__ import absolute_import, division, print_function
20
+
21
+ import csv
22
+
23
+ import datasets
24
+
25
+
26
+ _DESCRIPTION = """\
27
+ The dataset extracted from Persian Wikipedia into the form of articles and highlights and cleaned the dataset into pairs of articles and highlights and reduced the articles' length (only version 1.0.0) and highlights' length to a maximum of 512 and 128, respectively, suitable for parsBERT.
28
+ """
29
+
30
+ _CITATION = """\
31
+ @misc{Bert2BertWikiSummaryPersian,
32
+ author = {Mehrdad Farahani},
33
+ title = {Summarization using Bert2Bert model on WikiSummary dataset},
34
+ year = {2020},
35
+ publisher = {GitHub},
36
+ journal = {GitHub repository},
37
+ howpublished = {https://github.com/m3hrdadfi/wiki-summary},
38
+ }
39
+ """
40
+
41
+ _ID = "id"
42
+ _LINK = "link"
43
+ _TITLE = "title"
44
+ _ARTICLE = "article"
45
+ _HIGHLIGHTS = "highlights"
46
+
47
+ _HOMEPAGE = "https://github.com/m3hrdadfi/wiki-summary"
48
+
49
+ _TRAIN_DOWNLOAD_URL = "https://drive.google.com/u/0/uc?id=1-CaP3xHgZxOGjQ3pXC5tr9YnIajmel-t&export=download"
50
+ _TEST_DOWNLOAD_URL = "https://drive.google.com/u/0/uc?id=1-9G4yYP6YO8oMA-o4cTe9NJpEyr7x5jg&export=download"
51
+ _DEV_DOWNLOAD_URL = "https://drive.google.com/u/0/uc?id=1-2g2gkDeNaN-vth-8Mgit_ovmSkVh91u&export=download"
52
+
53
+
54
+ class WikiSummary(datasets.GeneratorBasedBuilder):
55
+ """Wiki Summary"""
56
+
57
+ VERSION = datasets.Version("1.1.0")
58
+
59
+ def _info(self):
60
+ feature_names = [_ID, _LINK, _TITLE, _ARTICLE, _HIGHLIGHTS]
61
+ return datasets.DatasetInfo(
62
+ description=_DESCRIPTION,
63
+ features=datasets.Features({k: datasets.Value("string") for k in feature_names}),
64
+ homepage=_HOMEPAGE,
65
+ citation=_CITATION,
66
+ )
67
+
68
+ def _split_generators(self, dl_manager):
69
+ path_train = dl_manager.download_and_extract(_TRAIN_DOWNLOAD_URL)
70
+ path_test = dl_manager.download_and_extract(_TEST_DOWNLOAD_URL)
71
+ path_dev = dl_manager.download_and_extract(_DEV_DOWNLOAD_URL)
72
+ return [
73
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": path_train}),
74
+ datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": path_test}),
75
+ datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": path_dev}),
76
+ ]
77
+
78
+ def _generate_examples(self, filepath):
79
+ """Generate Wiki summary examples."""
80
+ with open(filepath, encoding="utf8") as csv_file:
81
+ csv_reader = csv.reader(
82
+ csv_file, quotechar='"', delimiter="\t", quoting=csv.QUOTE_ALL, skipinitialspace=True
83
+ )
84
+ for id_, row in enumerate(csv_reader):
85
+ if len(row) == 5:
86
+ yield id_, {_ID: row[0], _LINK: row[1], _TITLE: row[2], _ARTICLE: row[3], _HIGHLIGHTS: row[4]}