Added structure parsing
Change-Id: I3352f720b4588a19adbc91693ff85b8f70ce2111
diff --git a/t/index/TestInit.pm b/t/index/TestInit.pm
new file mode 100644
index 0000000..f740cad
--- /dev/null
+++ b/t/index/TestInit.pm
@@ -0,0 +1,32 @@
+package TestInit;
+use strict;
+use warnings;
+use File::Basename 'dirname';
+use File::Spec::Functions 'catdir';
+use KorAP::Tokenizer;
+use KorAP::Document;
+
+sub tokens {
+ my $file = shift;
+ my $path = catdir(dirname(__FILE__), 'corpus', 'doc', $file);
+
+ my $doc = KorAP::Document->new(
+ path => $path . '/'
+ ) or return;
+
+ $doc->parse;
+
+ my $tokens = KorAP::Tokenizer->new(
+ path => $doc->path,
+ doc => $doc,
+ foundry => 'OpenNLP',
+ layer => 'Tokens',
+ name => 'tokens'
+ ) or return;
+
+ $tokens->parse or return;
+
+ return $tokens;
+};
+
+1;