Datasets:
Tasks:
Other
Modalities:
Text
Sub-tasks:
part-of-speech
Languages:
Polish
Size:
10K - 100K
Tags:
structure-prediction
License:
update dataset to new split
Browse files- README.md +52 -48
- nkjp-pos.py +2 -1
README.md
CHANGED
@@ -36,7 +36,7 @@ Part-of-speech tagging (POS tagging) - tagging words in text with their correspo
|
|
36 |
|
37 |
***example**:*
|
38 |
|
39 |
-
[
|
40 |
|
41 |
Measurements:
|
42 |
|
@@ -44,9 +44,8 @@ Measurements:
|
|
44 |
|
45 |
| Subset | Cardinality (sentences) |
|
46 |
| ----------- | ----------------------: |
|
47 |
-
| train |
|
48 |
-
|
|
49 |
-
| test | 8566 |
|
50 |
|
51 |
|
52 |
## Class distribution in train
|
@@ -54,40 +53,40 @@ Measurements:
|
|
54 |
|
55 |
| Class | Fraction of tokens |
|
56 |
|:--------|---------------------:|
|
57 |
-
| subst | 0.
|
58 |
-
| interp | 0.
|
59 |
-
| adj | 0.
|
60 |
-
| prep | 0.
|
61 |
-
| qub | 0.
|
62 |
-
| fin | 0.
|
63 |
-
| praet | 0.
|
64 |
-
| conj | 0.
|
65 |
-
| adv | 0.
|
66 |
-
| inf | 0.
|
67 |
-
| comp | 0.
|
68 |
-
| num | 0.
|
69 |
-
| ppron3 | 0.
|
70 |
-
| ppas | 0.
|
71 |
-
| ger | 0.
|
72 |
-
| brev | 0.
|
73 |
-
| ppron12 | 0.
|
74 |
-
| aglt | 0.
|
75 |
-
| pred | 0.
|
76 |
-
| pact | 0.
|
77 |
-
| bedzie | 0.
|
78 |
-
| pcon | 0.
|
79 |
-
| impt | 0.
|
80 |
-
| siebie | 0.
|
81 |
-
| imps | 0.
|
82 |
-
| interj | 0.
|
83 |
-
| xxx | 0.
|
84 |
-
|
|
85 |
-
|
|
86 |
| adja | 0.00048 |
|
87 |
-
| pant | 0.
|
|
|
|
|
88 |
| depr | 0.00010 |
|
89 |
-
| burk | 0.00010 |
|
90 |
-
| numcol | 0.00010 |
|
91 |
| adjc | 0.00007 |
|
92 |
|
93 |
|
@@ -130,18 +129,23 @@ from datasets import load_dataset
|
|
130 |
dataset = load_dataset("clarin-pl/nkjp-pos")
|
131 |
pprint(dataset['train'][5000])
|
132 |
|
133 |
-
# {'
|
134 |
-
#
|
135 |
-
#
|
136 |
-
#
|
137 |
-
#
|
138 |
-
#
|
139 |
-
#
|
140 |
-
#
|
141 |
-
#
|
142 |
-
#
|
143 |
-
#
|
144 |
-
#
|
|
|
|
|
|
|
|
|
|
|
145 |
```
|
146 |
|
147 |
### Evaluation
|
|
|
36 |
|
37 |
***example**:*
|
38 |
|
39 |
+
['Najwyraźniej', 'źle', 'ocenił', 'odległość', ',', 'bo', 'zderzył', 'się', 'z', 'jadącą', 'z', 'naprzeciwka', 'ciężarową', 'scanią', '.'] → ['qub', 'adv', 'praet', 'subst', 'interp', 'comp', 'praet', 'qub', 'prep', 'pact', 'prep', 'burk', 'adj', 'subst', 'interp']
|
40 |
|
41 |
Measurements:
|
42 |
|
|
|
44 |
|
45 |
| Subset | Cardinality (sentences) |
|
46 |
| ----------- | ----------------------: |
|
47 |
+
| train | 78219 |
|
48 |
+
| test | 7444 |
|
|
|
49 |
|
50 |
|
51 |
## Class distribution in train
|
|
|
53 |
|
54 |
| Class | Fraction of tokens |
|
55 |
|:--------|---------------------:|
|
56 |
+
| subst | 0.27345 |
|
57 |
+
| interp | 0.18101 |
|
58 |
+
| adj | 0.10611 |
|
59 |
+
| prep | 0.09567 |
|
60 |
+
| qub | 0.05670 |
|
61 |
+
| fin | 0.04939 |
|
62 |
+
| praet | 0.04409 |
|
63 |
+
| conj | 0.03711 |
|
64 |
+
| adv | 0.03512 |
|
65 |
+
| inf | 0.01591 |
|
66 |
+
| comp | 0.01476 |
|
67 |
+
| num | 0.01322 |
|
68 |
+
| ppron3 | 0.01111 |
|
69 |
+
| ppas | 0.01086 |
|
70 |
+
| ger | 0.00961 |
|
71 |
+
| brev | 0.00856 |
|
72 |
+
| ppron12 | 0.00670 |
|
73 |
+
| aglt | 0.00629 |
|
74 |
+
| pred | 0.00539 |
|
75 |
+
| pact | 0.00454 |
|
76 |
+
| bedzie | 0.00229 |
|
77 |
+
| pcon | 0.00218 |
|
78 |
+
| impt | 0.00203 |
|
79 |
+
| siebie | 0.00177 |
|
80 |
+
| imps | 0.00174 |
|
81 |
+
| interj | 0.00131 |
|
82 |
+
| xxx | 0.00070 |
|
83 |
+
| adjp | 0.00069 |
|
84 |
+
| winien | 0.00068 |
|
85 |
| adja | 0.00048 |
|
86 |
+
| pant | 0.00012 |
|
87 |
+
| burk | 0.00011 |
|
88 |
+
| numcol | 0.00011 |
|
89 |
| depr | 0.00010 |
|
|
|
|
|
90 |
| adjc | 0.00007 |
|
91 |
|
92 |
|
|
|
129 |
dataset = load_dataset("clarin-pl/nkjp-pos")
|
130 |
pprint(dataset['train'][5000])
|
131 |
|
132 |
+
# {'id': '130-2-900005_morph_49.49-s',
|
133 |
+
# 'pos_tags': [16, 4, 3, 30, 12, 18, 3, 16, 14, 6, 14, 26, 1, 30, 12],
|
134 |
+
# 'tokens': ['Najwyraźniej',
|
135 |
+
# 'źle',
|
136 |
+
# 'ocenił',
|
137 |
+
# 'odległość',
|
138 |
+
# ',',
|
139 |
+
# 'bo',
|
140 |
+
# 'zderzył',
|
141 |
+
# 'się',
|
142 |
+
# 'z',
|
143 |
+
# 'jadącą',
|
144 |
+
# 'z',
|
145 |
+
# 'naprzeciwka',
|
146 |
+
# 'ciężarową',
|
147 |
+
# 'scanią',
|
148 |
+
# '.']}
|
149 |
```
|
150 |
|
151 |
### Evaluation
|
nkjp-pos.py
CHANGED
@@ -70,6 +70,7 @@ _POS_TAGS = {
|
|
70 |
|
71 |
|
72 |
class NKJPPOS(datasets.GeneratorBasedBuilder):
|
|
|
73 |
|
74 |
def _info(self) -> datasets.DatasetInfo:
|
75 |
return datasets.DatasetInfo(
|
@@ -85,7 +86,7 @@ class NKJPPOS(datasets.GeneratorBasedBuilder):
|
|
85 |
}
|
86 |
),
|
87 |
homepage=_HOMEPAGE,
|
88 |
-
version=
|
89 |
)
|
90 |
|
91 |
def _split_generators(
|
|
|
70 |
|
71 |
|
72 |
class NKJPPOS(datasets.GeneratorBasedBuilder):
|
73 |
+
VERSION = datasets.Version("1.1.0")
|
74 |
|
75 |
def _info(self) -> datasets.DatasetInfo:
|
76 |
return datasets.DatasetInfo(
|
|
|
86 |
}
|
87 |
),
|
88 |
homepage=_HOMEPAGE,
|
89 |
+
version=self.VERSION,
|
90 |
)
|
91 |
|
92 |
def _split_generators(
|