Interset/Tagset/CA/Conll2009.pm untested

filter: Statementstmt 0.0% 0 / 276 Branchbran 0.0% 0 / 28 Conditioncond 0.0% 0 / 39 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 11 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 359 CC 15 SCAR 41.7
CC
15
Cov
0%
encode
132.0
decode
30.0
get_tagset_id
2.0
CRAP 64.8
1 # ABSTRACT: Driver for the Catalan tagset of the CoNLL 2009 Shared Task.
2 # Copyright © 2011, 2014 Dan Zeman <zeman@ufal.mff.cuni.cz>
3  
4 package Lingua::Interset::Tagset::CA::Conll2009;
5 use strict;
6 use warnings;
7 our $VERSION = '3.014';
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 'ca::conll2009';
31 }
32  
33  
34  
35 #------------------------------------------------------------------------------
36 # Creates atomic drivers for the surface CoNLL features.
37 #------------------------------------------------------------------------------
38 sub _create_atoms
39 {
40 my $self = shift;
41 my %atoms;
42 my $atoms = \%atoms;
43 # PART OF SPEECH ####################
44 $atoms->{pos} = $self->create_atom
45 (
46 'tagset' => 'ca::conll2009',
47 'surfeature' => 'pos',
48 'decode_map' =>
49 {
50 'n' => ['pos' => 'noun'],
51 # p postype=numeral ... numeral: dos, tres, quatre, cinc, sis, set, vuit, nou, deu, ...
52 'p' => ['pos' => 'noun', 'prontype' => 'prn'],
53 'a' => ['pos' => 'adj'],
54 # d postype=numeral ... numeral! (cardinal, ordinal and other): tres, quatre, cinc; doble, triple, múltiple
55 'd' => ['pos' => 'adj', 'prontype' => 'prn'],
56 # w ... date, name of the day of week:
57 # 1999, 1998, 2001, any_2000, mes_de_maig, 11_de_setembre, vuit_del_vespre (eight o'clock)
58 # dilluns (Monday), dimarts (Tuesday), dimecres (Wednesday), dijous (Thursday), divendres (Friday), dissabte (Saturday), diumenge (Sunday)
59 # gener (January), febrer (February), març, abril, maig, juny, juliol, agost, setembre, octubre, novembre, desembre
60 'w' => ['pos' => 'noun', 'advtype' => 'tim'],
61 # z ... numbers expressed by digits but not numerals-words; and nouns that are often counted?
62 # z (without features) ... 10, 15, 20
63 # z postype=currency ... pessetes, euros, d&ogra;lars
64 # z postype=percentage ... 50%, 30%, 10%
65 # We will assume a number for the moment. The feature postype=currency can later turn it to noun.
66 'z' => ['pos' => 'num', 'numform' => 'digit'],
67 'v' => ['pos' => 'verb'],
68 'r' => ['pos' => 'adv'],
69 's' => ['pos' => 'adp', 'adpostype' => 'prep'],
70 'c' => ['pos' => 'conj'],
71 'i' => ['pos' => 'int'],
72 'f' => ['pos' => 'punc']
73 },
74 'encode_map' =>
75  
76 { 'pos' => { 'noun' => { 'prontype' => { '' => { 'numform' => { 'digit' => 'z',
77 '@' => { 'advtype' => { 'tim' => 'w',
78 '@' => 'n' }}}},
79 '@' => 'p' }},
80 'adj' => { 'adjtype' => { 'pdt' => 'd',
81 '@' => { 'prontype' => { '' => 'a',
82 '@' => 'd' }}}},
83 'num' => { 'numform' => { 'digit' => 'z',
84 '@' => { 'other/synpos' => { 'noun' => 'p',
85 '@' => 'd' }}}},
86 'verb' => 'v',
87 'adv' => 'r',
88 'adp' => 's',
89 'conj' => 'c',
90 'int' => 'i',
91 'punc' => 'f',
92 'sym' => 'f',
93 '@' => 'n' }}
94 );
95 # DETAILED PART OF SPEECH ####################
96 $atoms->{postype} = $self->create_atom
97 (
98 'tagset' => 'ca::conll2009',
99 'surfeature' => 'postype',
100 'decode_map' =>
101 {
102 # types of nouns
103 'common' => ['nountype' => 'com'],
104 'proper' => ['nountype' => 'prop'],
105 # types of adjectives
106 'qualificative' => [], # this is the default type of adjective
107 'ordinal' => ['numtype' => 'ord'],
108 # types of pronouns
109 'personal' => ['prontype' => 'prs'],
110 'possessive' => ['prontype' => 'prs', 'poss' => 'yes'],
111 'article' => ['prontype' => 'art'],
112 'demonstrative' => ['prontype' => 'dem'],
113 'interrogative' => ['prontype' => 'int'],
114 'indefinite' => ['prontype' => 'ind'],
115 'relative' => ['prontype' => 'rel'],
116 # Exclamative pronoun: only one occurrence in the Catalan corpus and one in Spanish, 'Que' in
117 # ca: Que fort que _ s' hagi mort , per&ogra; tots hem de seguir el mateix camí , _ ens hem de resignar .
118 # es: hubiera sospechado siquiera qué lejos estaba Fermina_Daza
119 # should at least suspect how long Fermina_Daza was
120 # This does not seem to be enough evidence to create a new pronoun type.
121 'exclamative' => ['prontype' => 'rel', 'other' => {'prontype' => 'exc'}],
122 # types of numerals
123 # Here we override the pos value that has been decoded previously (p => noun, d => adj).
124 # In order to not lose information in round-trip, we have to save the p|d distinction.
125 # Thus the decode() method modifies the 'numeral' value to either 'pnumeral' or 'dnumeral' before using this decoding map.
126 'pnumeral' => ['pos' => 'num', 'numtype' => 'card', 'prontype' => '', 'other' => {'synpos' => 'noun'}],
127 'dnumeral' => ['pos' => 'num', 'numtype' => 'card', 'prontype' => '', 'other' => {'synpos' => 'adj'}],
128 'numeral' => ['pos' => 'num', 'numtype' => 'card', 'prontype' => ''],
129 # pos=z (numbers/digits, currencies and percentage)
130 'currency' => ['pos' => 'noun', 'other' => {'postype' => 'currency'}], # although subclass of number (pos=z), these are noun identifiers of currencies (pesetas, dólares, euros)
131 'percentage' => ['numtype' => 'frac', 'other' => {'postype' => 'percentage'}], # Interset does not distinguish percentual from normal counts: 20_por_ciento, 20%
132 # types of verbs
133 'main' => [], # main is the default type of verb
134 'auxiliary' => ['verbtype' => 'aux'], # haver [ca] / haber [es]
135 'semiauxiliary' => ['verbtype' => 'aux', 'other' => {'verbtype' => 'semiaux'}], # ser / ser; Interset cannot distinguish semiauxiliary from auxiliary
136 # types of adverbs
137 ###!!! In theory, non-negative adverbs should have postype=general. In practice, there are only two occurrences of this feature
138 ###!!! while all other adverbs have empty postype. Therefore I removed postype=general from the list of known tags.
139 'negative' => ['polarity' => 'neg'], # no; main POS is adverb; in other tagsets it could be negative particle
140 # prepositions
141 'preposition' => ['adpostype' => 'prep'], # all prepositions (pos=s) have also postype=preposition; it should not occur with other parts of speech than "s"
142 # types of conjunctions
143 'coordinating' => ['conjtype' => 'coor'],
144 'subordinating' => ['conjtype' => 'sub'],
145 },
146 'encode_map' =>
147 {
148 'pos' => { 'noun' => { 'poss' => { 'yes' => 'possessive',
149 '@' => { 'prontype' => { 'prs' => 'personal',
150 'dem' => 'demonstrative',
151 'int' => 'interrogative',
152 'ind' => 'indefinite',
153 'rel' => { 'other/prontype' => { 'exc' => 'exclamative',
154 '@' => 'relative' }},
155 '@' => { 'nountype' => { 'com' => 'common',
156 'prop' => 'proper',
157 '@' => { 'other/postype' => { 'currency' => 'currency' }}}}}}}},
158 'adj' => { 'poss' => { 'yes' => 'possessive',
159 '@' => { 'prontype' => { 'prs' => 'personal',
160 'art' => 'article',
161 'dem' => 'demonstrative',
162 'int' => 'interrogative',
163 'ind' => 'indefinite',
164 'rel' => { 'other/prontype' => { 'exc' => 'exclamative',
165 '@' => 'relative' }},
166 '@' => { 'numtype' => { 'ord' => 'ordinal',
167 '@' => 'qualificative' }}}}}},
168 'num' => { 'numform' => { 'digit' => { 'other/postype' => { 'percentage' => 'percentage',
169 '@' => '' }},
170 '@' => 'numeral' }},
171 'verb' => { 'other/verbtype' => { 'semiaux' => 'semiauxiliary',
172 '@' => { 'verbtype' => { 'aux' => 'auxiliary',
173 '@' => 'main' }}}},
174 'adp' => { 'adpostype' => { 'prep' => 'preposition',
175 'preppron' => 'preposition' }},
176 'conj' => { 'conjtype' => { 'coor' => 'coordinating',
177 'sub' => 'subordinating' }},
178 '@' => { 'polarity' => { 'neg' => 'negative' }}}
179 }
180 );
181 # POS FUNCTION ####################
182 # posfunction = participle occurs with syntactic adjectives (and one noun) that are morphologically verb participles
183 $atoms->{posfunction} = $self->create_atom
184 (
185 'surfeature' => 'posfunction',
186 'decode_map' =>
187 {
188 'participle' => ['verbform' => 'part']
189 },
190 'encode_map' =>
191  
192 { 'verbform' => { 'part' => 'participle' }}
193 );
194 # GENDER ####################
195 $atoms->{gen} = $self->create_atom
196 (
197 'tagset' => 'ca::conll2009',
198 'surfeature' => 'gen',
199 'decode_map' =>
200 {
201 'm' => ['gender' => 'masc'],
202 'f' => ['gender' => 'fem'],
203 # The common gender in Catalan is different from the common gender in Swedish, for which the Interset value 'com' was added.
204 # Catalan has only masculine and feminine genders. If it is undistinguishable for a word, the source tagset uses the 'c' value
205 # but we will just leave it empty. That's the standard Interset way of saying that nothing can be said about the gender.
206 # Unfortunately, we also have to be able to reproduce the original annotation in encoding.
207 # So we have to note when we saw 'c' and when there was nothing.
208 'c' => ['other' => {'gender' => 'com'}]
209 },
210 'encode_map' =>
211  
212 { 'other/gender' => { 'com' => 'c',
213 '@' => { 'gender' => { 'masc' => 'm',
214 'fem' => 'f' }}}}
215 );
216 # NUMBER ####################
217 $atoms->{num} = $self->create_atom
218 (
219 'tagset' => 'ca::conll2009',
220 'surfeature' => 'num',
221 'decode_map' =>
222 {
223 's' => ['number' => 'sing'],
224 'p' => ['number' => 'plur'],
225 # The "common number" means that we cannot decide between singular and plural.
226 # Ideally we would represent this just by the empty value of number.
227 # Unfortunately, we also have to be able to reproduce the original annotation in encoding.
228 # So we have to note when we saw 'c' and when there was nothing.
229 'c' => ['other' => {'number' => 'com'}]
230 },
231 'encode_map' =>
232  
233 { 'other/number' => { 'com' => 'c',
234 '@' => { 'number' => { 'sing' => 's',
235 'plur' => 'p' }}}}
236 );
237 # PERSON ####################
238 $atoms->{person} = $self->create_simple_atom
239 (
240 'intfeature' => 'person',
241 'simple_decode_map' =>
242 {
243 '1' => '1',
244 '2' => '2',
245 '3' => '3'
246 }
247 );
248 # POLITENESS ####################
249 $atoms->{polite} = $self->create_simple_atom
250 (
251 'intfeature' => 'polite',
252 'simple_decode_map' =>
253 {
254 # Used only for the two polite 2nd person pronouns, "vost&egra;" (sing) and "vost&egra;s" (plur).
255 'yes' => 'form'
256 }
257 );
258 # POSSESSOR NUMBER ####################
259 $atoms->{possessornum} = $self->create_atom
260 (
261 'tagset' => 'ca::conll2009',
262 'surfeature' => 'possessornum',
263 'decode_map' =>
264 {
265 's' => ['possnumber' => 'sing'],
266 'p' => ['possnumber' => 'plur'],
267 'c' => ['other' => {'possnumber' => 'c'}]
268 },
269 'encode_map' =>
270  
271 { 'possnumber' => { 'sing' => 's',
272 'plur' => 'p',
273 '@' => { 'other/possnumber' => { 'c' => 'c',
274 '@' => '' }}}}
275 );
276 # CASE ####################
277 # Catalan pronouns can be also marked for case!
278 $atoms->{case} = $self->create_atom
279 (
280 'surfeature' => 'case',
281 'decode_map' =>
282 {
283 'nominative' => ['case' => 'nom'], # jo
284 'dative' => ['case' => 'dat'], # li, -li
285 'accusative' => ['case' => 'acc'], # el, -lo, l', la, -la, els, 'ls, les, -les
286 'oblique' => ['prepcase' => 'pre'] # mi, si
287 },
288 'encode_map' =>
289  
290 { 'prepcase' => { 'pre' => 'oblique',
291 '@' => { 'case' => { 'nom' => 'nominative',
292 'dat' => 'dative',
293 'acc' => 'accusative' }}}}
294 );
295 # MOOD ####################
296 $atoms->{mood} = $self->create_atom
297 (
298 'surfeature' => 'mood',
299 'decode_map' =>
300 {
301 'infinitive' => ['verbform' => 'inf'],
302 'indicative' => ['verbform' => 'fin', 'mood' => 'ind'],
303 'imperative' => ['verbform' => 'fin', 'mood' => 'imp'],
304 'subjunctive' => ['verbform' => 'fin', 'mood' => 'sub'],
305 'gerund' => ['verbform' => 'ger'],
306 'pastparticiple' => ['verbform' => 'part', 'tense' => 'past']
307 },
308 'encode_map' =>
309  
310 { 'verbform' => { 'inf' => 'infinitive',
311 'fin' => { 'mood' => { 'ind' => 'indicative',
312 'cnd' => 'indicative',
313 'imp' => 'imperative',
314 'sub' => 'subjunctive' }},
315 'ger' => 'gerund',
316 'part' => 'pastparticiple' }}
317 );
318 # TENSE ####################
319 $atoms->{tense} = $self->create_atom
320 (
321 'surfeature' => 'tense',
322 'decode_map' =>
323 {
324 'past' => ['tense' => 'past'],
325 'imperfect' => ['tense' => 'imp'],
326 'present' => ['tense' => 'pres'],
327 'future' => ['tense' => 'fut'],
328 'conditional' => ['mood' => 'cnd']
329 },
330 'encode_map' =>
331  
332 { 'tense' => { 'past' => 'past',
333 'imp' => 'imperfect',
334 'pres' => 'present',
335 'fut' => 'future',
336 '@' => { 'mood' => { 'cnd' => 'conditional' }}}}
337 );
338 # CONTRACTED PREPOSITION + ARTICLE ####################
339 # Contracted preposition with definite article: del, al, pel, des_del, dels, als, a_través_dels
340 ###!!! DZ Interset does not cover this yet, although it is planned.
341 ###!!! We use adpostype=preppron for the moment because it is the closest match.
342 ###!!! Something like adpostype=prepart would be more appropriate.
343 ###!!! A dedicated feature for types of fused words would be perhaps even better.
344 ###!!! Ideally, we would have two feature structures for the two components. But that would be a new dimension of Interset.
345 ###!!! The Universal Dependencies solve this by a second level of tokenization that splits such tokens to syntactic words.
346 $atoms->{contracted} = $self->create_atom
347 (
348 'surfeature' => 'contracted',
349 'decode_map' =>
350 {
351 'yes' => ['adpostype' => 'preppron']
352 },
353 'encode_map' =>
354  
355 { 'adpostype' => { 'preppron' => 'yes' }}
356 );
357 # PUNCTUATION TYPE ####################
358 $atoms->{punct} = $self->create_atom
359 (
360 'tagset' => 'ca::conll2009',
361 'surfeature' => 'punct',
362 'decode_map' =>
363 {
364 'bracket' => ['punctype' => 'brck'],
365 'colon' => ['punctype' => 'colo'],
366 'comma' => ['punctype' => 'comm'],
367 'etc' => ['punctype' => 'comm', 'other' => {'punctype' => 'etc'}],
368 'exclamationmark' => ['punctype' => 'excl'],
369 'hyphen' => ['punctype' => 'dash'],
370 'mathsign' => ['pos' => 'sym'],
371 'period' => ['punctype' => 'peri'],
372 'questionmark' => ['punctype' => 'qest'],
373 'quotation' => ['punctype' => 'quot'],
374 'semicolon' => ['punctype' => 'semi'],
375 'slash' => ['punctype' => 'colo', 'other' => {'punctype' => 'slash'}] # no special value for slash in Interset
376 },
377 'encode_map' =>
378  
379 { 'punctype' => { 'brck' => 'bracket',
380 'colo' => { 'other/punctype' => { 'slash' => 'slash',
381 '@' => 'colon' }},
382 'comm' => { 'other/punctype' => { 'etc' => 'etc',
383 '@' => 'comma' }},
384 'excl' => 'exclamationmark',
385 'dash' => 'hyphen',
386 'peri' => 'period',
387 'qest' => 'questionmark',
388 'quot' => 'quotation',
389 'semi' => 'semicolon',
390 '@' => { 'pos' => { 'sym' => 'mathsign' }}}}
391 );
392 # PAIRED PUNCTUATION SIDE ####################
393 $atoms->{punctenclose} = $self->create_simple_atom
394 (
395 'intfeature' => 'puncside',
396 'simple_decode_map' =>
397 {
398 'open' => 'ini',
399 'close' => 'fin'
400 }
401 );
402 return $atoms;
403 }
404  
405  
406  
407 #------------------------------------------------------------------------------
408 # Decodes a physical tag (string) and returns the corresponding feature
409 # structure.
410 #------------------------------------------------------------------------------
411 sub decode
412 {
413 my $self = shift;
414 my $tag = shift;
415 my $fs = Lingua::Interset::FeatureStructure->new();
416 $fs->set_tagset('ca::conll2009');
417 my $atoms = $self->atoms();
418 # Two components: part-of-speech tag and features
419 # Only features with non-empty values appear in the tag.
420 # example: n\tpostype=common|gen=m|num=s
421 my ($pos, $features) = split(/\s+/, $tag);
422 $features = '' if($features eq '_');
423 my @features_conll = split(/\|/, $features);
424 my %features_conll;
425 foreach my $f (@features_conll)
426 {
427 if($f =~ m/^(\w+)=(.+)$/)
428 {
429 $features_conll{$1} = $2;
430 }
431 else
432 {
433 $features_conll{$f} = $f;
434 }
435 }
436 $atoms->{pos}->decode_and_merge_hard($pos, $fs);
437 foreach my $name ('postype', 'gen', 'num', 'posfunction', 'person', 'polite', 'possessornum', 'case', 'mood', 'tense', 'contracted', 'punct', 'punctenclose')
438 {
439 if(defined($features_conll{$name}) && $features_conll{$name} ne '')
440 {
441 # The feature postype=numeral will override the pos value that has been decoded previously (p => noun, d => adj, both will change to num).
442 # In order to not lose information in round-trip, we have to save the p|d distinction.
443 # Thus the decode() method modifies the 'numeral' value to either 'pnumeral' or 'dnumeral' before using this decoding map.
444 if($name eq 'postype' && $features_conll{$name} eq 'numeral')
445 {
446 $features_conll{$name} = $pos.'numeral';
447 $fs->set_prontype('');
448 }
449 $atoms->{$name}->decode_and_merge_hard($features_conll{$name}, $fs);
450 }
451 }
452 return $fs;
453 }
454  
455  
456  
457 #------------------------------------------------------------------------------
458 # Takes feature structure and returns the corresponding physical tag (string).
459 #------------------------------------------------------------------------------
460 sub encode
461 {
462 my $self = shift;
463 my $fs = shift; # Lingua::Interset::FeatureStructure
464 my $atoms = $self->atoms();
465 my $pos = $atoms->{pos}->encode($fs);
466 my @feature_names = ('postype', 'gen', 'num', 'posfunction', 'person', 'polite', 'possessornum', 'case', 'mood', 'tense', 'contracted', 'punct', 'punctenclose');
467 my @features;
468 foreach my $name (@feature_names)
469 {
470 my $value = '';
471 if(!defined($atoms->{$name}))
472 {
473 confess("Cannot find atom for '$name'");
474 }
475 $value = $atoms->{$name}->encode($fs);
476 # Corrections: Some features are only mentioned with some words. Especially gen=c and num=c.
477 if($name eq 'gen')
478 {
479 # "Common gender" in Catalan actually means that we cannot decide between masculine and feminine.
480 if($pos =~ m/^[napdvs]$/ && $value ne 'm' && $value ne 'f')
481 {
482 $value = 'c';
483 }
484 }
485 elsif($name eq 'num')
486 {
487 # "Common number" in Catalan actually means that we cannot decide between singular and plural.
488 if($pos =~ m/^[napdvs]$/ && $value ne 's' && $value ne 'p')
489 {
490 $value = 'c';
491 }
492 }
493 elsif($name eq 'posfunction' && $value eq 'participle' && $fs->pos() eq 'verb')
494 {
495 # posfunction=participle occurs with syntactic adjectives that are morphologically verb participles.
496 # It does not occur with verb where there is mood=pastparticiple instead.
497 $value = '';
498 }
499 elsif($name eq 'mood' && $value eq 'pastparticiple' && $pos eq 'a')
500 {
501 # mood=pastparticiple occurs with verbs only.
502 # It does not occur with participial adjectives where there is posfunction=participle instead.
503 $value = '';
504 }
505 elsif($name eq 'tense' && $value eq 'past' && $fs->verbform() eq 'part')
506 {
507 # tense=past does not co-occur with mood=pastparticiple.
508 $value = '';
509 }
510 if(defined($value) && $value ne '')
511 {
512 push(@features, "$name=$value");
513 }
514 }
515 my $features = '_';
516 if(scalar(@features) > 0)
517 {
518 $features = join('|', @features);
519 }
520 my $tag = "$pos\t$features";
521 return $tag;
522 }
523  
524  
525  
526 #------------------------------------------------------------------------------
527 # Returns reference to list of known tags.
528 # Tags were collected from the corpus, 276 distinct tags found.
529 # A few feature combinations were added so that valid tags can be encoded
530 # without the 'other' feature. A few erroneous combinations were removed.
531 # The resulting number of tags is 272.
532 #------------------------------------------------------------------------------
533 sub list
534 {
535 my $self = shift;
536 my $list = <<end_of_list
537 a postype=ordinal|gen=c|num=s
538 a postype=ordinal|gen=f|num=p
539 a postype=ordinal|gen=f|num=s
540 a postype=ordinal|gen=m|num=p
541 a postype=ordinal|gen=m|num=s
542 a postype=qualificative|gen=c|num=c
543 a postype=qualificative|gen=c|num=p
544 a postype=qualificative|gen=c|num=s
545 a postype=qualificative|gen=f|num=p
546 a postype=qualificative|gen=f|num=p|posfunction=participle
547 a postype=qualificative|gen=f|num=s
548 a postype=qualificative|gen=f|num=s|posfunction=participle
549 a postype=qualificative|gen=m|num=p
550 a postype=qualificative|gen=m|num=p|posfunction=participle
551 a postype=qualificative|gen=m|num=s
552 a postype=qualificative|gen=m|num=s|posfunction=participle
553 c _
554 c postype=coordinating
555 c postype=subordinating
556 c postype=subordinating|gen=c|num=c
557 d postype=article|gen=c|num=s
558 d postype=article|gen=f|num=p
559 d postype=article|gen=f|num=s
560 d postype=article|gen=m|num=p
561 d postype=article|gen=m|num=s
562 d postype=demonstrative|gen=c|num=p
563 d postype=demonstrative|gen=c|num=s
564 d postype=demonstrative|gen=f|num=p
565 d postype=demonstrative|gen=f|num=s
566 d postype=demonstrative|gen=m|num=p
567 d postype=demonstrative|gen=m|num=s
568 d postype=exclamative|gen=c|num=c
569 d postype=indefinite|gen=c|num=c
570 d postype=indefinite|gen=c|num=p
571 d postype=indefinite|gen=c|num=s
572 d postype=indefinite|gen=f|num=p
573 d postype=indefinite|gen=f|num=s
574 d postype=indefinite|gen=m|num=p
575 d postype=indefinite|gen=m|num=s
576 d postype=interrogative|gen=f|num=p
577 d postype=interrogative|gen=f|num=s
578 d postype=interrogative|gen=m|num=p
579 d postype=interrogative|gen=m|num=s
580 d postype=numeral|gen=c|num=p
581 d postype=numeral|gen=c|num=s
582 d postype=numeral|gen=f|num=p
583 d postype=numeral|gen=f|num=s
584 d postype=numeral|gen=m|num=p
585 d postype=numeral|gen=m|num=s
586 d postype=possessive|gen=c|num=p|person=1|possessornum=p
587 d postype=possessive|gen=f|num=p|person=1|possessornum=p
588 d postype=possessive|gen=f|num=p|person=1|possessornum=s
589 d postype=possessive|gen=f|num=p|person=3
590 d postype=possessive|gen=f|num=s|person=1|possessornum=p
591 d postype=possessive|gen=f|num=s|person=1|possessornum=s
592 d postype=possessive|gen=f|num=s|person=2|possessornum=s
593 d postype=possessive|gen=f|num=s|person=3
594 d postype=possessive|gen=m|num=p|person=1|possessornum=p
595 d postype=possessive|gen=m|num=p|person=1|possessornum=s
596 d postype=possessive|gen=m|num=p|person=2|possessornum=s
597 d postype=possessive|gen=m|num=p|person=3
598 d postype=possessive|gen=m|num=s|person=1|possessornum=p
599 d postype=possessive|gen=m|num=s|person=1|possessornum=s
600 d postype=possessive|gen=m|num=s|person=2|possessornum=s
601 d postype=possessive|gen=m|num=s|person=3
602 d postype=relative|gen=c|num=c
603 d postype=relative|gen=c|num=s
604 f punct=bracket|punctenclose=close
605 f punct=bracket|punctenclose=open
606 f punct=colon
607 f punct=comma
608 f punct=comma|punctenclose=close
609 f punct=comma|punctenclose=open
610 f punct=etc
611 f punct=exclamationmark|punctenclose=close
612 f punct=exclamationmark|punctenclose=open
613 f punct=hyphen
614 f punct=mathsign
615 f punct=period
616 f punct=questionmark|punctenclose=close
617 f punct=questionmark|punctenclose=open
618 f punct=quotation
619 f punct=semicolon
620 f punct=slash
621 i _
622 n postype=common|gen=c|num=c
623 n postype=common|gen=c|num=p
624 n postype=common|gen=c|num=s
625 n postype=common|gen=f|num=c
626 n postype=common|gen=f|num=p
627 n postype=common|gen=f|num=s
628 n postype=common|gen=m|num=c
629 n postype=common|gen=m|num=p
630 n postype=common|gen=m|num=s
631 n postype=proper|gen=c|num=c
632 n postype=proper|gen=m|num=s
633 p gen=c|num=c
634 p gen=c|num=c|person=3
635 p gen=c|num=p|person=1
636 p gen=c|num=p|person=2
637 p gen=c|num=s|person=1
638 p gen=c|num=s|person=2
639 p postype=demonstrative|gen=c|num=p
640 p postype=demonstrative|gen=c|num=s
641 p postype=demonstrative|gen=f|num=p
642 p postype=demonstrative|gen=f|num=s
643 p postype=demonstrative|gen=m|num=p
644 p postype=demonstrative|gen=m|num=s
645 p postype=indefinite|gen=c|num=c
646 p postype=indefinite|gen=c|num=p
647 p postype=indefinite|gen=c|num=s
648 p postype=indefinite|gen=f|num=p
649 p postype=indefinite|gen=f|num=s
650 p postype=indefinite|gen=m|num=p
651 p postype=indefinite|gen=m|num=s
652 p postype=interrogative|gen=c|num=c
653 p postype=interrogative|gen=c|num=s
654 p postype=interrogative|gen=f|num=p
655 p postype=interrogative|gen=f|num=s
656 p postype=interrogative|gen=m|num=p
657 p postype=interrogative|gen=m|num=s
658 p postype=numeral|gen=c|num=p
659 p postype=numeral|gen=c|num=s
660 p postype=numeral|gen=f|num=p
661 p postype=numeral|gen=f|num=s
662 p postype=numeral|gen=m|num=p
663 p postype=numeral|gen=m|num=s
664 p postype=personal|gen=c|num=c|person=3
665 p postype=personal|gen=c|num=c|person=3|case=oblique
666 p postype=personal|gen=c|num=p|person=1
667 p postype=personal|gen=c|num=p|person=2
668 p postype=personal|gen=c|num=p|person=2|polite=yes
669 p postype=personal|gen=c|num=p|person=3
670 p postype=personal|gen=c|num=s|person=1
671 p postype=personal|gen=c|num=s|person=1|case=nominative
672 p postype=personal|gen=c|num=s|person=1|case=oblique
673 p postype=personal|gen=c|num=s|person=2
674 p postype=personal|gen=c|num=s|person=2|polite=yes
675 p postype=personal|gen=c|num=s|person=3|case=accusative
676 p postype=personal|gen=c|num=s|person=3|case=dative
677 p postype=personal|gen=f|num=p|person=3
678 p postype=personal|gen=f|num=p|person=3|case=accusative
679 p postype=personal|gen=f|num=s|person=3
680 p postype=personal|gen=f|num=s|person=3|case=accusative
681 p postype=personal|gen=m|num=p|person=3
682 p postype=personal|gen=m|num=p|person=3|case=accusative
683 p postype=personal|gen=m|num=s|person=3
684 p postype=personal|gen=m|num=s|person=3|case=accusative
685 p postype=possessive|gen=c|num=p|person=3|possessornum=p
686 p postype=possessive|gen=c|num=s|person=3|possessornum=p
687 p postype=possessive|gen=f|num=p|person=1|possessornum=p
688 p postype=possessive|gen=f|num=p|person=3
689 p postype=possessive|gen=f|num=p|person=3|possessornum=s
690 p postype=possessive|gen=f|num=s|person=1|possessornum=p
691 p postype=possessive|gen=f|num=s|person=3
692 p postype=possessive|gen=f|num=s|person=3|possessornum=s
693 p postype=possessive|gen=m|num=p|person=3
694 p postype=possessive|gen=m|num=s|person=1|possessornum=p
695 p postype=possessive|gen=m|num=s|person=3
696 p postype=relative|gen=c|num=c
697 p postype=relative|gen=c|num=p
698 p postype=relative|gen=c|num=s
699 p postype=relative|gen=m|num=s
700 r _
701 r postype=negative
702 s postype=preposition|gen=c|num=c
703 s postype=preposition|gen=m|num=p|contracted=yes
704 s postype=preposition|gen=m|num=s|contracted=yes
705 v postype=auxiliary|gen=c|num=c|mood=gerund
706 v postype=auxiliary|gen=c|num=c|mood=infinitive
707 v postype=auxiliary|gen=c|num=c|person=1|mood=subjunctive|tense=imperfect
708 v postype=auxiliary|gen=c|num=p|person=1|mood=indicative|tense=conditional
709 v postype=auxiliary|gen=c|num=p|person=1|mood=indicative|tense=future
710 v postype=auxiliary|gen=c|num=p|person=1|mood=indicative|tense=imperfect
711 v postype=auxiliary|gen=c|num=p|person=1|mood=indicative|tense=present
712 v postype=auxiliary|gen=c|num=p|person=1|mood=subjunctive|tense=imperfect
713 v postype=auxiliary|gen=c|num=p|person=1|mood=subjunctive|tense=present
714 v postype=auxiliary|gen=c|num=p|person=2|mood=indicative|tense=future
715 v postype=auxiliary|gen=c|num=p|person=2|mood=indicative|tense=present
716 v postype=auxiliary|gen=c|num=p|person=3|mood=imperative
717 v postype=auxiliary|gen=c|num=p|person=3|mood=indicative|tense=conditional
718 v postype=auxiliary|gen=c|num=p|person=3|mood=indicative|tense=future
719 v postype=auxiliary|gen=c|num=p|person=3|mood=indicative|tense=imperfect
720 v postype=auxiliary|gen=c|num=p|person=3|mood=indicative|tense=past
721 v postype=auxiliary|gen=c|num=p|person=3|mood=indicative|tense=present
722 v postype=auxiliary|gen=c|num=p|person=3|mood=subjunctive|tense=imperfect
723 v postype=auxiliary|gen=c|num=p|person=3|mood=subjunctive|tense=present
724 v postype=auxiliary|gen=c|num=s|person=1|mood=indicative|tense=future
725 v postype=auxiliary|gen=c|num=s|person=1|mood=indicative|tense=imperfect
726 v postype=auxiliary|gen=c|num=s|person=1|mood=indicative|tense=present
727 v postype=auxiliary|gen=c|num=s|person=2|mood=indicative|tense=present
728 v postype=auxiliary|gen=c|num=s|person=3|mood=imperative
729 v postype=auxiliary|gen=c|num=s|person=3|mood=indicative|tense=conditional
730 v postype=auxiliary|gen=c|num=s|person=3|mood=indicative|tense=future
731 v postype=auxiliary|gen=c|num=s|person=3|mood=indicative|tense=imperfect
732 v postype=auxiliary|gen=c|num=s|person=3|mood=indicative|tense=past
733 v postype=auxiliary|gen=c|num=s|person=3|mood=indicative|tense=present
734 v postype=auxiliary|gen=c|num=s|person=3|mood=subjunctive|tense=imperfect
735 v postype=auxiliary|gen=c|num=s|person=3|mood=subjunctive|tense=present
736 v postype=auxiliary|gen=m|num=s|mood=pastparticiple
737 v postype=main|gen=c|num=c
738 v postype=main|gen=c|num=c|mood=gerund
739 v postype=main|gen=c|num=c|mood=infinitive
740 v postype=main|gen=c|num=c|mood=pastparticiple
741 v postype=main|gen=c|num=p|person=1|mood=imperative
742 v postype=main|gen=c|num=p|person=1|mood=indicative|tense=conditional
743 v postype=main|gen=c|num=p|person=1|mood=indicative|tense=future
744 v postype=main|gen=c|num=p|person=1|mood=indicative|tense=imperfect
745 v postype=main|gen=c|num=p|person=1|mood=indicative|tense=present
746 v postype=main|gen=c|num=p|person=1|mood=subjunctive|tense=imperfect
747 v postype=main|gen=c|num=p|person=1|mood=subjunctive|tense=present
748 v postype=main|gen=c|num=p|person=2|mood=indicative|tense=future
749 v postype=main|gen=c|num=p|person=2|mood=indicative|tense=present
750 v postype=main|gen=c|num=p|person=2|mood=subjunctive|tense=present
751 v postype=main|gen=c|num=p|person=3|mood=imperative
752 v postype=main|gen=c|num=p|person=3|mood=indicative|tense=conditional
753 v postype=main|gen=c|num=p|person=3|mood=indicative|tense=future
754 v postype=main|gen=c|num=p|person=3|mood=indicative|tense=imperfect
755 v postype=main|gen=c|num=p|person=3|mood=indicative|tense=past
756 v postype=main|gen=c|num=p|person=3|mood=indicative|tense=present
757 v postype=main|gen=c|num=p|person=3|mood=subjunctive|tense=imperfect
758 v postype=main|gen=c|num=p|person=3|mood=subjunctive|tense=present
759 v postype=main|gen=c|num=s|person=1|mood=indicative|tense=conditional
760 v postype=main|gen=c|num=s|person=1|mood=indicative|tense=future
761 v postype=main|gen=c|num=s|person=1|mood=indicative|tense=imperfect
762 v postype=main|gen=c|num=s|person=1|mood=indicative|tense=present
763 v postype=main|gen=c|num=s|person=1|mood=subjunctive|tense=imperfect
764 v postype=main|gen=c|num=s|person=1|mood=subjunctive|tense=present
765 v postype=main|gen=c|num=s|person=2|mood=imperative
766 v postype=main|gen=c|num=s|person=2|mood=indicative|tense=present
767 v postype=main|gen=c|num=s|person=2|mood=subjunctive|tense=present
768 v postype=main|gen=c|num=s|person=3|mood=imperative
769 v postype=main|gen=c|num=s|person=3|mood=indicative|tense=conditional
770 v postype=main|gen=c|num=s|person=3|mood=indicative|tense=future
771 v postype=main|gen=c|num=s|person=3|mood=indicative|tense=imperfect
772 v postype=main|gen=c|num=s|person=3|mood=indicative|tense=past
773 v postype=main|gen=c|num=s|person=3|mood=indicative|tense=present
774 v postype=main|gen=c|num=s|person=3|mood=subjunctive|tense=imperfect
775 v postype=main|gen=c|num=s|person=3|mood=subjunctive|tense=present
776 v postype=main|gen=f|num=p|mood=pastparticiple
777 v postype=main|gen=f|num=s|mood=pastparticiple
778 v postype=main|gen=m|num=p|mood=pastparticiple
779 v postype=main|gen=m|num=s|mood=pastparticiple
780 v postype=semiauxiliary|gen=c|num=c|mood=gerund
781 v postype=semiauxiliary|gen=c|num=c|mood=infinitive
782 v postype=semiauxiliary|gen=c|num=p|person=1|mood=indicative|tense=imperfect
783 v postype=semiauxiliary|gen=c|num=p|person=1|mood=indicative|tense=present
784 v postype=semiauxiliary|gen=c|num=p|person=1|mood=subjunctive|tense=present
785 v postype=semiauxiliary|gen=c|num=p|person=3|mood=imperative
786 v postype=semiauxiliary|gen=c|num=p|person=3|mood=indicative|tense=conditional
787 v postype=semiauxiliary|gen=c|num=p|person=3|mood=indicative|tense=future
788 v postype=semiauxiliary|gen=c|num=p|person=3|mood=indicative|tense=imperfect
789 v postype=semiauxiliary|gen=c|num=p|person=3|mood=indicative|tense=past
790 v postype=semiauxiliary|gen=c|num=p|person=3|mood=indicative|tense=present
791 v postype=semiauxiliary|gen=c|num=p|person=3|mood=subjunctive|tense=imperfect
792 v postype=semiauxiliary|gen=c|num=p|person=3|mood=subjunctive|tense=present
793 v postype=semiauxiliary|gen=c|num=s|person=1|mood=indicative|tense=imperfect
794 v postype=semiauxiliary|gen=c|num=s|person=1|mood=indicative|tense=present
795 v postype=semiauxiliary|gen=c|num=s|person=2|mood=indicative|tense=present
796 v postype=semiauxiliary|gen=c|num=s|person=3|mood=imperative
797 v postype=semiauxiliary|gen=c|num=s|person=3|mood=indicative|tense=conditional
798 v postype=semiauxiliary|gen=c|num=s|person=3|mood=indicative|tense=future
799 v postype=semiauxiliary|gen=c|num=s|person=3|mood=indicative|tense=imperfect
800 v postype=semiauxiliary|gen=c|num=s|person=3|mood=indicative|tense=past
801 v postype=semiauxiliary|gen=c|num=s|person=3|mood=indicative|tense=present
802 v postype=semiauxiliary|gen=c|num=s|person=3|mood=subjunctive|tense=imperfect
803 v postype=semiauxiliary|gen=c|num=s|person=3|mood=subjunctive|tense=present
804 v postype=semiauxiliary|gen=m|num=s|mood=pastparticiple
805 w _
806 z _
807 z postype=currency
808 z postype=percentage
809 end_of_list
810 ;
811 # Protect from editors that replace tabs by spaces.
812 $list =~ s/ \s+/\t/sg;
813 my @list = split(/\r?\n/, $list);
814 return \@list;
815 }
816  
817  
818  
819 1;
820  
821 __END__
822  
823 =pod
824  
825 =encoding UTF-8
826  
827 =head1 NAME
828  
829 Lingua::Interset::Tagset::CA::Conll2009 - Driver for the Catalan tagset of the CoNLL 2009 Shared Task.
830  
831 =head1 VERSION
832  
833 version 3.014
834  
835 =head1 SYNOPSIS
836  
837 use Lingua::Interset::Tagset::CA::Conll2009;
838 my $driver = Lingua::Interset::Tagset::CA::Conll2009->new();
839 my $fs = $driver->decode("n\tpostype=common|gen=m|num=s");
840  
841 or
842  
843 use Lingua::Interset qw(decode);
844 my $fs = decode('ca::conll2009', "n\tpostype=common|gen=m|num=s");
845  
846 =head1 DESCRIPTION
847  
848 Interset driver for the Catalan tagset of the CoNLL 2009 Shared Task.
849 CoNLL 2009 tagsets in Interset are traditionally two values separated by tabs.
850 The values come from the CoNLL 2009 columns POS and FEAT.
851  
852 Note that the C<ca::conll2009> and C<es::conll2009> tagsets are identical as
853 they both come from the AnCora Catalan-Spanish corpus. For convenience,
854 separate drivers called CA::Conll2009 and ES::Conll2009 are provided, but one
855 is derived from the other.
856  
857 =head1 SEE ALSO
858  
859 L<Lingua::Interset>,
860 L<Lingua::Interset::Tagset>,
861 L<Lingua::Interset::Tagset::ES::Conll2009>,
862 L<Lingua::Interset::FeatureStructure>
863  
864 =head1 AUTHOR
865  
866 Dan Zeman <zeman@ufal.mff.cuni.cz>
867  
868 =head1 COPYRIGHT AND LICENSE
869  
870 This software is copyright (c) 2019 by Univerzita Karlova (Charles University).
871  
872 This is free software; you can redistribute it and/or modify it under
873 the same terms as the Perl 5 programming language system itself.
874  
875 =cut