blob: 2d38da11724bfe2c7508071984307e851e9cda4d [file] [log] [blame]
Akron627a80a2016-01-29 19:38:18 +01001#!/usr/bin/env perl
2use strict;
3use warnings;
4use utf8;
5use Test::More skip_all => 'Not yet implemented';
6use lib 't/index';
7use File::Basename 'dirname';
8use File::Spec::Functions 'catdir';
9
10my $path = catdir(dirname(__FILE__), 'corpus', 'doc', '0001');
11
12use_ok('KorAP::XML::Krill');
13
14ok(my $doc = KorAP::XML::Krill->new( path => $path . '/' ), 'Load Korap::Document');
15
16ok($doc->parse
17 ->tokenize
18 ->annotate('Base', 'Paragraphs')
19 ->annotate('DeReKo', 'Struct');
20
21# Metdata
22is($doc->text_sigle, 'Corpus_Doc.0001', 'ID-text');
23is($doc->doc_sigle, 'Corpus_Doc', 'ID-doc');
24is($doc->corpus_sigle, 'Corpus', 'ID-corpus');
25is($doc->title, 'Beispiel Text', 'title');
26is($doc->sub_title, 'Beispiel Text Untertitel', 'title');
27
28done_testing;
29__END__