blob: 8daec8166e721bb40fa5ad7fa950c3e97fd94b07 [file] [log] [blame]
Akronf6833102022-02-17 18:35:03 +01001use strict;
2use warnings;
3use utf8;
4use Test::More;
5use Benchmark ':hireswallclock';
6use Mojo::DOM;
7use Mojo::File;
8use Mojo::ByteStream 'b';
9use Data::Dumper;
10use File::Basename 'dirname';
11use File::Spec::Functions 'catdir';
12use lib 'lib', '../lib';
13
14use_ok('KorAP::XML::Krill');
15
16# ART
17my $path = catdir(dirname(__FILE__), 'corpus','artificial');
18ok(my $doc = KorAP::XML::Krill->new( path => $path . '/' ), 'Load Korap::Document');
19
20ok($doc->parse, 'Parse document');
21
22$doc->parse;
23
24my $tokens = KorAP::XML::Tokenizer->new(
25 path => $doc->path,
26 doc => $doc,
27 foundry => 'OpenNLP',
28 layer => 'tokens_wrong',
29 name => 'Tokens'
30);
31
32# Order is wrong!
33ok(!$tokens->parse, 'Parse tokens');
34
35done_testing;
36__END__
37