blob: 16c8a65e354609ec38f40c67659b0ea797fdb2a8 [file] [log] [blame]
Akrond8e34e32015-12-11 18:49:50 +01001#!/usr/bin/env perl
2use strict;
3use warnings;
4use utf8;
5use Test::More;
6use Scalar::Util qw/weaken/;
7use Data::Dumper;
Akron5c460e42016-03-14 20:12:14 +01008use lib 't/annotation';
Akronb5d34612016-01-18 19:07:56 +01009use TestInit;
Akrond8e34e32015-12-11 18:49:50 +010010
Akronb5d34612016-01-18 19:07:56 +010011ok(my $tokens = TestInit::tokens('0001'), 'Parse tokens');
Akrond8e34e32015-12-11 18:49:50 +010012
13ok($tokens->add('OpenNLP', 'Sentences'), 'Add Structure');
14
15my $data = $tokens->to_data->{data};
16
17like($data->{foundries}, qr!opennlp/sentences!, 'data');
18is($data->{stream}->[0]->[0], '-:opennlp/sentences$<i>1', 'Number of Sentences');
19is($data->{stream}->[0]->[1], '-:tokens$<i>18', 'Number of tokens');
Akronf6b20412016-02-25 23:56:49 +010020is($data->{stream}->[0]->[3], '<>:opennlp/s:s$<b>64<i>0<i>129<i>17<b>0', 'Sentence');
21is($data->{stream}->[0]->[4], '_0$<i>0<i>3', 'Position');
Akrond8e34e32015-12-11 18:49:50 +010022
23done_testing;
24
25__END__