@@ -29,12 +29,14 @@ def process_node(self, node):
29
29
'Animacy' : ['Anim' , 'Inan' ],
30
30
'Number' : ['Sing' , 'Plur' ],
31
31
'Case' : ['Nom' , 'Gen' , 'Dat' , 'Ben' , 'Acc' , 'Voc' , 'Loc' , 'Abl' , 'Ins' , 'Cmp' , 'Com' , 'All' ],
32
+ 'Abbr' : ['Yes' ],
32
33
'Foreign' : ['Yes' ],
33
34
'Typo' : ['Yes' ]})
34
35
# ADJECTIVES ###########################################################
35
36
elif node .upos == 'ADJ' :
36
37
self .check_allowed_features (node , {
37
38
'VerbForm' : ['Part' ],
39
+ 'Abbr' : ['Yes' ],
38
40
'Foreign' : ['Yes' ],
39
41
'Typo' : ['Yes' ]})
40
42
# PRONOUNS #############################################################
@@ -43,6 +45,7 @@ def process_node(self, node):
43
45
af = {
44
46
'PronType' : ['Prs' , 'Int' , 'Ind' ], # demonstrative pronouns are treated as third person personal pronouns
45
47
'Case' : ['Nom' , 'Gen' , 'Dat' , 'Ben' , 'Acc' , 'Voc' , 'Loc' , 'Abl' , 'Ins' , 'Cmp' , 'Com' , 'All' ],
48
+ 'Abbr' : ['Yes' ],
46
49
'Typo' : ['Yes' ]
47
50
}
48
51
if node .feats ['PronType' ] == 'Prs' :
@@ -88,13 +91,15 @@ def process_node(self, node):
88
91
self .check_allowed_features (node , {
89
92
'PronType' : ['Art' ],
90
93
'Definite' : ['Ind' ],
94
+ 'Abbr' : ['Yes' ],
91
95
'Typo' : ['Yes' ]
92
96
})
93
97
else :
94
98
self .check_required_features (node , ['PronType' ])
95
99
self .check_allowed_features (node , {
96
100
'PronType' : ['Dem' , 'Int' , 'Rel' , 'Ind' , 'Neg' , 'Tot' ],
97
101
'Deixis' : ['Prox' , 'Remt' ],
102
+ 'Abbr' : ['Yes' ],
98
103
'Typo' : ['Yes' ]
99
104
})
100
105
# NUMERALS #############################################################
@@ -105,6 +110,7 @@ def process_node(self, node):
105
110
self .check_allowed_features (node , {
106
111
'NumType' : ['Card' ],
107
112
'NumForm' : ['Digit' , 'Roman' ],
113
+ 'Abbr' : ['Yes' ],
108
114
'Typo' : ['Yes' ]
109
115
})
110
116
else :
@@ -114,6 +120,7 @@ def process_node(self, node):
114
120
'NumForm' : ['Word' ],
115
121
'Number' : ['Plur' ],
116
122
'Case' : ['Nom' , 'Gen' , 'Dat' , 'Ben' , 'Acc' , 'Voc' , 'Loc' , 'Abl' , 'Ins' , 'Cmp' , 'Com' , 'All' ],
123
+ 'Abbr' : ['Yes' ],
117
124
'Typo' : ['Yes' ]
118
125
})
119
126
# VERBS ################################################################
@@ -125,6 +132,7 @@ def process_node(self, node):
125
132
'Polarity' : ['Pos' , 'Neg' ],
126
133
'Voice' : ['Act' , 'Pass' , 'Cau' ],
127
134
'Foreign' : ['Yes' ],
135
+ 'Abbr' : ['Yes' ],
128
136
'Typo' : ['Yes' ]
129
137
})
130
138
elif node .feats ['VerbForm' ] == 'Fin' :
@@ -140,6 +148,7 @@ def process_node(self, node):
140
148
'Mood' : ['Imp' ],
141
149
'Polarity' : ['Pos' , 'Neg' ],
142
150
'Polite' : ['Infm' , 'Form' ],
151
+ 'Abbr' : ['Yes' ],
143
152
'Foreign' : ['Yes' ],
144
153
'Typo' : ['Yes' ]
145
154
})
@@ -151,6 +160,7 @@ def process_node(self, node):
151
160
'Mood' : ['Nec' ],
152
161
'Polarity' : ['Pos' , 'Neg' ],
153
162
'Voice' : ['Act' , 'Pass' , 'Cau' ],
163
+ 'Abbr' : ['Yes' ],
154
164
'Foreign' : ['Yes' ],
155
165
'Typo' : ['Yes' ]
156
166
})
@@ -163,6 +173,7 @@ def process_node(self, node):
163
173
'Tense' : ['Past' , 'Imp' , 'Pres' , 'Fut' ], # only in indicative
164
174
'Polarity' : ['Pos' , 'Neg' ],
165
175
'Voice' : ['Act' , 'Pass' , 'Cau' ],
176
+ 'Abbr' : ['Yes' ],
166
177
'Foreign' : ['Yes' ],
167
178
'Typo' : ['Yes' ]
168
179
})
@@ -174,6 +185,7 @@ def process_node(self, node):
174
185
'Tense' : ['Past' ],
175
186
'Polarity' : ['Pos' , 'Neg' ],
176
187
'Voice' : ['Act' , 'Pass' , 'Cau' ],
188
+ 'Abbr' : ['Yes' ],
177
189
'Foreign' : ['Yes' ],
178
190
'Typo' : ['Yes' ]
179
191
})
@@ -190,6 +202,7 @@ def process_node(self, node):
190
202
'Voice' : ['Act' , 'Pass' , 'Cau' ],
191
203
# We only annotate case of verbal nouns if it is not Nom, i.e., there is an actual case suffix.
192
204
'Case' : ['Gen' , 'Dat' , 'Ben' , 'Acc' , 'Voc' , 'Loc' , 'Abl' , 'Ins' , 'Cmp' , 'Com' , 'All' ],
205
+ 'Abbr' : ['Yes' ],
193
206
'Foreign' : ['Yes' ],
194
207
'Typo' : ['Yes' ]
195
208
})
@@ -204,6 +217,7 @@ def process_node(self, node):
204
217
'VerbForm' : ['Fin' ],
205
218
'Mood' : ['Imp' ],
206
219
'Polarity' : ['Pos' , 'Neg' ],
220
+ 'Abbr' : ['Yes' ],
207
221
'Typo' : ['Yes' ]
208
222
})
209
223
else : # indicative or subjunctive
@@ -214,6 +228,7 @@ def process_node(self, node):
214
228
'Mood' : ['Ind' , 'Sub' , 'Cnd' ],
215
229
'Tense' : ['Past' , 'Imp' , 'Pres' , 'Fut' ], # only in indicative
216
230
'Polarity' : ['Pos' , 'Neg' ],
231
+ 'Abbr' : ['Yes' ],
217
232
'Typo' : ['Yes' ]
218
233
})
219
234
else : # verbal noun
@@ -228,6 +243,7 @@ def process_node(self, node):
228
243
'Polarity' : ['Pos' , 'Neg' ],
229
244
# We only annotate case of verbal nouns if it is not Nom, i.e., there is an actual case suffix.
230
245
'Case' : ['Gen' , 'Dat' , 'Ben' , 'Acc' , 'Voc' , 'Loc' , 'Abl' , 'Ins' , 'Cmp' , 'Com' , 'All' ],
246
+ 'Abbr' : ['Yes' ],
231
247
'Typo' : ['Yes' ]
232
248
})
233
249
# ADVERBS ##############################################################
@@ -248,13 +264,15 @@ def process_node(self, node):
248
264
# Case suffixes after numbers are separate tokens, they are attached
249
265
# via the 'case' relation and they bear the Case feature (the number does not).
250
266
'Case' : ['Gen' , 'Dat' , 'Ben' , 'Acc' , 'Voc' , 'Loc' , 'Abl' , 'Ins' , 'Cmp' , 'Com' , 'All' ],
267
+ 'Abbr' : ['Yes' ],
251
268
'Typo' : ['Yes' ]})
252
269
# PARTICLES ############################################################
253
270
elif node .upos == 'PART' :
254
271
self .check_allowed_features (node , {
255
272
'Polarity' : ['Neg' ],
273
+ 'Abbr' : ['Yes' ],
256
274
'Typo' : ['Yes' ]
257
275
})
258
276
# THE REST: NO FEATURES ################################################
259
277
else :
260
- self .check_allowed_features (node , {'Typo' : ['Yes' ]})
278
+ self .check_allowed_features (node , {'Abbr' : [ 'Yes' ], ' Typo' : ['Yes' ]})
0 commit comments