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