albertvillanova HF staff commited on
Commit
5d92206
1 Parent(s): 658e029

Delete loading script

Browse files
Files changed (1) hide show
  1. bbaw_egyptian.py +0 -89
bbaw_egyptian.py DELETED
@@ -1,89 +0,0 @@
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
- """ Middle Egyptian dataset as used in the paper """
16
- import json
17
-
18
- import datasets
19
-
20
-
21
- _CITATION = """\
22
- @misc{OPUS4-2919,
23
- title = {Teilauszug der Datenbank des Vorhabens "Strukturen und Transformationen des Wortschatzes der {\"a}gyptischen Sprache" vom Januar 2018},
24
- institution = {Akademienvorhaben Strukturen und Transformationen des Wortschatzes der {\"a}gyptischen Sprache. Text- und Wissenskultur im alten {\"A}gypten},
25
- type = {other},
26
- year = {2018},
27
- }
28
- """
29
-
30
- _DESCRIPTION = """\
31
- This dataset comprises parallel sentences of hieroglyphic encodings, transcription and translation
32
- as used in the paper Multi-Task Modeling of Phonographic Languages: Translating Middle Egyptian
33
- Hieroglyph. The data triples are extracted from the digital corpus of Egyptian texts compiled by
34
- the project "Strukturen und Transformationen des Wortschatzes der ägyptischen Sprache".
35
- """
36
-
37
- _HOMEPAGE = "https://edoc.bbaw.de/frontdoor/index/index/docId/2919"
38
-
39
- _LICENSE = "Creative Commons-Lizenz - CC BY-SA - 4.0 International"
40
-
41
-
42
- class BbawEgyptian(datasets.GeneratorBasedBuilder):
43
- """
44
- The project `Strukturen und Transformationen des Wortschatzes der ägyptischen Sprache`
45
- is compiling an extensively annotated digital corpus of Egyptian texts.
46
- This publication comprises an excerpt of the internal database's contents.
47
- """
48
-
49
- _URL = "https://phiwi.github.io/"
50
- _URLS = {"all": _URL + "all.json"}
51
-
52
- def _info(self):
53
- features = datasets.Features(
54
- {
55
- "transcription": datasets.Value("string"),
56
- "translation": datasets.Value("string"),
57
- "hieroglyphs": datasets.Value("string"),
58
- }
59
- )
60
- return datasets.DatasetInfo(
61
- description=_DESCRIPTION,
62
- features=features,
63
- supervised_keys=None,
64
- homepage=_HOMEPAGE,
65
- license=_LICENSE,
66
- citation=_CITATION,
67
- )
68
-
69
- def _split_generators(self, dl_manager):
70
- """Returns SplitGenerators."""
71
- my_urls = self._URLS
72
- data_dir = dl_manager.download(my_urls)
73
- return [
74
- datasets.SplitGenerator(
75
- name=datasets.Split.TRAIN,
76
- gen_kwargs={"filepath": data_dir["all"]},
77
- )
78
- ]
79
-
80
- def _generate_examples(self, filepath):
81
- """Yields examples as (key, example) tuples."""
82
- with open(filepath, "r", encoding="utf-8") as f:
83
- data = json.load(f)
84
- for id_, row in enumerate(data):
85
- yield id_, {
86
- "translation": row["translation"],
87
- "transcription": row["transcription"],
88
- "hieroglyphs": row["hieroglyphs"],
89
- }