Datasets:

Tasks:
Other
Modalities:
Text
Languages:
Sinhala
Libraries:
Datasets
License:
parquet-converter commited on
Commit
380a9a8
·
1 Parent(s): ba01429

Update parquet files

Browse files
.gitattributes ADDED
@@ -0,0 +1 @@
 
 
1
+ janes_tag/janes_tag-train.parquet filter=lfs diff=lfs merge=lfs -text
README.md DELETED
@@ -1,20 +0,0 @@
1
- ---
2
- language:
3
- - si
4
- license:
5
- - cc-by-sa-4.0
6
- task_categories:
7
- - other
8
- task_ids:
9
- - lemmatization
10
- - part-of-speech
11
- tags:
12
- - structure-prediction
13
- - normalization
14
- - tokenization
15
- ---
16
- The dataset contains 6273 training samples, 762 validation samples and 749 test samples.
17
- Each sample represents a sentence and includes the following features: sentence ID ('sent\_id'),
18
- list of tokens ('tokens'), list of normalised word forms ('norms'), list of lemmas ('lemmas'),
19
- list of Multext-East tags ('xpos\_tags), list of morphological features ('feats'),
20
- and list of UPOS tags ('upos\_tags'), which are encoded as class labels.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data.zip DELETED
Binary file (857 kB)
 
janes_tag.py DELETED
@@ -1,159 +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
-
16
-
17
- import os
18
-
19
- import datasets
20
-
21
-
22
- _CITATION = ''
23
- _DESCRIPTION = """The dataset contains 6273 training samples, 762 validation samples and 749 test samples.
24
- Each sample represents a sentence and includes the following features: sentence ID ('sent_id'),
25
- list of tokens ('tokens'), list of normalised word forms ('norms'), list of lemmas ('lemmas'),
26
- list of Multext-East tags ('xpos_tags), list of morphological features ('feats'),
27
- and list of UPOS tags ('upos_tags'), which are encoded as class labels.
28
- """
29
- _HOMEPAGE = ''
30
- _LICENSE = ''
31
-
32
- _URL = 'https://huggingface.co/datasets/classla/janes_tag/raw/main/data.zip'
33
- _TRAINING_FILE = 'train_all.conllup'
34
- _DEV_FILE = 'dev_all.conllup'
35
- _TEST_FILE = 'test_all.conllup'
36
- _DATA_DIR = 'data'
37
-
38
-
39
- class JanesTag(datasets.GeneratorBasedBuilder):
40
- VERSION = datasets.Version('1.0.0')
41
-
42
- BUILDER_CONFIGS = [
43
- datasets.BuilderConfig(
44
- name='janes_tag',
45
- version=VERSION,
46
- description=''
47
- )
48
- ]
49
-
50
- def _info(self):
51
- features = datasets.Features(
52
- {
53
- 'sent_id': datasets.Value('string'),
54
- 'tokens': datasets.Sequence(datasets.Value('string')),
55
- 'norms': datasets.Sequence(datasets.Value('string')),
56
- 'lemmas': datasets.Sequence(datasets.Value('string')),
57
- 'xpos_tags': datasets.Sequence(datasets.Value('string')),
58
- 'feats': datasets.Sequence(datasets.Value('string')),
59
- 'upos_tags': datasets.Sequence(
60
- datasets.features.ClassLabel(
61
- names=[
62
- 'SCONJ VERB', 'NOUN', 'NOUN NOUN', 'CCONJ SCONJ', 'ADV X', 'ADJ', 'NOUN NUM', 'ADP VERB',
63
- 'CCONJ', 'SCONJ AUX', 'VERB', 'PRON PRON', 'CCONJ PART', 'ADV ADJ', 'PRON AUX', 'AUX AUX',
64
- 'VERB ADP', 'DET ADJ', 'ADJ NOUN', 'PART PART', 'ADV AUX', 'NOUN ADV', 'PART CCONJ',
65
- 'DET NOUN', 'CCONJ CCONJ', 'ADV', 'NUM', 'AUX NUM', 'ADV DET', 'ADV ADV', 'PRON VERB',
66
- 'ADP PRON', 'DET AUX', 'VERB ADV', 'PROPN PROPN', 'NOUN PROPN', 'ADJ ADP', 'PART AUX',
67
- 'PROPN NOUN', 'PROPN ADV', 'ADP NOUN', 'NUM ADV', 'NOUN ADJ', 'SCONJ', 'PART NOUN',
68
- 'ADV NUM', 'VERB PRON', 'PART ADJ', 'AUX', 'ADP NUM', 'PRON', 'ADP ADJ', 'INTJ', 'ADV VERB',
69
- 'NOUN SYM', 'PART', 'ADV PART', 'DET VERB', 'SCONJ PART', 'ADV SCONJ', 'NOUN CCONJ',
70
- 'NUM DET', 'ADP X', 'INTJ X', 'NOUN VERB', 'PUNCT', 'ADP', 'ADV CCONJ', 'NOUN DET',
71
- 'X NOUN', 'DET', 'PROPN X', 'SYM', 'PROPN NUM', 'PART VERB', 'SYM INTJ', 'ADP ADV',
72
- 'X PROPN', 'X X', 'PROPN', 'ADP DET', 'X', 'AUX ADV', 'NUM NOUN', 'INTJ NOUN', 'AUX PRON',
73
- 'PART ADV', 'PRON ADP', 'INTJ INTJ', 'VERB NOUN', 'NOUN AUX'
74
- ]
75
- )
76
- )
77
- }
78
- )
79
-
80
- return datasets.DatasetInfo(
81
- description=_DESCRIPTION,
82
- features=features,
83
- supervised_keys=None,
84
- homepage=_HOMEPAGE,
85
- license=_LICENSE,
86
- citation=_CITATION,
87
- )
88
-
89
- def _split_generators(self, dl_manager):
90
- """Returns SplitGenerators."""
91
- data_dir = os.path.join(dl_manager.download_and_extract(_URL), _DATA_DIR)
92
-
93
- return [
94
- datasets.SplitGenerator(
95
- name=datasets.Split.TRAIN, gen_kwargs={
96
- 'filepath': os.path.join(data_dir, _TRAINING_FILE),
97
- 'split': 'train'}
98
- ),
99
- datasets.SplitGenerator(
100
- name=datasets.Split.VALIDATION, gen_kwargs={
101
- 'filepath': os.path.join(data_dir, _DEV_FILE),
102
- 'split': 'dev'}
103
- ),
104
- datasets.SplitGenerator(
105
- name=datasets.Split.TEST, gen_kwargs={
106
- 'filepath': os.path.join(data_dir, _TEST_FILE),
107
- 'split': 'test'}
108
- ),
109
- ]
110
-
111
- def _generate_examples(self, filepath, split):
112
- with open(filepath, encoding='utf-8') as f:
113
- sent_id = ''
114
- tokens = []
115
- norms = []
116
- lemmas = []
117
- xpos_tags = []
118
- feats = []
119
- upos_tags = []
120
- data_id = 0
121
- for line in f:
122
- if line and line != '\n' and not line.startswith('# global.columns') and not line.startswith('# text'):
123
- if line.startswith('# sent_id'):
124
- if tokens:
125
- yield data_id, {
126
- 'sent_id': sent_id,
127
- 'tokens': tokens,
128
- 'norms': norms,
129
- 'lemmas': lemmas,
130
- 'xpos_tags': xpos_tags,
131
- 'feats': feats,
132
- 'upos_tags': upos_tags
133
- }
134
- tokens = []
135
- norms = []
136
- lemmas = []
137
- xpos_tags = []
138
- feats = []
139
- upos_tags = []
140
- data_id += 1
141
- sent_id = line.split(' = ')[1].strip()
142
- else:
143
- splits = line.split('\t')
144
- tokens.append(splits[1].strip())
145
- norms.append(splits[2].strip())
146
- lemmas.append(splits[3].strip())
147
- upos_tags.append(splits[4].strip())
148
- xpos_tags.append(splits[5].strip())
149
- feats.append(splits[6].strip())
150
-
151
- yield data_id, {
152
- 'sent_id': sent_id,
153
- 'tokens': tokens,
154
- 'norms': norms,
155
- 'lemmas': lemmas,
156
- 'xpos_tags': xpos_tags,
157
- 'feats': feats,
158
- 'upos_tags': upos_tags
159
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
janes_tag/janes_tag-test.parquet ADDED
Binary file (150 kB). View file
 
janes_tag/janes_tag-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:611130a5796e49eac331273d5ff9ade2e53313a9110fb04fdf0f96eb1e2daf32
3
+ size 1179248
janes_tag/janes_tag-validation.parquet ADDED
Binary file (155 kB). View file