albertvillanova HF staff commited on
Commit
2fee6b1
1 Parent(s): 2f74a29

Delete loading script

Browse files
Files changed (1) hide show
  1. aslg_pc12.py +0 -82
aslg_pc12.py DELETED
@@ -1,82 +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
- """ASLG-PC12: Synthetic English-ASL Gloss Parallel Corpus 2012"""
16
-
17
-
18
- import datasets
19
-
20
-
21
- _DESCRIPTION = """\
22
- A large synthetic collection of parallel English and ASL-Gloss texts.
23
- There are two string features: text, and gloss.
24
- """
25
-
26
- _CITATION = """\
27
- @inproceedings{othman2012english,
28
- title={English-asl gloss parallel corpus 2012: Aslg-pc12},
29
- author={Othman, Achraf and Jemni, Mohamed},
30
- booktitle={5th Workshop on the Representation and Processing of Sign Languages: Interactions between Corpus and Lexicon LREC},
31
- year={2012}
32
- }
33
- """
34
-
35
- _GLOSS_URL = "https://www.achrafothman.net/aslsmt/corpus/sample-corpus-asl-en.asl"
36
- _TEXT_URL = "https://www.achrafothman.net/aslsmt/corpus/sample-corpus-asl-en.en"
37
-
38
- _HOMEPAGE = "https://achrafothman.net/site/asl-smt/"
39
-
40
-
41
- class ASLGPC12(datasets.GeneratorBasedBuilder):
42
- """ASLG-PC12: Synthetic English-ASL Gloss Parallel Corpus 2012"""
43
-
44
- VERSION = datasets.Version("0.0.1") # sample corpus
45
-
46
- def _info(self):
47
- return datasets.DatasetInfo(
48
- description=_DESCRIPTION,
49
- # This defines the different columns of the dataset and their types
50
- features=datasets.Features(
51
- {
52
- "gloss": datasets.Value("string"), # American sign language gloss
53
- "text": datasets.Value("string"), # English text
54
- }
55
- ),
56
- homepage=_HOMEPAGE,
57
- citation=_CITATION,
58
- )
59
-
60
- def _split_generators(self, dl_manager):
61
- """Returns SplitGenerators."""
62
-
63
- gloss_path, text_path = dl_manager.download([_GLOSS_URL, _TEXT_URL])
64
-
65
- return [
66
- datasets.SplitGenerator(
67
- name=datasets.Split.TRAIN,
68
- gen_kwargs={"gloss_path": gloss_path, "text_path": text_path},
69
- )
70
- ]
71
-
72
- def _generate_examples(self, gloss_path, text_path):
73
- """Yields examples."""
74
-
75
- gloss_f = open(gloss_path, "r", encoding="utf-8")
76
- text_f = open(text_path, "r", encoding="utf-8")
77
-
78
- for i, (gloss, text) in enumerate(zip(gloss_f, text_f)):
79
- yield i, {"gloss": gloss, "text": text}
80
-
81
- gloss_f.close()
82
- text_f.close()