Akron | 430ada3 | 2016-01-07 13:49:34 +0100 | [diff] [blame] | 1 | #!/usr/bin/env perl |
| 2 | use strict; |
| 3 | use warnings; |
| 4 | use utf8; |
Akron | dcbee64 | 2020-10-30 18:01:43 +0100 | [diff] [blame] | 5 | use KorAP::XML::Annotation::XIP::Dependency; |
Akron | 430ada3 | 2016-01-07 13:49:34 +0100 | [diff] [blame] | 6 | use Test::More skip_all => 'Not yet implemented'; |
| 7 | use Scalar::Util qw/weaken/; |
| 8 | use Data::Dumper; |
Akron | 151676d | 2016-03-14 20:12:14 +0100 | [diff] [blame] | 9 | use lib 't/annotation'; |
Akron | 11ef51d | 2016-01-18 19:07:56 +0100 | [diff] [blame] | 10 | use TestInit; |
Akron | 430ada3 | 2016-01-07 13:49:34 +0100 | [diff] [blame] | 11 | |
Akron | 11ef51d | 2016-01-18 19:07:56 +0100 | [diff] [blame] | 12 | ok(my $tokens = TestInit::tokens('0001'), 'Parse tokens'); |
Akron | 430ada3 | 2016-01-07 13:49:34 +0100 | [diff] [blame] | 13 | |
Akron | 11ef51d | 2016-01-18 19:07:56 +0100 | [diff] [blame] | 14 | ok($tokens->add('XIP', 'Dependency'), 'Add Structure'); |
Akron | 430ada3 | 2016-01-07 13:49:34 +0100 | [diff] [blame] | 15 | |
| 16 | my $data = $tokens->to_data->{data}; |
| 17 | |
| 18 | |
| 19 | # diag Dumper $data; |
| 20 | |
| 21 | done_testing; |
| 22 | |
| 23 | __END__ |
| 24 | |
| 25 | |
| 26 | |
| 27 | like($data->{foundries}, qr!xip/morpho!, 'data'); |
| 28 | like($data->{layerInfos}, qr!xip/l=tokens!, 'data'); |
| 29 | like($data->{layerInfos}, qr!xip/p=tokens!, 'data'); |
| 30 | is($data->{stream}->[0]->[4], 'xip/l:zu', 'Lemma'); |
| 31 | is($data->{stream}->[0]->[5], 'xip/p:PREP', 'POS'); |
| 32 | |
| 33 | is($data->{stream}->[1]->[3], 'xip/l:letzt', 'Lemma'); |
| 34 | is($data->{stream}->[1]->[4], 'xip/p:ADJ', 'POS'); |
| 35 | |
| 36 | is($data->{stream}->[8]->[3], 'xip/l:\#Heim', 'Lemma (part)'); |
| 37 | is($data->{stream}->[8]->[4], 'xip/l:\#schulen', 'Lemma (part)'); |
| 38 | is($data->{stream}->[8]->[5], 'xip/l:schulen\#Heim', 'Lemma (part)'); |
| 39 | |
| 40 | is($data->{stream}->[-1]->[3], 'xip/l:werden', 'Lemma'); |
| 41 | is($data->{stream}->[-1]->[4], 'xip/p:VERB', 'POS'); |
| 42 | |