Ignore recursion in CoreNLP
Change-Id: I11cd4675aa483e499bbafe1aabf105f89ee3c62e
diff --git a/t/real/wpd.t b/t/real/wpd.t
index 02389e5..9ed0237 100644
--- a/t/real/wpd.t
+++ b/t/real/wpd.t
@@ -16,7 +16,6 @@
use_ok('KorAP::XML::Krill');
-# GOE/AGA/03828
my $path = catdir(dirname(__FILE__), '../corpus/WPD/00001');
ok(my $doc = KorAP::XML::Krill->new( path => $path . '/' ), 'Load Korap::Document');
@@ -84,6 +83,46 @@
is($stream->[0]->[2], '<>:base/s:s$<b>64<i>0<i>74<i>13<b>2', 'Text starts with sentence');
+
+# Problematic document
+$path = catdir(dirname(__FILE__), '../corpus/WPD15/W28/65631');
+ok($doc = KorAP::XML::Krill->new( path => $path . '/' ), 'Load Korap::Document');
+ok($doc->parse, 'Parse document');
+
+is($doc->text_sigle, 'WPD15/W28/65631', 'Correct text sigle');
+is($doc->doc_sigle, 'WPD15/W28', 'Correct document sigle');
+is($doc->corpus_sigle, 'WPD15', 'Correct corpus sigle');
+
+# Get tokenization
+$tokens = KorAP::XML::Tokenizer->new(
+ path => $doc->path,
+ doc => $doc,
+ foundry => 'Base',
+ layer => 'tokens_aggr',
+ name => 'tokens'
+);
+ok($tokens, 'Token Object is fine');
+ok($tokens->parse, 'Token parsing is fine');
+
+is($tokens->foundry, 'Base', 'Foundry');
+is($tokens->layer, 'tokens_aggr', 'Layer');
+
+
+# Initialize log4perl object
+Log::Log4perl->init({
+ 'log4perl.rootLogger' => 'DEBUG, STDERR',
+ 'log4perl.appender.STDERR' => 'Log::Log4perl::Appender::ScreenColoredLevels',
+ 'log4perl.appender.STDERR.layout' => 'PatternLayout',
+ 'log4perl.appender.STDERR.layout.ConversionPattern' => '[%r] %F %L %c - %m%n'
+});
+
+ok($tokens->add('CoreNLP', 'Constituency'), 'Add Structure');
+
+$output = $tokens->to_data;
+
+is($output->{data}->{foundries}, 'corenlp corenlp/constituency', 'Foundries');
+is($output->{data}->{layerInfos}, 'corenlp/c=spans', 'layerInfos');
+
done_testing;
__END__