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