blob: 446e5ad51e1c0974cef46ebbe871a37f5d50ef37 [file] [log] [blame]
Akron6989df72016-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;
Akronb5d34612016-01-18 19:07:56 +01008use lib 't/index';
9use TestInit;
Akron6989df72016-01-07 13:49:34 +010010
Akronb5d34612016-01-18 19:07:56 +010011ok(my $tokens = TestInit::tokens('0001'), 'Parse tokens');
Akron6989df72016-01-07 13:49:34 +010012
Akronb5d34612016-01-18 19:07:56 +010013ok($tokens->add('XIP', 'Dependency'), 'Add Structure');
Akron6989df72016-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