asawczyn commited on
Commit
d90b6bd
1 Parent(s): a40731b

update dataset to new split

Browse files
Files changed (2) hide show
  1. README.md +52 -48
  2. 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
- [*'Zarejestruj', 'się', 'jako', 'bezrobotny', '.'*] → [*'impt', 'qub', 'conj', 'subst', 'interp'*]
40
 
41
  Measurements:
42
 
@@ -44,9 +44,8 @@ Measurements:
44
 
45
  | Subset | Cardinality (sentences) |
46
  | ----------- | ----------------------: |
47
- | train | 68528 |
48
- | val | 8566 |
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.27295 |
58
- | interp | 0.18381 |
59
- | adj | 0.10607 |
60
- | prep | 0.09533 |
61
- | qub | 0.05633 |
62
- | fin | 0.04895 |
63
- | praet | 0.04385 |
64
- | conj | 0.03685 |
65
- | adv | 0.03498 |
66
- | inf | 0.01586 |
67
- | comp | 0.01465 |
68
- | num | 0.01319 |
69
- | ppron3 | 0.01090 |
70
- | ppas | 0.01080 |
71
- | ger | 0.00967 |
72
- | brev | 0.00880 |
73
- | ppron12 | 0.00668 |
74
- | aglt | 0.00620 |
75
- | pred | 0.00536 |
76
- | pact | 0.00452 |
77
- | bedzie | 0.00232 |
78
- | pcon | 0.00216 |
79
- | impt | 0.00201 |
80
- | siebie | 0.00175 |
81
- | imps | 0.00172 |
82
- | interj | 0.00128 |
83
- | xxx | 0.00067 |
84
- | winien | 0.00066 |
85
- | adjp | 0.00066 |
86
  | adja | 0.00048 |
87
- | pant | 0.00013 |
 
 
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
- # {'full_pos_tags': ['fin:sg:ter:imperf',
134
- # 'subst:sg:nom:f',
135
- # 'adj:sg:nom:f:pos',
136
- # 'interp'],
137
- # 'lemmas': ['trwać', 'akcja', 'poszukiwawczy', '.'],
138
- # 'morph': ['trwać|fin:sg:ter:imperf',
139
- # 'akcja|subst:sg:nom:f',
140
- # 'poszukiwawczy|adj:sg:nom:f:pos poszukiwawczy|adj:sg:voc:f:pos',
141
- # '.|interp'],
142
- # 'nps': ['', '', 'nps', ''],
143
- # 'pos_tags': [12, 32, 0, 18],
144
- # 'tokens': ['Trwa', 'akcja', 'poszukiwawcza', '.']}
 
 
 
 
 
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=datasets.Version("1.1.0"),
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(