Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
acceptability-classification
Languages:
Italian
Size:
100K - 1M
License:
Commit
·
5485302
1
Parent(s):
6a6ee6f
Delete loading script
Browse files
cultural_heritage_metadata_accuracy.py
DELETED
@@ -1,80 +0,0 @@
|
|
1 |
-
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
|
2 |
-
#
|
3 |
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
-
# you may not use this file except in compliance with the License.
|
5 |
-
# You may obtain a copy of the License at
|
6 |
-
#
|
7 |
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8 |
-
#
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
"""Annotated dataset to assess the accuracy of the textual description of cultural heritage records"""
|
15 |
-
|
16 |
-
import csv
|
17 |
-
|
18 |
-
import datasets
|
19 |
-
|
20 |
-
|
21 |
-
_CITATION = """\
|
22 |
-
@article{Lorenzini2020,
|
23 |
-
author = "Matteo Lorenzini and Marco Rospocher and Sara Tonelli",
|
24 |
-
title = "{Annotated dataset to assess the accuracy of the textual description of cultural heritage records}",
|
25 |
-
year = "2020",
|
26 |
-
month = "12",
|
27 |
-
url = "https://figshare.com/articles/dataset/Annotated_dataset_to_assess_the_accuracy_of_the_textual_description_of_cultural_heritage_records/13359104",
|
28 |
-
doi = "10.6084/m9.figshare.13359104.v1"
|
29 |
-
}
|
30 |
-
"""
|
31 |
-
|
32 |
-
_DESCRIPTION = """\
|
33 |
-
The dataset contains more than 100K textual descriptions of cultural items from Cultura Italia (http://www.culturaitalia.it/opencms/index.jsp?language=en), the Italian National Cultural aggregator.
|
34 |
-
Each of the description is labeled either HIGH or LOW quality, according its adherence to the standard cataloguing guidelines provided by Istituto Centrale per il Catalogo e la Documentazione (ICCD).
|
35 |
-
"""
|
36 |
-
|
37 |
-
_HOMEPAGE = "https://doi.org/10.6084/m9.figshare.13359104.v1"
|
38 |
-
|
39 |
-
_LICENSE = "Creative Commons Attribution 4.0 International"
|
40 |
-
|
41 |
-
|
42 |
-
class CulturalHeritageMetadataAccuracy(datasets.GeneratorBasedBuilder):
|
43 |
-
"""Annotated dataset to assess the accuracy of the textual description of cultural heritage records"""
|
44 |
-
|
45 |
-
VERSION = datasets.Version("1.1.0")
|
46 |
-
|
47 |
-
def _info(self):
|
48 |
-
features = datasets.Features(
|
49 |
-
{
|
50 |
-
"metadata_text": datasets.Value("string"),
|
51 |
-
"label": datasets.ClassLabel(names=["Low_Quality", "High_Quality"]),
|
52 |
-
"source": datasets.Value("string"),
|
53 |
-
}
|
54 |
-
)
|
55 |
-
|
56 |
-
return datasets.DatasetInfo(
|
57 |
-
description=_DESCRIPTION,
|
58 |
-
features=features,
|
59 |
-
homepage=_HOMEPAGE,
|
60 |
-
license=_LICENSE,
|
61 |
-
citation=_CITATION,
|
62 |
-
)
|
63 |
-
|
64 |
-
def _split_generators(self, dl_manager):
|
65 |
-
csv_file = dl_manager.download(
|
66 |
-
"https://figshare.com/ndownloader/files/25796018"
|
67 |
-
)
|
68 |
-
return [
|
69 |
-
datasets.SplitGenerator(
|
70 |
-
name=datasets.Split.TRAIN,
|
71 |
-
gen_kwargs={
|
72 |
-
"csv_file": csv_file,
|
73 |
-
},
|
74 |
-
),
|
75 |
-
]
|
76 |
-
|
77 |
-
def _generate_examples(self, csv_file):
|
78 |
-
with open(csv_file, encoding="utf-8") as f:
|
79 |
-
reader = csv.DictReader(f, fieldnames=["metadata_text", "label", "source"])
|
80 |
-
yield from enumerate(reader)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|