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