Interset/Tagset/CS/Ridics.pm untested

filter: Statementstmt 0.0% 0 / 413 Branchbran 0.0% 0 / 174 Conditioncond 0.0% 0 / 60 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 11 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 663 CC 88 SCAR 88.2
CC
88
Cov
0%
encode
7656.0
list
6.0
get_tagset_id
2.0
CRAP 6797.0
1 # ABSTRACT: Driver for the tagset of the Prague Dependency Treebank Consolidated.
2 # Copyright © 2006-2009, 2014, 2016, 2021, 2022 Dan Zeman <zeman@ufal.mff.cuni.cz>
3  
4 package Lingua::Interset::Tagset::CS::Ridics;
5 use strict;
6 use warnings;
7 our $VERSION = '3.015';
8  
9 use utf8;
10 use open ':utf8';
11 use namespace::autoclean;
12 use Moose;
13 extends 'Lingua::Interset::Tagset';
14  
15  
16  
17 has 'atoms' => ( isa => 'HashRef', is => 'ro', builder => '_create_atoms', lazy => 1 );
18  
19  
20  
21 #------------------------------------------------------------------------------
22 # Returns the tagset id that should be set as the value of the 'tagset' feature
23 # during decoding. Every derived class must (re)define this method! The result
24 # should correspond to the last two parts in package name, lowercased.
25 # Specifically, it should be the ISO 639-2 language code, followed by '::' and
26 # a language-specific tagset id. Example: 'cs::multext'.
27 #------------------------------------------------------------------------------
28 sub get_tagset_id
29 {
30 return 'cs::ridics';
31 }
32  
33  
34  
35 #------------------------------------------------------------------------------
36 # Creates atomic drivers for 11 surface features.
37 #------------------------------------------------------------------------------
38 sub _create_atoms
39 {
40 my $self = shift;
41 my %atoms;
42 # 1. PART OF SPEECH ####################
43 $atoms{pos} = $self->create_atom
44 (
45 'surfeature' => 'pos',
46 'decode_map' =>
47 {
48 # noun
49 # examples: pán hrad žena růže město moře
50 'NN' => ['pos' => 'noun'],
51 'N-' => ['pos' => 'noun'],
52 # nominal postfixal segment of a hyphenated compound
53 # examples: upista (in "start-upista"), tunga, timu (final parts of Chinese personal names, inflected according to Czech grammar)
54 'SN' => ['pos' => 'noun', 'other' => 'postfix'],
55 # noun phrase abbreviation ("USA")
56 'BN' => ['pos' => 'noun', 'abbr' => 'yes'],
57 # isolated letter (used as abbreviation?)
58 'Q3' => ['pos' => 'noun', 'abbr' => 'yes', 'other' => 'letter'],
59 # adjective
60 # examples: mladý jarní
61 'AA' => ['pos' => 'adj'],
62 # short form of adjective ("jmenný tvar")
63 # examples: mlád stár zdráv
64 'AC' => ['pos' => 'adj', 'variant' => 'short'],
65 # special adjectives: svůj, nesvůj, tentam
66 # svůj: other usage than possessive reflexive pronoun
67 'AO' => ['pos' => 'adj', 'other' => 'O'],
68 # possessive adjective
69 # examples: otcův matčin
70 'AU' => ['pos' => 'adj', 'poss' => 'yes'],
71 # adjective derived from present transgressive of verb
72 # examples: dělající
73 'AG' => ['pos' => 'adj', 'verbform' => 'part', 'tense' => 'pres', 'voice' => 'act', 'aspect' => 'imp'],
74 # adjective derived from past transgressive of verb
75 # examples: udělavší
76 'AM' => ['pos' => 'adj', 'verbform' => 'part', 'tense' => 'past', 'voice' => 'act', 'aspect' => 'perf'],
77 # prefixal segment of a hyphenated compound
78 # examples: česko (in "česko-slovenský"), sci (in "sci-fi")
79 'S2' => ['pos' => 'adj', 'hyph' => 'yes'],
80 # adjectival postfixal segment of a hyphenated compound
81 # examples: upový (in "start-upový"), tého, line (in "on-line")
82 'SA' => ['pos' => 'adj', 'other' => 'postfix'],
83 # adjectival phrase abbreviation ("aj")
84 'BA' => ['pos' => 'adj', 'abbr' => 'yes'],
85 # personal pronoun
86 # examples: já ty my vy
87 'PP' => ['pos' => 'noun', 'prontype' => 'prs'],
88 # personal pronoun, short inflected variant
89 # examples: mě mi ti
90 'PH' => ['pos' => 'noun', 'prontype' => 'prs', 'variant' => 'short'],
91 # personal pronoun, 3rd person
92 # example: on něj
93 'PE' => ['pos' => 'noun', 'prontype' => 'prs'],
94 # personal pronoun, 3rd person, short inflected variant
95 # examples: mu
96 'P5' => ['pos' => 'noun', 'prontype' => 'prs', 'variant' => 'short'],
97 # compound preposition + personal pronoun
98 # examples: naň ("na něj")
99 'P0' => ['pos' => 'noun', 'prontype' => 'prs', 'adpostype' => 'preppron'],
100 # reflexive personal pronoun, long form
101 # examples: sebe sobě sebou
102 'P6' => ['pos' => 'noun', 'prontype' => 'prs', 'reflex' => 'yes'],
103 # reflexive personal pronoun, short form
104 # examples: se si ses sis
105 'P7' => ['pos' => 'noun', 'prontype' => 'prs', 'reflex' => 'yes', 'variant' => 'short'],
106 # possessive pronoun, 1st or 2nd person
107 # examples: můj tvůj náš váš
108 'PS' => ['pos' => 'adj', 'prontype' => 'prs', 'poss' => 'yes'],
109 # possessive pronoun, 3rd person
110 # examples: jeho, její, jejich
111 'P9' => ['pos' => 'adj', 'prontype' => 'prs', 'poss' => 'yes'],
112 # reflexive possessive pronoun
113 # examples: svůj
114 'P8' => ['pos' => 'adj', 'prontype' => 'prs', 'poss' => 'yes', 'reflex' => 'yes'],
115 # demonstrative pronoun
116 # examples: ten tento tenhle onen takový týž tentýž sám
117 ###!!! Syntactically they are often adjectives but not always ("to auto je moje" vs. "to je moje").
118 'PD' => ['pos' => 'adj', 'prontype' => 'dem'],
119 # interrogative or relative pronoun, no gender inflection
120 # examples: kdo co kdož copak
121 'PQ' => ['pos' => 'noun', 'prontype' => 'int|rel'],
122 # interrogative or relative pronoun, with gender (i.e., not only attributive, unlike in cs::pdt, which did not include "jenž" here!)
123 # examples: jaký který čí jenž
124 'P4' => ['pos' => 'adj|noun', 'prontype' => 'int|rel'],
125 # possessive relative pronoun
126 # examples: jehož jejíž
127 'P1' => ['pos' => 'adj', 'prontype' => 'rel', 'poss' => 'yes'],
128 # indefinite pronoun, no gender inflection
129 # examples: někdo něco kdokoli kdosi cosi nevímco
130 'PK' => ['pos' => 'noun', 'prontype' => 'ind'],
131 # indefinite pronoun, attributive
132 # examples: nějaký některý něčí čísi sotvakterý
133 'PZ' => ['pos' => 'adj', 'prontype' => 'ind'],
134 # total pronoun
135 # examples: všechen sám
136 'PL' => ['pos' => 'noun', 'prontype' => 'tot'],
137 # negative pronoun, no gender inflection
138 # examples: nikdo nic
139 'PY' => ['pos' => 'noun', 'prontype' => 'neg'],
140 # negative pronoun, attributive
141 # examples: nijaký ničí žádný
142 'PW' => ['pos' => 'adj', 'prontype' => 'neg'],
143 # cardinal number expressed by digits
144 # examples: 1 3,14 2014
145 'C=' => ['pos' => 'num', 'numtype' => 'card', 'numform' => 'digit'],
146 # cardinal number expressed by Roman numerals
147 # examples: MCMLXXI
148 # { ... syntax highlighting
149 'C}' => ['pos' => 'num', 'numtype' => 'card', 'numform' => 'roman'],
150 # interrogative or relative cardinal numeral
151 # example: kolik
152 'C?' => ['pos' => 'num', 'numtype' => 'card', 'prontype' => 'int|rel'],
153 # indefinite or demonstrative cardinal numeral
154 # examples: několik mnoho málo kdovíkolik tolik
155 'Ca' => ['pos' => 'num', 'numtype' => 'card', 'prontype' => 'ind|dem'],
156 # adjectival multiplicative numeral "twofold" (note: these words are included in generic numerals in the Czech grammar)
157 # examples: obojí dvojí trojí
158 # generic adjectival numeral (number of sets of things)
159 # examples: jedny oboje dvoje troje (čtvery patery desatery?)
160 # "oboje", "dvoje" and "troje" appear in the corpus as "Cd" and the feature variant=1 distinguishes them from "obojí", "dvojí" and "trojí".
161 # Larger numerals of this type ("čtvery", "patery" etc.) do not appear in the corpus.
162 'Cd' => ['pos' => 'adj', 'numtype' => 'mult|sets'],
163 # generic adjectival numeral (number of sets of things), indefinite
164 # examples: několikerý
165 'Ch' => ['pos' => 'adj', 'numtype' => 'sets', 'prontype' => 'ind'],
166 # generic cardinal numeral
167 # examples: čtvero patero desatero
168 # This tag is documented in the tagset but it does not occur in the PDT.
169 'Cj' => ['pos' => 'num', 'numtype' => 'card', 'other' => {'numtype' => 'generic'}],
170 # ordinal suffix as a separate token
171 # only one occurrence in the corpus: tých ("posledně v letech 60 tých" = "posledně v letech šedesátých")
172 # Syntactic analysis of the above example is Atr(letech, tých); Atr(tých, 60).
173 # Hence we can say that the suffix works as an adjective.
174 'Ck' => ['pos' => 'adj', 'numtype' => 'ord', 'other' => {'numtype' => 'suffix'}],
175 # cardinal numeral, low value (agrees with counted noun)
176 # examples: jeden dva tři čtyři
177 'Cl' => ['pos' => 'num', 'numtype' => 'card', 'numform' => 'word', 'numvalue' => '1|2|3'],
178 # cardinal numeral, high value (in nominative, accusative and vocative behaves like a noun and the counted noun must be in genitive)
179 # examples: pět šest sedm sto
180 'Cn' => ['pos' => 'num', 'numtype' => 'card', 'numform' => 'word'],
181 # indefinite multiplicative numeral
182 # examples: několikrát mnohokrát tolikrát kolikrát nesčíslněkrát
183 'Co' => ['pos' => 'adv', 'numtype' => 'mult', 'prontype' => 'ind|dem'],
184 # ordinal numeral (adjectival)
185 # examples: první druhý třetí stý tisící
186 # (Note: "poprvé" is another type of ordinal numeral, it behaves syntactically as adverb.
187 # It is tagged 'Cv', together with multiplicative numerals ("jedenkrát"), which are also syntactic adverbs.)
188 'Cr' => ['pos' => 'adj', 'numtype' => 'ord'],
189 # interrogative or relative multiplicative numeral
190 # examples: kolikrát
191 'Cu' => ['pos' => 'adv', 'numtype' => 'mult', 'prontype' => 'int|rel'],
192 # multiplicative numeral or adverbial ordinal numeral
193 # examples: jedenkrát dvakrát třikrát stokrát tisíckrát
194 # examples: poprvé podruhé potřetí posté potisící
195 'Cv' => ['pos' => 'adv', 'numtype' => 'mult'],
196 # Two different types of agreeing adjectival indefinite numerals are tagged 'Cw':
197 # indefinite numeral "nejeden" = lit. "not one" = "more than one"
198 # examples: nejeden
199 # indefinite or demonstrative adjectival ordinal numeral
200 # examples: několikátý, mnohý, tolikátý
201 'Cw' => ['pos' => 'adj', 'numtype' => 'ord', 'prontype' => 'ind|dem'],
202 # cardinal numeral, fraction denominator
203 # examples: polovina třetina čtvrtina setina tisícina
204 # These words behave morphologically and syntactically as feminine nouns of the paradigm "žena".
205 # (Note that the fraction words "půl" and "čtvrt" are not tagged "Cy".)
206 'Cy' => ['pos' => 'num', 'numtype' => 'frac'],
207 # interrogative or relative ordinal numeral
208 # examples: kolikátý
209 'Cz' => ['pos' => 'adj', 'numtype' => 'ord', 'prontype' => 'int|rel'],
210 # adjectival postfixal segment of a hyphenated compound
211 # examples: ti (in "755-ti")
212 'Sl' => ['pos' => 'adj', 'other' => 'postfix', 'numtype' => 'card', 'numform' => 'word'],
213 # verb infinitive
214 # examples: nést dělat říci
215 'Vf' => ['pos' => 'verb', 'verbform' => 'inf'],
216 # verb supine
217 # example: modlit (infinitive: modliti), hledat (infinitive: hledati)
218 'V$' => ['pos' => 'verb', 'verbform' => 'sup'],
219 # finite verb, present or future indicative
220 # examples: nesu beru mažu půjdu
221 'VB' => ['pos' => 'verb', 'verbform' => 'fin', 'mood' => 'ind', 'tense' => 'pres'], # tense may be later overwritten by 'fut'
222 # finite verb, present or future indicative with encliticized 'neboť'
223 # examples: dělámť děláť
224 'Vt' => ['pos' => 'verb', 'verbform' => 'fin', 'mood' => 'ind', 'tense' => 'pres', 'voice' => 'act', 'verbtype' => 'verbconj'],
225 # finite verb, simple past (aorist or imperfect) indicative
226 # examples: bieše, vecě, prosiechu
227 'V-' => ['pos' => 'verb', 'verbform' => 'fin', 'mood' => 'ind', 'tense' => 'past'], # tense may be later overwritten by 'imp'
228 # verb imperative
229 # examples: nes dělej řekni
230 'Vi' => ['pos' => 'verb', 'verbform' => 'fin', 'mood' => 'imp'],
231 # conditional auxiliary verb form (evolved from aorist of 'to be')
232 # examples: bych bys by bychom byste
233 'Vc' => ['pos' => 'verb', 'verbform' => 'fin', 'mood' => 'cnd'],
234 # verb active participle
235 # examples: dělal dělala dělalo dělali dělaly dělals dělalas ...
236 'Vp' => ['pos' => 'verb', 'verbform' => 'part', 'tense' => 'past', 'voice' => 'act'],
237 # verb active participle with encliticized 'neboť'
238 # examples: dělalť dělalať dělaloť ...
239 'Vq' => ['pos' => 'verb', 'verbform' => 'part', 'tense' => 'past', 'voice' => 'act', 'verbtype' => 'verbconj'],
240 # verb passive participle
241 # examples: dělán dělána děláno děláni dělány udělán udělána
242 'Vs' => ['pos' => 'verb', 'verbform' => 'part', 'voice' => 'pass'],
243 # verb present transgressive (converb, gerund, přechodník)
244 # examples: nesa nesouc nesouce dělaje dělajíc dělajíce
245 'Ve' => ['pos' => 'verb', 'verbform' => 'conv', 'tense' => 'pres', 'aspect' => 'imp', 'voice' => 'act'],
246 # verb past transgressive (converb, gerund, přechodník)
247 # examples: udělav udělavši udělavše přišed přišedši přišedše
248 'Vm' => ['pos' => 'verb', 'verbform' => 'conv', 'tense' => 'past', 'aspect' => 'perf', 'voice' => 'act'],
249 # adverb
250 'D-' => ['pos' => 'adv'],
251 # adverb with degree of comparison and polarity
252 # examples: málo chytře
253 'Dg' => ['pos' => 'adv'],
254 # adverb without degree of comparison and polarity
255 # examples: kde kam kdy jak tady dnes
256 'Db' => ['pos' => 'adv'],
257 # adverbial postfixal segment of a hyphenated compound
258 # examples: line (in "on-line")
259 'Sb' => ['pos' => 'adv', 'other' => 'postfix'],
260 # adverbial phrase abbreviation ("atd")
261 'Bb' => ['pos' => 'adv', 'abbr' => 'yes'],
262 # preposition
263 # examples: v pod k
264 'RR' => ['pos' => 'adp', 'adpostype' => 'prep'],
265 'R-' => ['pos' => 'adp', 'adpostype' => 'prep'],
266 # vocalized preposition
267 # examples: ve pode ke ku
268 'RV' => ['pos' => 'adp', 'adpostype' => 'voc'],
269 # first part of compound preposition
270 # examples: nehledě na, vzhledem k
271 'RF' => ['pos' => 'adp', 'adpostype' => 'comprep'],
272 # conjunction
273 'J-' => ['pos' => 'conj'],
274 # coordinating conjunction
275 # examples: a i ani nebo ale avšak
276 'J^' => ['pos' => 'conj', 'conjtype' => 'coor'],
277 # subordinating conjunction
278 # examples: že, aby, zda, protože, přestože
279 'J,' => ['pos' => 'conj', 'conjtype' => 'sub'],
280 # mathematical conjunction (the word 'times' in 'five times')
281 # examples: krát
282 'J*' => ['pos' => 'conj', 'conjtype' => 'oper'],
283 # conjunction phrase abbreviation ("tzn")
284 'B^' => ['pos' => 'conj', 'conjtype' => 'coor', 'abbr' => 'yes'],
285 # particle
286 # examples: ať kéž nechť
287 'TT' => ['pos' => 'part'],
288 'T-' => ['pos' => 'part'],
289 # interjection
290 # examples: haf bum bác
291 'II' => ['pos' => 'int'],
292 'I-' => ['pos' => 'int'],
293 # punctuation
294 # examples: . ? ! , ; : -
295 'Z:' => ['pos' => 'punc'],
296 # artificial root node of the sentence
297 # examples: #
298 "Z\#" => ['pos' => 'punc', 'punctype' => 'root'],
299 # foreign word
300 'F%' => ['foreign' => 'yes'],
301 # X: unknown part of speech
302 # unrecognized word form
303 'X@' => ['other' => '@'],
304 # word form recognized but tag is missing in dictionary
305 'XX' => ['other' => 'X'],
306 # - should never appear as subpos but it does, even in the list in b2800a.o2f
307 'X-' => ['other' => '-']
308 },
309 'encode_map' => {} # Encoding of part of speech must be solved directly in Perl code, it would be too complicated to do it here.
310 );
311 # 2. GENDER ####################
312 $atoms{gender} = $self->create_atom
313 (
314 'surfeature' => 'gender',
315 'decode_map' =>
316 {
317 'M' => ['gender' => 'masc', 'animacy' => 'anim'],
318 'I' => ['gender' => 'masc', 'animacy' => 'inan'],
319 'F' => ['gender' => 'fem'],
320 'N' => ['gender' => 'neut'],
321 'Y' => ['gender' => 'masc'],
322 'T' => ['gender' => 'masc|fem', 'animacy' => 'inan|'],
323 'W' => ['gender' => 'masc|neut', 'animacy' => 'inan|'],
324 'H' => ['gender' => 'fem|neut'],
325 'Q' => ['gender' => 'fem|neut'],
326 'Z' => ['gender' => 'masc|neut'],
327 'X' => []
328 },
329 'encode_map' =>
330  
331 { 'gender' => { 'fem|masc' => 'T',
332 'fem|neut' => { 'number' => { 'plur|sing' => 'Q',
333 'sing' => 'H',
334 'plur' => 'H',
335 '@' => 'H' }},
336 'masc|neut' => { 'animacy' => { 'inan' => 'W',
337 '@' => 'Z' }},
338 'masc' => { 'animacy' => { '' => 'Y',
339 'inan' => 'I',
340 '@' => 'M' }},
341 'fem' => 'F',
342 'neut' => 'N' }}
343 );
344 # 3. NUMBER ####################
345 $atoms{number} = $self->create_atom
346 (
347 'surfeature' => 'number',
348 'decode_map' =>
349 {
350 'S' => ['number' => 'sing'],
351 'D' => ['number' => 'dual'],
352 'P' => ['number' => 'plur'],
353 'W' => ['number' => 'sing|plur'],
354 'X' => []
355 },
356 'encode_map' =>
357  
358 # Do not generate number for conditional auxiliaries. It is encoded as aggregate there.
359 { 'mood' => { 'cnd' => '',
360 '@' => { 'number' => { 'plur|sing' => 'W',
361 'dual' => 'D',
362 'plur' => 'P',
363 'sing' => 'S' }}}}
364 );
365 # 4. CASE ####################
366 $atoms{case} = $self->create_simple_atom
367 (
368 'intfeature' => 'case',
369 'simple_decode_map' =>
370 {
371 '1' => 'nom',
372 '2' => 'gen',
373 '3' => 'dat',
374 '4' => 'acc',
375 '5' => 'voc',
376 '6' => 'loc',
377 '7' => 'ins'
378 }
379 );
380 # 5. POSSGENDER ####################
381 $atoms{possgender} = $self->create_atom
382 (
383 'surfeature' => 'possgender',
384 'decode_map' =>
385 {
386 'M' => ['possgender' => 'masc'],
387 'F' => ['possgender' => 'fem'],
388 'N' => ['possgender' => 'neut'],
389 'Y' => ['possgender' => 'masc'],
390 'Z' => ['possgender' => 'masc|neut'],
391 },
392 'encode_map' =>
393  
394 { 'possgender' => { 'masc|neut' => 'Z',
395 'masc' => { 'prontype' => { '' => 'M',
396 '@' => 'Y' }},
397 'fem' => 'F',
398 'neut' => 'N' }}
399 );
400 # 6. POSSNUMBER ####################
401 $atoms{possnumber} = $self->create_simple_atom
402 (
403 'intfeature' => 'possnumber',
404 'simple_decode_map' =>
405 {
406 'S' => 'sing',
407 'P' => 'plur'
408 }
409 );
410 # 7. PERSON ####################
411 $atoms{person} = $self->create_atom
412 (
413 'surfeature' => 'person',
414 'decode_map' =>
415 {
416 '1' => ['person' => '1'],
417 '2' => ['person' => '2'],
418 '3' => ['person' => '3']
419 },
420 'encode_map' =>
421  
422 # Do not generate person for conditional auxiliaries. It is encoded as aggregate there.
423 { 'mood' => { 'cnd' => '',
424 '@' => { 'person' => { '1' => '1',
425 '2' => '2',
426 '3' => '3' }}}}
427 );
428 # 8. TENSE ####################
429 $atoms{tense} = $self->create_atom
430 (
431 'surfeature' => 'tense',
432 'decode_map' =>
433 {
434 'A' => ['tense' => 'past'], # aorist
435 'I' => ['tense' => 'imp'], # imperfekt
436 'R' => ['tense' => 'past'],
437 'H' => ['tense' => 'past|pres'],
438 'P' => ['tense' => 'pres'],
439 'F' => ['tense' => 'fut'],
440 },
441 'encode_map' =>
442  
443 # Do not encode tense of verbal adjectives and transgressives. Otherwise encode(decode(x)) will not equal to x.
444 { 'pos' => { 'adj' => '',
445 '@' => { 'verbform' => { 'conv' => '',
446 'fin' => { 'tense' => { 'past' => 'A',
447 'imp' => 'I',
448 'fut' => 'F',
449 'pres' => 'P' }},
450 '@' => { 'tense' => { 'past|pres' => 'H',
451 'past' => 'R',
452 'fut' => 'F',
453 'pres' => 'P' }}}}}}
454 );
455 # 9. DEGREE ####################
456 $atoms{degree} = $self->create_simple_atom
457 (
458 'intfeature' => 'degree',
459 'simple_decode_map' =>
460 {
461 '1' => 'pos',
462 '2' => 'cmp',
463 '3' => 'sup'
464 }
465 );
466 # 10. POLARITY ####################
467 $atoms{polarity} = $self->create_atom
468 (
469 'surfeature' => 'polarity',
470 'decode_map' =>
471 {
472 'A' => ['polarity' => 'pos'],
473 'N' => ['polarity' => 'neg']
474 },
475 'encode_map' =>
476  
477 # Do not encode polarity of negative pronouns. Otherwise encode(decode(x)) will not equal to x.
478 { 'prontype' => { 'neg' => '',
479 '@' => { 'polarity' => { 'pos' => 'A',
480 'neg' => 'N' }}}}
481 );
482 # 11. VOICE ####################
483 $atoms{voice} = $self->create_atom
484 (
485 'surfeature' => 'voice',
486 'decode_map' =>
487 {
488 'A' => ['voice' => 'act'],
489 'P' => ['voice' => 'pass']
490 },
491 'encode_map' =>
492  
493 # Do not encode voice of verbal adjectives and transgressives. Otherwise encode(decode(x)) will not equal to x.
494 { 'pos' => { 'adj' => '',
495 '@' => { 'verbform' => { 'conv' => '',
496 '@' => { 'voice' => { 'act' => 'A',
497 'pass' => 'P' }}}}}}
498 );
499 # 12. ASPECT ####################
500 $atoms{aspect} = $self->create_atom
501 (
502 'surfeature' => 'aspect',
503 'decode_map' =>
504 {
505 'P' => ['aspect' => 'perf'], # napsat
506 'I' => ['aspect' => 'imp'], # psát
507 'B' => ['aspect' => 'imp|perf'] # absolvovat
508 },
509 'encode_map' =>
510  
511 # Do not encode aspect of verbal adjectives. Otherwise encode(decode(x)) will not equal to x.
512 { 'pos' => { 'adj' => '',
513 '@' => { 'aspect' => { 'imp|perf' => 'B',
514 'imp' => 'I',
515 'perf' => 'P' }}}}
516 );
517 # 13. AGGREGATE ####################
518 $atoms{aggregate} = $self->create_atom
519 (
520 'surfeature' => 'aggregate',
521 'decode_map' =>
522 {
523 # In PDT-C, unlike in previous versions of PDT, the conditional forms of the auxiliary 'být'
524 # are analyzed as aggregates (contractions) of 'by' ('aby', 'kdyby') and the present form ('jsem', 'jsi', 'jsme', 'jste').
525 # Nevertheless, the aggregate 's' also includes other aggregates with -s = jsi.
526 'c' => ['person' => '1', 'number' => 'sing'], # bych, bysem
527 's' => ['person' => '2', 'number' => 'sing'], # bys, přišels, kdyžs
528 'm' => ['person' => '1', 'number' => 'plur'], # bychom, bysme
529 'e' => ['person' => '2', 'number' => 'plur'] # byste
530 },
531 'encode_map' =>
532  
533 # Since this currently occurs mostly with conditional verbs, we do not want to do it for personal pronouns
534 # (which always have person and number). However, in the future we may need to be able to use it with
535 # pronouns 'tys', 'ses', and 'sis'. We also do not want to generate this with present indicative verbs.
536 { 'pos' => { 'verb' => { 'mood' => { 'cnd' => { 'number' => { 'sing' => { 'person' => { '1' => 'c',
537 '2' => 's' }},
538 'plur' => { 'person' => { '1' => 'm',
539 '2' => 'e' }}}}}}}}
540 );
541 # 14. VARIANT ####################
542 $atoms{variant} = $self->create_atom
543 (
544 'surfeature' => 'variant',
545 'decode_map' =>
546 {
547 '0' => ['variant' => '0'], # 0 does not occur in the data. Dash ('-') is the neutral value for standard contemporary style
548 '1' => ['variant' => '1'], # standard variant: orli, myslet, jejž
549 # Unlike in cs::pdt, variants 2-4 are not necessarily archaic. For example, the personal pronoun forms used before preposition (něj, něhož etc.) get one of these variants.
550 '2' => ['variant' => '2'], # standard variant: mysliti, nějž
551 '3' => ['variant' => '3'], # standard variant: mysleti, něhož
552 '4' => ['variant' => '4'], # standard variant: pomažemť
553 '5' => ['variant' => '5', 'style' => 'coll'], # non-standard variant: přídeme
554 '6' => ['variant' => '6', 'style' => 'coll'], # non-standard variant: přijdem
555 '7' => ['variant' => '7', 'style' => 'coll'], # non-standard variant: přídem
556 '8' => ['variant' => '8', 'style' => 'coll'], # non-standard variant: příjdeme
557 '9' => ['variant' => '9', 'typo' => 'yes'], # non-standard variant, misspelling: příjdem
558 'b' => ['variant' => 'b', 'abbr' => 'yes'], # abbreviated form: s (= sekunda)
559 'a' => ['variant' => 'a', 'abbr' => 'yes'], # other abbreviated form: sec (= sekunda)
560 'c' => ['variant' => 'c', 'abbr' => 'yes'] # other abbreviated form: sek (= sekunda)
561 },
562 'encode_map' =>
563  
564 { 'variant' => { '0' => '0',
565 '1' => '1',
566 '2' => '2',
567 '3' => '3',
568 '4' => '4',
569 '5' => '5',
570 '6' => '6',
571 '7' => '7',
572 '8' => '8',
573 '9' => '9',
574 'a' => 'a',
575 'b' => 'b',
576 'c' => 'c',
577 # We cannot take abbreviation into account here because it would conflict with the old encoding of abbreviations in SUBPOS.
578 '@' => { 'style' => { 'arch' => '2',
579 'coll' => '5' }}}}
580 );
581 return \%atoms;
582 }
583  
584  
585  
586 #------------------------------------------------------------------------------
587 # Decodes a physical tag (string) and returns the corresponding feature
588 # structure.
589 #------------------------------------------------------------------------------
590 sub decode
591 {
592 my $self = shift;
593 my $tag = shift;
594 my $fs = Lingua::Interset::FeatureStructure->new();
595 $fs->set_tagset('cs::ridics');
596 my $atoms = $self->atoms();
597 my @chars = split(//, $tag);
598 $atoms->{pos}->decode_and_merge_hard($chars[0].$chars[1], $fs);
599 $atoms->{gender}->decode_and_merge_hard($chars[2], $fs);
600 $atoms->{number}->decode_and_merge_hard($chars[3], $fs);
601 $atoms->{case}->decode_and_merge_hard($chars[4], $fs);
602 $atoms->{possgender}->decode_and_merge_hard($chars[5], $fs);
603 $atoms->{possnumber}->decode_and_merge_hard($chars[6], $fs);
604 $atoms->{person}->decode_and_merge_hard($chars[7], $fs);
605 $atoms->{tense}->decode_and_merge_hard($chars[8], $fs);
606 $atoms->{degree}->decode_and_merge_hard($chars[9], $fs);
607 $atoms->{polarity}->decode_and_merge_hard($chars[10], $fs);
608 $atoms->{voice}->decode_and_merge_hard($chars[11], $fs);
609 $atoms->{aggregate}->decode_and_merge_hard($chars[13], $fs);
610 $atoms->{variant}->decode_and_merge_hard($chars[14], $fs);
611 $atoms->{aspect}->decode_and_merge_hard($chars[15], $fs);
612 return $fs;
613 }
614  
615  
616  
617 #------------------------------------------------------------------------------
618 # Takes feature structure and returns the corresponding physical tag (string).
619 #------------------------------------------------------------------------------
620 sub encode
621 {
622 my $self = shift;
623 my $fs = shift; # Lingua::Interset::FeatureStructure
624 my $tag = '';
625 # pos and subpos
626 # Foreign words must come first because then we do not care about the foreign part of speech, if present.
627 if($fs->is_foreign())
628 {
629 $tag = 'F%---------------';
630 }
631 # Numerals and pronouns must come first because they can be at the same time also nouns or adjectives.
632 elsif($fs->is_numeral())
633 {
634 if($fs->numform() eq 'digit')
635 {
636 $tag = 'C=---------------';
637 }
638 elsif($fs->numform() eq 'roman')
639 { #{
640 $tag = 'C}---------------';
641 }
642 elsif($fs->numtype() eq 'card')
643 {
644 if($fs->is_wh())
645 {
646 # kolik
647 $tag = 'C?---------------';
648 }
649 elsif($fs->contains('prontype', 'ind') || $fs->contains('prontype', 'dem'))
650 {
651 # několik, mnoho, málo, tolik
652 $tag = 'Ca--X------------';
653 }
654 # certain "generic" numerals (druhové číslovky) are classified as cardinals
655 elsif($fs->get_other_subfeature('cs::ridics', 'numtype') eq 'generic')
656 {
657 # čtvero, patero, desatero
658 $tag = 'Cj---------------';
659 }
660 elsif(scalar(grep {m/^[123]$/} ($fs->get_list('numvalue')))>=1)
661 {
662 # jeden, jedna, jedno, dva, dvě, tři, čtyři
663 $tag = 'Cl-XX------------';
664 }
665 else
666 {
667 # pět, deset, patnáct, devadesát, sto
668 $tag = 'CnXXX------------';
669 }
670 }
671 elsif($fs->numtype() eq 'ord')
672 {
673 if($fs->is_wh())
674 {
675 # kolikátý
676 $tag = 'CzXXX------------';
677 }
678 elsif($fs->contains('prontype', 'ind') || $fs->contains('prontype', 'dem'))
679 {
680 # několikátý, mnohý, tolikátý
681 # but also: nejeden
682 $tag = 'CwXXX------------';
683 }
684 elsif($fs->get_other_subfeature('cs::ridics', 'numtype') eq 'suffix' ||
685 $fs->gender() eq '' && $fs->number() ne '')
686 {
687 # tých
688 $tag = 'Ck-XX------------';
689 }
690 else
691 {
692 $tag = 'CrXXX------------';
693 }
694 }
695 elsif($fs->numtype() eq 'mult')
696 {
697 if($fs->is_wh())
698 {
699 # kolikrát
700 $tag = 'Cu---------------';
701 }
702 elsif($fs->contains('prontype', 'ind') || $fs->contains('prontype', 'dem'))
703 {
704 # několikrát, mnohokrát, tolikrát
705 $tag = 'Co---------------';
706 }
707 else
708 {
709 $tag = 'Cv---------------'; ###!!! pozor tohle jsou i řadové číslovky příslovečné (poprvé, podruhé...)
710 }
711 }
712 elsif($fs->numtype() eq 'frac')
713 {
714 $tag = 'Cy---------------';
715 }
716 elsif($fs->numtype() eq 'sets' && $fs->contains('prontype', 'ind'))
717 {
718 # několikerý
719 $tag = 'Ch---------------';
720 # "nejedny" is indefinite numeral and has its own tag 'Cw'.
721 # "oboje", "dvoje", "troje" (and "čtvery", "patery", "desatery"?) are included in "Cd", together with "obojí", "dvojí", "trojí".
722 }
723 else
724 {
725 # obojí, dvojí, trojí (both-fold, twofold, three-fold)
726 # oboje, dvoje, troje (both sets of, two sets of, three sets of)
727 # The latter are distinguished by variant=1.
728 $tag = 'CdX--------------';
729 }
730 }
731 elsif($fs->is_pronominal())
732 {
733 # possessive pronoun
734 if($fs->is_possessive())
735 {
736 if($fs->is_wh())
737 {
738 # jehož, jejíž, jejichž
739 # it has possgender if it is 3rd person
740 if($fs->person() eq '3')
741 {
742 $tag = 'P1XXXX-----------';
743 }
744 else
745 {
746 $tag = 'P1XXX------------';
747 }
748 }
749 elsif($fs->is_reflexive())
750 {
751 # svůj
752 $tag = 'P8XXX------------';
753 }
754 else
755 {
756 # můj, tvůj, jeho, její, náš, váš, jejich
757 # it has possgender if it is 3rd person
758 if($fs->person() eq '3')
759 {
760 $tag = 'P9XXXXX----------';
761 }
762 else
763 {
764 $tag = 'PSXXX-X----------';
765 }
766 }
767 }
768 # personal pronoun
769 elsif($fs->adpostype() eq 'preppron')
770 {
771 $tag = 'P0---------------'; # oň, naň
772 }
773 elsif($fs->prontype() eq 'prs')
774 {
775 if(!$fs->is_reflexive())
776 {
777 if($fs->variant() eq 'short')
778 {
779 # mi, mě, ti, tě, mu
780 # it has gender if it is 3rd person
781 if($fs->person() eq '3')
782 {
783 $tag = 'P5XXX------------';
784 }
785 else
786 {
787 $tag = 'PH--X------------';
788 }
789 }
790 else
791 {
792 # já, ty, on, ona, ono, my, vy, oni, ony
793 # it has gender if it is 3rd person
794 if($fs->person() eq '3')
795 {
796 $tag = 'PEXXX------------';
797 }
798 else
799 {
800 $tag = 'PP-XX------------';
801 }
802 }
803 }
804 else # reflexive
805 {
806 if($fs->variant() eq 'short')
807 {
808 # si, sis, se, ses
809 $tag = 'P7--X------------';
810 }
811 else
812 {
813 # sebe, sobě, sebou
814 $tag = 'P6--X------------';
815 }
816 }
817 }
818 # negative pronoun
819 elsif($fs->polarity() eq 'neg' || $fs->prontype() eq 'neg')
820 {
821 # nikdo, nic, nijaký, ničí, žádný
822 if($fs->is_noun())
823 {
824 # nikdo, nic
825 $tag = 'PY--X------------';
826 }
827 else
828 {
829 # nijaký, ničí, žádný
830 $tag = 'PWXXX------------';
831 }
832 }
833 # demonstrative pronoun
834 elsif($fs->prontype() eq 'dem')
835 {
836 # ten, tento, tenhle, onen, takový, týž, tentýž
837 $tag = 'PDXXX------------';
838 }
839 # interrogative or relative pronoun
840 elsif($fs->is_wh())
841 {
842 # P4 inflects for gender and PQ does not. Unfortunately, this does not
843 # help us to distinguish them because an empty gender is either '-' (PQ-) or 'X' (P4X).
844 # We decode PQ as pos=noun, while P4 has pos=adj|noun, so let's use this.
845 if($fs->is_noun() && !$fs->is_adjective())
846 {
847 # kdo, co
848 $tag = 'PQ--X------------';
849 }
850 else
851 {
852 # jaký, který, čí, jenž
853 $tag = 'P4XXX------------';
854 }
855 }
856 # totality (collective) pronoun
857 elsif($fs->prontype() eq 'tot')
858 {
859 # it has gender and number if it is plural or if it does not have case
860 if($fs->is_plural() || $fs->case() eq '')
861 {
862 $tag = 'PLXXX------------';
863 }
864 else
865 {
866 $tag = 'PL--X------------';
867 }
868 }
869 # indefinite pronoun
870 elsif($fs->is_noun())
871 {
872 $tag = 'PK--X------------';
873 }
874 else
875 {
876 $tag = 'PZXXX------------';
877 }
878 }
879 elsif($fs->is_noun())
880 {
881 if($fs->tagset() eq 'cs::ridics' && $fs->other() eq 'letter')
882 {
883 $tag = 'Q3---------------';
884 }
885 elsif($fs->is_abbreviation() && $fs->variant() !~ m/^[abc]$/)
886 {
887 # We have to set the default 'A' here for the case that 'Q3' is stored without other=letter.
888 $tag = 'BNXXX-----A------';
889 }
890 elsif($fs->tagset() eq 'cs::ridics' && $fs->other() eq 'postfix')
891 {
892 $tag = 'SNXXX------------';
893 }
894 else
895 {
896 $tag = 'N----------------';
897 }
898 }
899 elsif($fs->is_adjective())
900 {
901 if($fs->is_abbreviation() && $fs->variant() !~ m/^[abc]$/)
902 {
903 $tag = 'BAXXX------------';
904 }
905 elsif($fs->tagset() eq 'cs::ridics' && $fs->other() eq 'postfix')
906 {
907 $tag = 'SAXXX------------';
908 }
909 elsif($fs->variant() eq 'short')
910 {
911 $tag = 'ACXX-------------';
912 }
913 elsif($fs->is_possessive())
914 {
915 $tag = 'AUXXX------------';
916 }
917 elsif($fs->is_participle() && $fs->is_past())
918 {
919 $tag = 'AMXXX------------';
920 }
921 elsif($fs->is_participle())
922 {
923 $tag = 'AGXXX------------';
924 }
925 elsif($fs->is_hyph())
926 {
927 $tag = 'S2---------------';
928 }
929 elsif($fs->get_other_for_tagset('cs::ridics') eq 'O' ||
930 $fs->case() eq '' && $fs->polarity() eq '')
931 {
932 $tag = 'AOXX-------------';
933 }
934 else
935 {
936 $tag = 'AAXXX------------';
937 }
938 }
939 elsif($fs->is_verb())
940 {
941 if($fs->is_infinitive())
942 {
943 $tag = 'Vf---------------';
944 }
945 elsif($fs->is_supine())
946 {
947 $tag = 'V$---------------';
948 }
949 elsif($fs->is_participle())
950 {
951 if($fs->voice() eq 'pass')
952 {
953 $tag = 'VsXX-------------';
954 }
955 elsif($fs->verbtype() eq 'verbconj')
956 {
957 $tag = 'VqXX---XX--------';
958 }
959 else # default is active past/conditional participle
960 {
961 $tag = 'VpXX----X--------';
962 }
963 }
964 elsif($fs->is_transgressive())
965 {
966 if($fs->tense() eq 'past')
967 {
968 $tag = 'VmX--------------';
969 }
970 else # default is present transgressive
971 {
972 $tag = 'VeX--------------';
973 }
974 }
975 else # default is finite verb
976 {
977 if($fs->mood() eq 'imp')
978 {
979 $tag = 'Vi-X---X---------';
980 }
981 elsif($fs->mood() =~ m/^(cnd|sub)$/)
982 {
983 $tag = 'Vc---------------';
984 }
985 else # indicative
986 {
987 if($fs->verbtype() eq 'verbconj')
988 {
989 $tag = 'Vt-X---XX--------';
990 }
991 elsif($fs->tense() =~ m/^(past|imp)$/) # aorist or imperfect
992 {
993 $tag = 'V--X---XX--------';
994 }
995 else
996 {
997 $tag = 'VB-X---XX--------';
998 }
999 }
1000 }
1001 }
1002 elsif($fs->is_adverb())
1003 {
1004 if($fs->is_abbreviation() && $fs->variant() !~ m/^[abc]$/)
1005 {
1006 $tag = 'Bb---------------';
1007 }
1008 elsif($fs->tagset() eq 'cs::ridics' && $fs->other() eq 'postfix')
1009 {
1010 $tag = 'Sb---------------';
1011 }
1012 else
1013 {
1014 $tag = 'D----------------';
1015 }
1016 }
1017 elsif($fs->is_adposition())
1018 {
1019 if($fs->adpostype() eq 'comprep')
1020 {
1021 $tag = 'RF---------------';
1022 }
1023 elsif($fs->adpostype() eq 'voc')
1024 {
1025 $tag = 'RV--X------------';
1026 }
1027 else
1028 {
1029 $tag = 'R---X------------';
1030 }
1031 }
1032 elsif($fs->is_conjunction())
1033 {
1034 if($fs->is_subordinator())
1035 {
1036 # it has number if it has (3rd) person
1037 if($fs->person() eq '3')
1038 {
1039 $tag = 'J,-X-------------';
1040 }
1041 else
1042 {
1043 $tag = 'J,---------------';
1044 }
1045 }
1046 elsif($fs->is_coordinator())
1047 {
1048 $tag = 'J^---------------';
1049 }
1050 elsif($fs->conjtype() eq 'oper')
1051 {
1052 $tag = 'J*---------------';
1053 }
1054 elsif($fs->is_abbreviation() && $fs->variant() !~ m/^[abc]$/)
1055 {
1056 $tag = 'B^---------------';
1057 }
1058 else # by default the diachronic data do not distinguish conjunction subtypes
1059 {
1060 $tag = 'J----------------';
1061 }
1062 }
1063 elsif($fs->is_particle())
1064 {
1065 $tag = 'T----------------';
1066 }
1067 elsif($fs->is_interjection())
1068 {
1069 $tag = 'I----------------';
1070 }
1071 elsif($fs->is_punctuation())
1072 {
1073 if($fs->punctype() eq 'root')
1074 {
1075 $tag = 'Z#---------------';
1076 }
1077 else
1078 {
1079 $tag = 'Z:---------------';
1080 }
1081 }
1082 else # default is unknown tag
1083 {
1084 my $other = $fs->get_other_for_tagset('cs::ridics');
1085 # Unknown abbreviation can be encoded either as 'XX------------8' or as 'Xx-------------' but not as 'Xx------------8'.
1086 if($fs->variant() eq '8')
1087 {
1088 $tag = 'XX---------------';
1089 }
1090 elsif($other =~ m/^[-X\@]$/)
1091 {
1092 $tag = 'X'.$other.'---------------';
1093 }
1094 elsif($fs->is_abbreviation())
1095 {
1096 $tag = 'Xx---------------';
1097 }
1098 else
1099 {
1100 $tag = 'X@---------------';
1101 }
1102 }
1103 # Now encode the features.
1104 # The PDT tagset distinguishes unknown values ("X") and irrelevant features ("-").
1105 # Interset does not do this distinction but we have prepared the defaults for empty values above.
1106 my @tag = split(//, $tag);
1107 my @features = ('pos', 'subpos', 'gender', 'number', 'case', 'possgender', 'possnumber', 'person', 'tense', 'degree', 'polarity', 'voice', undef, 'aggregate', 'variant', 'aspect');
1108 my $atoms = $self->atoms();
1109 for(my $i = 2; $i<16; $i++)
1110 {
1111 next if(!defined($features[$i]));
1112 my $atag = $atoms->{$features[$i]}->encode($fs);
1113 # If we got undef, there is something wrong with our encoding tables.
1114 if(!defined($atag))
1115 {
1116 print STDERR ("\n", $fs->as_string(), "\n");
1117 confess("Cannot encode '$features[$i]'");
1118 }
1119 if($atag ne '')
1120 {
1121 $tag[$i] = $atag;
1122 }
1123 }
1124 $tag = join('', @tag);
1125 return $tag;
1126 }
1127  
1128  
1129  
1130 #------------------------------------------------------------------------------
1131 # Returns reference to list of known tags. The list was collected from the
1132 # (partial and ambiguous) morphological analysis of the Dresden and Olomouc
1133 # Bibles.
1134 # 337
1135 # Z nich jsem kvůli konzistenci vyhodil: 0
1136 #------------------------------------------------------------------------------
1137 sub list
1138 {
1139 my $self = shift;
1140 my $list = <<end_of_list
1141 D----------------
1142 D--------1-------
1143 D--------2-------
1144 I----------------
1145 J----------------
1146 N-FD1------------
1147 N-FD2------------
1148 N-FD3------------
1149 N-FD4------------
1150 N-FD5------------
1151 N-FD6------------
1152 N-FD7------------
1153 N-FP1------------
1154 N-FP2------------
1155 N-FP3------------
1156 N-FP4------------
1157 N-FP5------------
1158 N-FP6------------
1159 N-FP7------------
1160 N-FS1------------
1161 N-FS2------------
1162 N-FS3------------
1163 N-FS4------------
1164 N-FS5------------
1165 N-FS6------------
1166 N-FS7------------
1167 N-M--------------
1168 N-MD1------------
1169 N-MD2------------
1170 N-MD3------------
1171 N-MD4------------
1172 N-MD5------------
1173 N-MD6------------
1174 N-MD7------------
1175 N-MP1------------
1176 N-MP2------------
1177 N-MP3------------
1178 N-MP4------------
1179 N-MP5------------
1180 N-MP6------------
1181 N-MP7------------
1182 N-MS1------------
1183 N-MS2------------
1184 N-MS3------------
1185 N-MS4------------
1186 N-MS5------------
1187 N-MS6------------
1188 N-MS7------------
1189 N-ND1------------
1190 N-ND2------------
1191 N-ND3------------
1192 N-ND4------------
1193 N-ND5------------
1194 N-ND6------------
1195 N-ND7------------
1196 N-NP1------------
1197 N-NP2------------
1198 N-NP3------------
1199 N-NP4------------
1200 N-NP5------------
1201 N-NP6------------
1202 N-NP7------------
1203 N-NS1------------
1204 N-NS2------------
1205 N-NS3------------
1206 N-NS4------------
1207 N-NS5------------
1208 N-NS6------------
1209 N-NS7------------
1210 R---2------------
1211 R---3------------
1212 R---4------------
1213 R---6------------
1214 R---7------------
1215 T----------------
1216 V\$--------A----I-
1217 V--D---1A-AA---I-
1218 V--D---1A-AA---P-
1219 V--D---2A-AA---I-
1220 V--D---2A-AA---P-
1221 V--D---2I-AA---I-
1222 V--D---2I-AA---P-
1223 V--D---3A-AA---I-
1224 V--D---3A-AA---P-
1225 V--D---3I-AA---I-
1226 V--D---3I-AA---P-
1227 V--P---1A-AA---I-
1228 V--P---1A-AA---P-
1229 V--P---2A-AA---I-
1230 V--P---2A-AA---P-
1231 V--P---3A-AA---I-
1232 V--P---3A-AA---P-
1233 V--P---3A-NA---I-
1234 V--P---3A-NA---P-
1235 V--P---3I-AA---I-
1236 V--P---3I-AA---P-
1237 V--P---3I-NA---I-
1238 V--S---1A-AA---I-
1239 V--S---1A-AA---P-
1240 V--S---1I-AA---I-
1241 V--S---1I-AA---P-
1242 V--S---2A-AA---I-
1243 V--S---2A-AA---P-
1244 V--S---2A-NA---I-
1245 V--S---2A-NA---P-
1246 V--S---2I-AA---I-
1247 V--S---2I-AA---P-
1248 V--S---2I-NA---I-
1249 V--S---2I-NA---P-
1250 V--S---3A-AA---I-
1251 V--S---3A-AA---P-
1252 V--S---3A-NA---I-
1253 V--S---3A-NA---P-
1254 V--S---3I-AA---I-
1255 V--S---3I-AA---P-
1256 V--S---3I-NA---I-
1257 V--S---3I-NA---P-
1258 VB-D---2F-AA---I-
1259 VB-D---2F-AA---P-
1260 VB-D---2P-AA---I-
1261 VB-D---2P-AA---P-
1262 VB-D---2P-NA---I-
1263 VB-D---2P-NA---P-
1264 VB-D---3F-AA---I-
1265 VB-D---3F-AA---P-
1266 VB-D---3P-AA---I-
1267 VB-D---3P-AA---P-
1268 VB-D---3P-NA---I-
1269 VB-D---3P-NA---P-
1270 VB-P---1F-AA---I-
1271 VB-P---1F-AA---P-
1272 VB-P---1P-AA---I-
1273 VB-P---1P-AA---P-
1274 VB-P---1P-NA---I-
1275 VB-P---1P-NA---P-
1276 VB-P---2F-AA---I-
1277 VB-P---2F-AA---P-
1278 VB-P---2F-NA---I-
1279 VB-P---2F-NA---P-
1280 VB-P---2P-AA---I-
1281 VB-P---2P-AA---P-
1282 VB-P---2P-NA---I-
1283 VB-P---2P-NA---P-
1284 VB-P---3F-AA---I-
1285 VB-P---3F-AA---P-
1286 VB-P---3F-NA---I-
1287 VB-P---3F-NA---P-
1288 VB-P---3P-AA---I-
1289 VB-P---3P-AA---P-
1290 VB-P---3P-NA---I-
1291 VB-P---3P-NA---P-
1292 VB-S---1F-AA---I-
1293 VB-S---1F-AA---P-
1294 VB-S---1F-NA---I-
1295 VB-S---1F-NA---P-
1296 VB-S---1P-AA---I-
1297 VB-S---1P-AA---P-
1298 VB-S---1P-NA---I-
1299 VB-S---1P-NA---P-
1300 VB-S---2F-AA---I-
1301 VB-S---2F-AA---P-
1302 VB-S---2F-NA---I-
1303 VB-S---2F-NA---P-
1304 VB-S---2P-AA---I-
1305 VB-S---2P-AA---P-
1306 VB-S---2P-NA---I-
1307 VB-S---2P-NA---P-
1308 VB-S---3F-AA---I-
1309 VB-S---3F-AA---P-
1310 VB-S---3F-NA---I-
1311 VB-S---3F-NA---P-
1312 VB-S---3P-AA---I-
1313 VB-S---3P-AA---P-
1314 VB-S---3P-NA---I-
1315 VB-S---3P-NA---P-
1316 VeFD1-----A----I-
1317 VeFD1-----A----P-
1318 VeFD1-----N----I-
1319 VeFD1-----N----P-
1320 VeFP1-----A----I-
1321 VeFP1-----A----P-
1322 VeFP1-----N----I-
1323 VeFP1-----N----P-
1324 VeFS1-----A----I-
1325 VeFS1-----A----P-
1326 VeFS1-----N----I-
1327 VeFS1-----N----P-
1328 VeMD1-----A----I-
1329 VeMD1-----A----P-
1330 VeMD1-----N----I-
1331 VeMD1-----N----P-
1332 VeMP1-----A----I-
1333 VeMP1-----A----P-
1334 VeMP1-----N----I-
1335 VeMP1-----N----P-
1336 VeMS1-----A----I-
1337 VeMS1-----A----P-
1338 VeMS1-----N----I-
1339 VeMS4-----A----I-
1340 VeMS4-----A----P-
1341 VeMS4-----N----I-
1342 VeMS4-----N----P-
1343 VeND1-----A----I-
1344 VeND1-----A----P-
1345 VeND1-----N----I-
1346 VeND1-----N----P-
1347 VeNP1-----A----I-
1348 VeNP1-----A----P-
1349 VeNP1-----N----I-
1350 VeNP1-----N----P-
1351 VeNS1-----A----I-
1352 VeNS1-----A----P-
1353 VeNS1-----N----I-
1354 VeNS1-----N----P-
1355 Vf--------A----I-
1356 Vf--------A----P-
1357 Vf--------N----I-
1358 Vi-D---1--A----I-
1359 Vi-D---2--A----I-
1360 Vi-D---3--A----I-
1361 Vi-P---1--A----I-
1362 Vi-P---1--A----P-
1363 Vi-P---1--N----I-
1364 Vi-P---2--A----I-
1365 Vi-P---2--A----P-
1366 Vi-P---2--N----I-
1367 Vi-P---2--N----P-
1368 Vi-P---3--A----I-
1369 Vi-P---3--A----P-
1370 Vi-P---3--N----I-
1371 Vi-P---3--N----P-
1372 Vi-S---2--A----I-
1373 Vi-S---2--A----P-
1374 Vi-S---2--N----I-
1375 Vi-S---2--N----P-
1376 Vi-S---3--A----I-
1377 Vi-S---3--A----P-
1378 Vi-S---3--N----I-
1379 Vi-S---3--N----P-
1380 VmFD------A----I-
1381 VmFD------A----P-
1382 VmFP------A----I-
1383 VmFP------A----P-
1384 VmFS------A----P-
1385 VmMD------A----I-
1386 VmMD------A----P-
1387 VmMP------A----I-
1388 VmMP------A----P-
1389 VmMS------A----I-
1390 VmMS------A----P-
1391 VmND------A----I-
1392 VmND------A----P-
1393 VmNP------A----I-
1394 VmNP------A----P-
1395 VmNS------A----I-
1396 VmNS------A----P-
1397 VpFD----R-AA---P-
1398 VpFP----R-AA---I-
1399 VpFP----R-AA---P-
1400 VpFP----R-NA---P-
1401 VpFS----R-AA---I-
1402 VpFS----R-AA---P-
1403 VpFS----R-NA---I-
1404 VpFS----R-NA---P-
1405 VpMD----R-AA---I-
1406 VpMD----R-AA---P-
1407 VpMD----R-NA---I-
1408 VpMD----R-NA---P-
1409 VpMP----R-AA---I-
1410 VpMP----R-AA---P-
1411 VpMP----R-NA---I-
1412 VpMP----R-NA---P-
1413 VpMS----R-AA---I-
1414 VpMS----R-AA---P-
1415 VpMS----R-NA---I-
1416 VpMS----R-NA---P-
1417 VpND----R-AA---P-
1418 VpNP----R-AA---I-
1419 VpNP----R-AA---P-
1420 VpNP----R-NA---I-
1421 VpNP----R-NA---P-
1422 VpNS----R-AA---I-
1423 VpNS----R-AA---P-
1424 VpNS----R-NA---I-
1425 VpNS----R-NA---P-
1426 VsFD1-----AP---I-
1427 VsFD1-----AP---P-
1428 VsFD4-----AP---I-
1429 VsFD4-----AP---P-
1430 VsFP1-----AP---I-
1431 VsFP1-----AP---P-
1432 VsFP4-----AP---I-
1433 VsFP4-----AP---P-
1434 VsFS1-----AP---I-
1435 VsFS1-----AP---P-
1436 VsFS2-----AP---I-
1437 VsFS2-----AP---P-
1438 VsFS4-----AP---I-
1439 VsFS4-----AP---P-
1440 VsMD1-----AP---I-
1441 VsMD1-----AP---P-
1442 VsMD4-----AP---I-
1443 VsMD4-----AP---P-
1444 VsMP1-----AP---I-
1445 VsMP1-----AP---P-
1446 VsMP1-----NP---I-
1447 VsMP1-----NP---P-
1448 VsMP4-----AP---I-
1449 VsMP4-----AP---P-
1450 VsMS1-----AP---I-
1451 VsMS1-----AP---P-
1452 VsMS1-----NP---P-
1453 VsMS2-----AP---I-
1454 VsMS2-----AP---P-
1455 VsMS3-----AP---I-
1456 VsMS3-----AP---P-
1457 VsMS4-----AP---I-
1458 VsMS4-----AP---P-
1459 VsMS4-----NP---P-
1460 VsND1-----AP---I-
1461 VsND1-----AP---P-
1462 VsND4-----AP---I-
1463 VsND4-----AP---P-
1464 VsNP1-----AP---I-
1465 VsNP1-----AP---P-
1466 VsNP4-----AP---I-
1467 VsNP4-----AP---P-
1468 VsNS1-----AP---I-
1469 VsNS1-----AP---P-
1470 VsNS2-----AP---I-
1471 VsNS2-----AP---P-
1472 VsNS3-----AP---I-
1473 VsNS3-----AP---P-
1474 VsNS4-----AP---I-
1475 VsNS4-----AP---P-
1476 Z:---------------
1477 end_of_list
1478 ;
1479 # Protect from editors that replace tabs by spaces.
1480 $list =~ s/ \s+/\t/sg;
1481 my @list = split(/\r?\n/, $list);
1482 pop(@list) if($list[$#list] eq "");
1483 return \@list;
1484 }
1485  
1486  
1487  
1488 1;
1489  
1490 __END__
1491  
1492 =pod
1493  
1494 =encoding UTF-8
1495  
1496 =head1 NAME
1497  
1498 Lingua::Interset::Tagset::CS::Ridics - Driver for the tagset of the Prague Dependency Treebank Consolidated.
1499  
1500 =head1 VERSION
1501  
1502 version 3.015
1503  
1504 =head1 SYNOPSIS
1505  
1506 use Lingua::Interset::Tagset::cs::ridics;
1507 my $driver = Lingua::Interset::Tagset::cs::ridics->new();
1508 my $fs = $driver->decode('NNMS1-----A----');
1509  
1510 or
1511  
1512 use Lingua::Interset qw(decode);
1513 my $fs = decode('cs::ridics', 'NNMS1-----A----');
1514  
1515 =head1 DESCRIPTION
1516  
1517 Interset driver for the Prague-derived part-of-speech tagset used by the
1518 Research Infrastructure for Diachronic Czech Studies (RIDICS, Výzkumná
1519 infrastruktura pro diachronní bohemistiku, https://vokabular.ujc.cas.cz/).
1520 It is a positional tagset similar to PDT and PDT-C, but it has some extra
1521 positions and values that are needed in old Czech texts.
1522  
1523 =head1 SEE ALSO
1524  
1525 L<Lingua::Interset>,
1526 L<Lingua::Interset::Tagset>,
1527 L<Lingua::Interset::FeatureStructure>
1528  
1529 =head1 AUTHOR
1530  
1531 Dan Zeman <zeman@ufal.mff.cuni.cz>
1532  
1533 =head1 COPYRIGHT AND LICENSE
1534  
1535 This software is copyright (c) 2019 by Univerzita Karlova (Charles University).
1536  
1537 This is free software; you can redistribute it and/or modify it under
1538 the same terms as the Perl 5 programming language system itself.
1539  
1540 =cut