blob: ca0e71b2728a55fe732137e53da18a7275e45f4b [file] [log] [blame]
Akron430ada32016-01-07 13:49:34 +01001#!/usr/bin/env perl
2use strict;
3use warnings;
4use utf8;
Akrondcbee642020-10-30 18:01:43 +01005use KorAP::XML::Annotation::XIP::Dependency;
Akron430ada32016-01-07 13:49:34 +01006use Test::More skip_all => 'Not yet implemented';
7use Scalar::Util qw/weaken/;
8use Data::Dumper;
Akron151676d2016-03-14 20:12:14 +01009use lib 't/annotation';
Akron11ef51d2016-01-18 19:07:56 +010010use TestInit;
Akron430ada32016-01-07 13:49:34 +010011
Akron11ef51d2016-01-18 19:07:56 +010012ok(my $tokens = TestInit::tokens('0001'), 'Parse tokens');
Akron430ada32016-01-07 13:49:34 +010013
Akron11ef51d2016-01-18 19:07:56 +010014ok($tokens->add('XIP', 'Dependency'), 'Add Structure');
Akron430ada32016-01-07 13:49:34 +010015
16my $data = $tokens->to_data->{data};
17
18
19# diag Dumper $data;
20
21done_testing;
22
23__END__
24
25
26
27like($data->{foundries}, qr!xip/morpho!, 'data');
28like($data->{layerInfos}, qr!xip/l=tokens!, 'data');
29like($data->{layerInfos}, qr!xip/p=tokens!, 'data');
30is($data->{stream}->[0]->[4], 'xip/l:zu', 'Lemma');
31is($data->{stream}->[0]->[5], 'xip/p:PREP', 'POS');
32
33is($data->{stream}->[1]->[3], 'xip/l:letzt', 'Lemma');
34is($data->{stream}->[1]->[4], 'xip/p:ADJ', 'POS');
35
36is($data->{stream}->[8]->[3], 'xip/l:\#Heim', 'Lemma (part)');
37is($data->{stream}->[8]->[4], 'xip/l:\#schulen', 'Lemma (part)');
38is($data->{stream}->[8]->[5], 'xip/l:schulen\#Heim', 'Lemma (part)');
39
40is($data->{stream}->[-1]->[3], 'xip/l:werden', 'Lemma');
41is($data->{stream}->[-1]->[4], 'xip/p:VERB', 'POS');
42