system HF staff commited on
Commit
a84da7d
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 +255 -0
  3. dataset_infos.json +1 -0
  4. dummy/1.0.0/dummy_data.zip +3 -0
  5. ms_terms.py +102 -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,255 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - expert-generated
6
+ languages:
7
+ - af
8
+ - sq
9
+ - am
10
+ - ar
11
+ - hy
12
+ - as
13
+ - az
14
+ - bn
15
+ - other-bn-india
16
+ - eu
17
+ - be
18
+ - bs
19
+ - other-bs-latin
20
+ - bg
21
+ - ca
22
+ - ku
23
+ - chr
24
+ - zh
25
+ - other-zh-Hant_HK
26
+ - other-zh-Hant_TW
27
+ - hr
28
+ - cs
29
+ - da
30
+ - prs
31
+ - nl
32
+ - en
33
+ - et
34
+ - fil
35
+ - fi
36
+ - fr
37
+ - other-fr_CA
38
+ - gl
39
+ - ka
40
+ - de
41
+ - el
42
+ - gu
43
+ - ha
44
+ - he
45
+ - hi
46
+ - hu
47
+ - is
48
+ - ig
49
+ - id
50
+ - iu
51
+ - ga
52
+ - xh
53
+ - zu
54
+ - it
55
+ - ja
56
+ - quc
57
+ - kn
58
+ - kk
59
+ - km
60
+ - rw
61
+ - swh
62
+ - knn
63
+ - ko
64
+ - ky
65
+ - lo
66
+ - lv
67
+ - lt
68
+ - lb
69
+ - mk
70
+ - other-ms-brunei (Brunei Darus-)
71
+ - ms
72
+ - ml
73
+ - mt
74
+ - mi
75
+ - mr
76
+ - mn
77
+ - ne
78
+ - nb
79
+ - nn
80
+ - ory
81
+ - pst
82
+ - fa
83
+ - pl
84
+ - other-pt-br
85
+ - pt
86
+ - pa
87
+ - pa
88
+ - qu
89
+ - ro
90
+ - ru
91
+ - gd
92
+ - other-sr-bih
93
+ - sr
94
+ - other-sr-latin
95
+ - st
96
+ - tn
97
+ - sd
98
+ - si
99
+ - sk
100
+ - sl
101
+ - es
102
+ - other-es-MX
103
+ - sv
104
+ - tg
105
+ - ta
106
+ - tt
107
+ - te
108
+ - th
109
+ - ti
110
+ - tr
111
+ - tk
112
+ - uk
113
+ - ur
114
+ - ug
115
+ - uz
116
+ - other-valencian
117
+ - vi
118
+ - guc
119
+ - cy
120
+ - wo
121
+ - yo
122
+ licenses:
123
+ - ms-pl
124
+ multilinguality:
125
+ - multilingual
126
+ - translation
127
+ size_categories:
128
+ - 10K<n<100K
129
+ source_datasets:
130
+ - original
131
+ task_categories:
132
+ - conditional-text-generation
133
+ task_ids:
134
+ - machine-translation
135
+ ---
136
+
137
+ # Dataset Card for [ms_terms]
138
+
139
+ ## Table of Contents
140
+ - [Dataset Description](#dataset-description)
141
+ - [Dataset Summary](#dataset-summary)
142
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
143
+ - [Languages](#languages)
144
+ - [Dataset Structure](#dataset-structure)
145
+ - [Data Instances](#data-instances)
146
+ - [Data Fields](#data-instances)
147
+ - [Data Splits](#data-instances)
148
+ - [Dataset Creation](#dataset-creation)
149
+ - [Curation Rationale](#curation-rationale)
150
+ - [Source Data](#source-data)
151
+ - [Annotations](#annotations)
152
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
153
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
154
+ - [Social Impact of Dataset](#social-impact-of-dataset)
155
+ - [Discussion of Biases](#discussion-of-biases)
156
+ - [Other Known Limitations](#other-known-limitations)
157
+ - [Additional Information](#additional-information)
158
+ - [Dataset Curators](#dataset-curators)
159
+ - [Licensing Information](#licensing-information)
160
+ - [Citation Information](#citation-information)
161
+
162
+ ## Dataset Description
163
+
164
+ - **Homepage:**
165
+
166
+ [Microsoft Terminology Collection](https://www.microsoft.com/en-us/language/terminology)
167
+
168
+ - **Repository:**
169
+ - **Paper:**
170
+ - **Leaderboard:**
171
+ - **Point of Contact:**
172
+
173
+ ### Dataset Summary
174
+
175
+ The Microsoft Terminology Collection can be used to develop localized versions of applications that integrate with Microsoft products. It can also be used to integrate Microsoft terminology into other terminology collections or serve as a base IT glossary for language development in the nearly 100 languages available. Terminology is provided in .tbx format, an industry standard for terminology exchange.
176
+
177
+ ### Supported Tasks and Leaderboards
178
+
179
+ [More Information Needed]
180
+
181
+ ### Languages
182
+
183
+ Nearly 100 Languages.
184
+
185
+ ## Dataset Structure
186
+
187
+ ### Data Instances
188
+
189
+ [More Information Needed]
190
+
191
+ ### Data Fields
192
+
193
+ [More Information Needed]
194
+
195
+ ### Data Splits
196
+
197
+ [More Information Needed]
198
+
199
+ ## Dataset Creation
200
+
201
+ ### Curation Rationale
202
+
203
+ [More Information Needed]
204
+
205
+ ### Source Data
206
+
207
+ #### Initial Data Collection and Normalization
208
+
209
+ [More Information Needed]
210
+
211
+ #### Who are the source language producers?
212
+
213
+ [More Information Needed]
214
+
215
+ ### Annotations
216
+
217
+ #### Annotation process
218
+
219
+ [More Information Needed]
220
+
221
+ #### Who are the annotators?
222
+
223
+ [More Information Needed]
224
+
225
+ ### Personal and Sensitive Information
226
+
227
+ [More Information Needed]
228
+
229
+ ## Considerations for Using the Data
230
+
231
+ ### Social Impact of Dataset
232
+
233
+ [More Information Needed]
234
+
235
+ ### Discussion of Biases
236
+
237
+ [More Information Needed]
238
+
239
+ ### Other Known Limitations
240
+
241
+ [More Information Needed]
242
+
243
+ ## Additional Information
244
+
245
+ ### Dataset Curators
246
+
247
+ [More Information Needed]
248
+
249
+ ### Licensing Information
250
+
251
+ [More Information Needed]
252
+
253
+ ### Citation Information
254
+
255
+ [More Information Needed]
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "The Microsoft Terminology Collection can be used to develop localized versions of applications that integrate with Microsoft products.\nIt can also be used to integrate Microsoft terminology into other terminology collections or serve as a base IT glossary\nfor language development in the nearly 100 languages available. Terminology is provided in .tbx format, an industry standard for terminology exchange.\n", "citation": "", "homepage": "https://www.microsoft.com/en-us/language/terminology", "license": "", "features": {"entry_id": {"dtype": "string", "id": null, "_type": "Value"}, "term_source": {"dtype": "string", "id": null, "_type": "Value"}, "pos": {"dtype": "string", "id": null, "_type": "Value"}, "definition": {"dtype": "string", "id": null, "_type": "Value"}, "term_target": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "ms_terms", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 6995497, "num_examples": 33738, "dataset_name": "ms_terms"}}, "download_checksums": {}, "download_size": 0, "post_processing_size": null, "dataset_size": 6995497, "size_in_bytes": 6995497}}
dummy/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b26c800abd105c54e58af7d7fb634b5aaea9edb9ab127a932963915cbcc10af0
3
+ size 2634
ms_terms.py ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """The Microsoft Terminology Collection."""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import os
20
+ import xml.etree.ElementTree as ElementTree
21
+
22
+ import datasets
23
+
24
+
25
+ _DESCRIPTION = """\
26
+ The Microsoft Terminology Collection can be used to develop localized versions of applications that integrate with Microsoft products.
27
+ It can also be used to integrate Microsoft terminology into other terminology collections or serve as a base IT glossary
28
+ for language development in the nearly 100 languages available. Terminology is provided in .tbx format, an industry standard for terminology exchange.
29
+ """
30
+
31
+ _LICENSE = """\
32
+ See the Microsoft Language Portal Materials License and the Microsoft Terms of Use for details.
33
+ """
34
+
35
+ _ENTRY_ID = "entry_id"
36
+ _TERM_SOURCE = "term_source"
37
+ _TERM_POS = "pos"
38
+ _TERM_DEFINITION = "definition"
39
+ _TERM_TARGET = "term_target"
40
+
41
+ _FILENAME = "MicrosoftTermCollection.tbx"
42
+
43
+
44
+ class MsTerms(datasets.GeneratorBasedBuilder):
45
+ """The Microsoft Terminology Collection."""
46
+
47
+ VERSION = datasets.Version("1.0.0")
48
+
49
+ @property
50
+ def manual_download_instructions(self):
51
+ return """\
52
+ You need to go to https://www.microsoft.com/en-us/language/terminology,
53
+ and manually download the language of your interest. Once it is completed,
54
+ a file named MicrosoftTermCollection.tbx will be appeared in your Downloads folder
55
+ or whichever folder your browser chooses to save files to.
56
+ You can then move MicrosoftTermCollection.tbx under <path/to/folder>.
57
+ The <path/to/folder> can e.g. be "~/manual_data".
58
+ ms_terms can then be loaded using the following command `datasets.load_dataset("ms_terms", data_dir="<path/to/folder>")`.
59
+ """
60
+
61
+ def _info(self):
62
+ feature_names = [_ENTRY_ID, _TERM_SOURCE, _TERM_POS, _TERM_DEFINITION, _TERM_TARGET]
63
+ return datasets.DatasetInfo(
64
+ description=_DESCRIPTION,
65
+ features=datasets.Features({k: datasets.Value("string") for k in feature_names}),
66
+ supervised_keys=None,
67
+ homepage="https://www.microsoft.com/en-us/language/terminology",
68
+ citation="",
69
+ )
70
+
71
+ def _split_generators(self, dl_manager):
72
+ """Returns SplitGenerators."""
73
+ path_to_manual_file = os.path.join(os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), _FILENAME)
74
+
75
+ if not os.path.exists(path_to_manual_file):
76
+ raise FileNotFoundError(
77
+ "{} does not exist. Make sure you insert a manual dir via `datasets.load_dataset('ms_terms', data_dir=...)` that includes a file name {}. Manual download instructions: {})".format(
78
+ path_to_manual_file, _FILENAME, self.manual_download_instructions
79
+ )
80
+ )
81
+ return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"path": path_to_manual_file})]
82
+
83
+ def _generate_examples(self, path=None, title_set=None):
84
+ tree = ElementTree.parse(path)
85
+ root = tree.getroot()
86
+ for i, entry in enumerate(root.findall(".//termEntry")):
87
+ entry_id = entry.attrib.get("id")
88
+ langsets = entry.findall("./langSet")
89
+ if len(langsets) != 2:
90
+ continue
91
+
92
+ term_source = langsets[0].find(".//term").text
93
+ term_definition = langsets[0].find(".//descrip").text
94
+ term_pos = langsets[0].find(".//termNote").text
95
+ term_target = langsets[1].find(".//term").text
96
+ yield i, {
97
+ _ENTRY_ID: entry_id,
98
+ _TERM_SOURCE: term_source,
99
+ _TERM_POS: term_pos,
100
+ _TERM_DEFINITION: term_definition,
101
+ _TERM_TARGET: term_target,
102
+ }