Update bodo-pos-conll.py
Browse files- bodo-pos-conll.py +50 -63
bodo-pos-conll.py
CHANGED
@@ -25,14 +25,12 @@ logger = datasets.logging.get_logger(__name__)
|
|
25 |
|
26 |
|
27 |
_CITATION = """\
|
28 |
-
@inproceedings{
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
url = "https://www.aclweb.org/anthology/W03-0419",
|
35 |
-
pages = "142--147",
|
36 |
}
|
37 |
"""
|
38 |
|
@@ -52,10 +50,10 @@ tagging scheme, whereas the original dataset uses IOB1.
|
|
52 |
For more details see https://www.clips.uantwerpen.be/conll2003/ner/ and https://www.aclweb.org/anthology/W03-0419
|
53 |
"""
|
54 |
|
55 |
-
_URL = "
|
56 |
-
_TRAINING_FILE = "train.txt"
|
57 |
-
_DEV_FILE = "valid.txt"
|
58 |
-
_TEST_FILE = "test.txt"
|
59 |
|
60 |
|
61 |
class Conll2003Config(datasets.BuilderConfig):
|
@@ -74,7 +72,7 @@ class Conll2003(datasets.GeneratorBasedBuilder):
|
|
74 |
"""Conll2003 dataset."""
|
75 |
|
76 |
BUILDER_CONFIGS = [
|
77 |
-
Conll2003Config(name="
|
78 |
]
|
79 |
|
80 |
def _info(self):
|
@@ -87,53 +85,42 @@ class Conll2003(datasets.GeneratorBasedBuilder):
|
|
87 |
"pos_tags": datasets.Sequence(
|
88 |
datasets.features.ClassLabel(
|
89 |
names=[
|
90 |
-
'
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
"UH",
|
127 |
-
"VB",
|
128 |
-
"VBD",
|
129 |
-
"VBG",
|
130 |
-
"VBN",
|
131 |
-
"VBP",
|
132 |
-
"VBZ",
|
133 |
-
"WDT",
|
134 |
-
"WP",
|
135 |
-
"WP$",
|
136 |
-
"WRB",
|
137 |
]
|
138 |
)
|
139 |
),
|
@@ -184,7 +171,7 @@ class Conll2003(datasets.GeneratorBasedBuilder):
|
|
184 |
}
|
185 |
),
|
186 |
supervised_keys=None,
|
187 |
-
homepage="
|
188 |
citation=_CITATION,
|
189 |
)
|
190 |
|
@@ -231,8 +218,8 @@ class Conll2003(datasets.GeneratorBasedBuilder):
|
|
231 |
splits = line.split(" ")
|
232 |
tokens.append(splits[0])
|
233 |
pos_tags.append(splits[1])
|
234 |
-
chunk_tags.append(
|
235 |
-
ner_tags.append(
|
236 |
# last example
|
237 |
if tokens:
|
238 |
yield guid, {
|
|
|
25 |
|
26 |
|
27 |
_CITATION = """\
|
28 |
+
@inproceedings{bododataset2022v1,
|
29 |
+
title = {Bodo Dataset: A comprehensive list of Bodo Datasets},
|
30 |
+
author = {Sanjib Narzary},
|
31 |
+
booktitle = {Alayaran Dataset Repository},
|
32 |
+
url = {http://get.alayaran.com},
|
33 |
+
year = {2022},
|
|
|
|
|
34 |
}
|
35 |
"""
|
36 |
|
|
|
50 |
For more details see https://www.clips.uantwerpen.be/conll2003/ner/ and https://www.aclweb.org/anthology/W03-0419
|
51 |
"""
|
52 |
|
53 |
+
_URL = "http://get.alayaran.com/pos/bodo-pos-conll.zip"
|
54 |
+
_TRAINING_FILE = "train-pos.txt"
|
55 |
+
_DEV_FILE = "valid-pos.txt"
|
56 |
+
_TEST_FILE = "test-pos.txt"
|
57 |
|
58 |
|
59 |
class Conll2003Config(datasets.BuilderConfig):
|
|
|
72 |
"""Conll2003 dataset."""
|
73 |
|
74 |
BUILDER_CONFIGS = [
|
75 |
+
Conll2003Config(name="bodo-pos-conll-2003", version=datasets.Version("1.0.0"), description="Bodo PoS Conll2003 dataset"),
|
76 |
]
|
77 |
|
78 |
def _info(self):
|
|
|
85 |
"pos_tags": datasets.Sequence(
|
86 |
datasets.features.ClassLabel(
|
87 |
names=[
|
88 |
+
'RD_UNK',
|
89 |
+
'DM_DMD',
|
90 |
+
'N_NNV',
|
91 |
+
'QT_QTO',
|
92 |
+
'N_NST',
|
93 |
+
'PR_PRC',
|
94 |
+
'CC_CCS',
|
95 |
+
'RP_NEG',
|
96 |
+
'QT_QTF',
|
97 |
+
'N_NNP',
|
98 |
+
'CC_CCD',
|
99 |
+
'PR_PRQ',
|
100 |
+
'DM_DMR',
|
101 |
+
'QT_QTC',
|
102 |
+
'DM_DMI',
|
103 |
+
'PR_PRF',
|
104 |
+
'RB',
|
105 |
+
'PSP',
|
106 |
+
'V_VAUX_VF',
|
107 |
+
'PR_PRP',
|
108 |
+
'RD_RDF',
|
109 |
+
'RP_RPD',
|
110 |
+
'JJ',
|
111 |
+
'RP_INJ',
|
112 |
+
'V_VM',
|
113 |
+
'V_VM_VF',
|
114 |
+
'PR_PRL',
|
115 |
+
'RD_PUNC',
|
116 |
+
'RP_INTF',
|
117 |
+
'DM_DMQ',
|
118 |
+
'RD_ECH',
|
119 |
+
'RD_SYM',
|
120 |
+
'N_NN',
|
121 |
+
'PR_PRI',
|
122 |
+
'V_VM_VNF',
|
123 |
+
'V_VAUX',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
]
|
125 |
)
|
126 |
),
|
|
|
171 |
}
|
172 |
),
|
173 |
supervised_keys=None,
|
174 |
+
homepage="http://get.alayaran.com",
|
175 |
citation=_CITATION,
|
176 |
)
|
177 |
|
|
|
218 |
splits = line.split(" ")
|
219 |
tokens.append(splits[0])
|
220 |
pos_tags.append(splits[1])
|
221 |
+
chunk_tags.append('-')
|
222 |
+
ner_tags.append('-')
|
223 |
# last example
|
224 |
if tokens:
|
225 |
yield guid, {
|