Update files from the datasets library (from 1.7.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.7.0
- README.md +14 -14
- urdu_fake_news.py +2 -1
README.md
CHANGED
@@ -1,37 +1,37 @@
|
|
1 |
---
|
2 |
annotations_creators:
|
3 |
-
|
4 |
language_creators:
|
5 |
-
|
6 |
languages:
|
7 |
-
|
8 |
licenses:
|
9 |
-
|
10 |
multilinguality:
|
11 |
-
|
12 |
size_categories:
|
13 |
-
|
14 |
source_datasets:
|
15 |
-
|
16 |
task_categories:
|
17 |
-
|
18 |
task_ids:
|
19 |
-
|
20 |
-
|
|
|
21 |
---
|
22 |
|
23 |
# Dataset Card for Bend the Truth (Urdu Fake News)
|
24 |
|
25 |
## Table of Contents
|
26 |
-
|
27 |
- [Dataset Description](#dataset-description)
|
28 |
- [Dataset Summary](#dataset-summary)
|
29 |
-
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
30 |
- [Languages](#languages)
|
31 |
- [Dataset Structure](#dataset-structure)
|
32 |
- [Data Instances](#data-instances)
|
33 |
-
- [Data Fields](#data-
|
34 |
-
- [Data Splits](#data-
|
35 |
- [Dataset Creation](#dataset-creation)
|
36 |
- [Curation Rationale](#curation-rationale)
|
37 |
- [Source Data](#source-data)
|
|
|
1 |
---
|
2 |
annotations_creators:
|
3 |
+
- expert-generated
|
4 |
language_creators:
|
5 |
+
- expert-generated
|
6 |
languages:
|
7 |
+
- ur
|
8 |
licenses:
|
9 |
+
- unknown
|
10 |
multilinguality:
|
11 |
+
- monolingual
|
12 |
size_categories:
|
13 |
+
- n<1K
|
14 |
source_datasets:
|
15 |
+
- original
|
16 |
task_categories:
|
17 |
+
- text-classification
|
18 |
task_ids:
|
19 |
+
- fact-checking
|
20 |
+
- intent-classification
|
21 |
+
paperswithcode_id: null
|
22 |
---
|
23 |
|
24 |
# Dataset Card for Bend the Truth (Urdu Fake News)
|
25 |
|
26 |
## Table of Contents
|
|
|
27 |
- [Dataset Description](#dataset-description)
|
28 |
- [Dataset Summary](#dataset-summary)
|
29 |
+
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
30 |
- [Languages](#languages)
|
31 |
- [Dataset Structure](#dataset-structure)
|
32 |
- [Data Instances](#data-instances)
|
33 |
+
- [Data Fields](#data-fields)
|
34 |
+
- [Data Splits](#data-splits)
|
35 |
- [Dataset Creation](#dataset-creation)
|
36 |
- [Curation Rationale](#curation-rationale)
|
37 |
- [Source Data](#source-data)
|
urdu_fake_news.py
CHANGED
@@ -88,9 +88,10 @@ class UrduFakeNews(datasets.GeneratorBasedBuilder):
|
|
88 |
key = name.rstrip(".txt")
|
89 |
|
90 |
_class = 1 if ("Real" in filename) else 0
|
|
|
91 |
category = "".join([i for i in key if not i.isdigit()])
|
92 |
if category == "":
|
93 |
continue
|
94 |
category = self.category_list.index(category)
|
95 |
|
96 |
-
yield key, {"news": news, "label": _class, "category": category}
|
|
|
88 |
key = name.rstrip(".txt")
|
89 |
|
90 |
_class = 1 if ("Real" in filename) else 0
|
91 |
+
_class_name = "Real" if ("Real" in filename) else "Fake"
|
92 |
category = "".join([i for i in key if not i.isdigit()])
|
93 |
if category == "":
|
94 |
continue
|
95 |
category = self.category_list.index(category)
|
96 |
|
97 |
+
yield f"{_class_name}_{key}", {"news": news, "label": _class, "category": category}
|