blob: 10d44298d8c3bef4ff23d1e607f1be8370dadbd1 [file] [log] [blame]
Nils Diewald98767bb2014-04-25 20:31:19 +00001#!/usr/bin/env perl
2# source ~/perl5/perlbrew/etc/bashrc
3# perlbrew switch perl-blead@korap
4use strict;
5use warnings;
6use utf8;
7use Test::More;
8use Benchmark ':hireswallclock';
9use lib 'lib', '../lib';
10use Scalar::Util qw/weaken/;
11
12use File::Basename 'dirname';
13use File::Spec::Functions 'catdir';
14
15use_ok('KorAP::Document');
16
17my $path = catdir(dirname(__FILE__), 'artificial');
18ok(my $doc = KorAP::Document->new( path => $path . '/' ), 'Load Korap::Document');
19is($doc->path, $path . '/', 'Path');
20ok($doc->parse, 'Parse document');
21
22sub new_tokenizer {
23 my $x = $doc;
24 weaken $x;
25 return KorAP::Tokenizer->new(
26 path => $x->path,
27 doc => $x,
28 foundry => 'OpenNLP',
29 layer => 'Tokens',
30 name => 'tokens'
31 )
32};
33
34is($doc->primary->data,
35 'Zum letzten kulturellen Anlass lädt die Leitung des Schulheimes Hofbergli ein, '.
36 'bevor der Betrieb Ende Schuljahr eingestellt wird.', 'Primary data');
37
38is($doc->primary->data_length, 129, 'Primary data length');
39
40is($doc->primary->data(0,3), 'Zum', 'Get primary data');
41
42# Get tokens
43use_ok('KorAP::Tokenizer');
44# Get tokenization
45ok(my $tokens = KorAP::Tokenizer->new(
46 path => $doc->path,
47 doc => $doc,
48 foundry => 'OpenNLP',
49 layer => 'Tokens',
50 name => 'tokens'
51), 'New Tokenizer');
52ok($tokens->parse, 'Parse');
53
54is($tokens->foundry, 'OpenNLP', 'Foundry');
55
Nils Diewald7ec51532014-10-28 19:51:26 +000056is($tokens->doc->text_sigle, 'ART_ABC.00001', 'Doc id');
Nils Diewald98767bb2014-04-25 20:31:19 +000057is($tokens->should, 20, 'Should');
58is($tokens->have, 18, 'Have');
59is($tokens->name, 'tokens', 'Name');
60is($tokens->layer, 'Tokens', 'Layer');
61
Nils Diewalda5565f62014-10-30 23:20:58 +000062is($tokens->stream->pos(0)->to_string, '[(0-3)-:tokens$<i>18|_0#0-3|i:zum|s:Zum]', 'Token is correct');
63
64is($tokens->stream->pos(1)->to_string, '[(4-11)_1#4-11|i:letzten|s:letzten]', 'Token is correct');
Nils Diewald98767bb2014-04-25 20:31:19 +000065
66my $i = 2;
67foreach ([12,23, 'kulturellen'],
68 [24,30, 'Anlass'],
69 [31,35, 'lädt'],
70 [36,39, 'die'],
71 [40,47, 'Leitung'],
72 [48,51, 'des'],
73 [52,63, 'Schulheimes'],
74 [64,73, 'Hofbergli'],
75 [74,77, 'ein'],
76 [79,84, 'bevor'],
77 [85,88, 'der'],
78 [89,96, 'Betrieb'],
79 [97,101, 'Ende'],
80 [102,111, 'Schuljahr'],
81 [112,123, 'eingestellt'],
82 [124,128, 'wird']
83 ) {
84 is($tokens->stream->pos($i++)->to_string,
85 '[('.$_->[0].'-'.$_->[1].')'.
Nils Diewalda5565f62014-10-30 23:20:58 +000086 '_'.($i-1).'#'.$_->[0].'-'.$_->[1] . '|' .
87 'i:'.lc($_->[2]).'|s:'.$_->[2].']',
Nils Diewald98767bb2014-04-25 20:31:19 +000088 'Token is correct');
89};
90
91ok(!$tokens->stream->pos($i++), 'No more tokens');
92
93# Add OpenNLP/morpho
94ok($tokens->add('OpenNLP', 'Morpho'), 'Add OpenNLP/Morpho');
95
Nils Diewalda5565f62014-10-30 23:20:58 +000096
Nils Diewald98767bb2014-04-25 20:31:19 +000097$i = 0;
98foreach (qw/APPRART ADJA ADJA NN VVFIN ART NN ART NN NE PTKVZ KOUS ART NN NN NN VVPP VAFIN/) {
99 like($tokens->stream->pos($i++)->to_string,
100 qr!\|opennlp/p:$_!,
Nils Diewald21a3e1a2014-04-28 18:48:16 +0000101 'Annotation (OpenNLP/p) is correct: ' . $_
102 );
Nils Diewald98767bb2014-04-25 20:31:19 +0000103};
104
105# Add OpenNLP/sentences
106ok($tokens->add('OpenNLP', 'Sentences'), 'Add OpenNLP/Sentences');
107
Nils Diewalda5565f62014-10-30 23:20:58 +0000108is($tokens->stream->pos(0)->to_string, '[(0-3)-:opennlp/sentences$<i>1|-:tokens$<i>18|_0#0-3|i:zum|s:Zum|opennlp/p:APPRART|<>:opennlp/s:s#0-129$<i>17]', 'Correct sentence');
Nils Diewald98767bb2014-04-25 20:31:19 +0000109
110# New instantiation
111ok($tokens = KorAP::Tokenizer->new(
112 path => $doc->path,
113 doc => $doc,
114 foundry => 'OpenNLP',
115 layer => 'Tokens',
116 name => 'tokens'
117), 'New Tokenizer');
118
119ok($tokens->parse, 'Parse');
120
121# Add OpenNLP/sentences
122ok($tokens->add('Base', 'Sentences'), 'Add Base/Sentences');
123
124# Add OpenNLP/sentences
125ok($tokens->add('Base', 'Paragraphs'), 'Add Base/Paragraphs');
126
127is($tokens->stream->pos(0)->to_string,
Nils Diewalda5565f62014-10-30 23:20:58 +0000128 '[(0-3)-:base/paragraphs$<i>0|-:base/sentences$<i>1|-:tokens$<i>18|_0#0-3|i:zum|s:Zum|<>:base/s:t#0-129$<i>17<b>0|<>:base/s:s#0-129$<i>17<b>0]',
Nils Diewald98767bb2014-04-25 20:31:19 +0000129 'Correct base annotation');
130
131
132# New instantiation
Nils Diewald21a3e1a2014-04-28 18:48:16 +0000133ok($tokens = new_tokenizer->parse, 'Parse');
Nils Diewald98767bb2014-04-25 20:31:19 +0000134
135# Add CoreNLP/NamedEntities
136ok($tokens->add('CoreNLP', 'NamedEntities', 'ne_dewac_175m_600'), 'Add CoreNLP/NamedEntities');
137ok($tokens->add('CoreNLP', 'NamedEntities', 'ne_hgc_175m_600'), 'Add CoreNLP/NamedEntities');
138
Nils Diewalda5565f62014-10-30 23:20:58 +0000139# [(64-73)s:Hofbergli|i:hofbergli|_9#64-73|corenlp/ne_dewac_175m_600:I-LOC|corenlp/ne_hgc_175m_600:I-LOC]
Nils Diewald98767bb2014-04-25 20:31:19 +0000140is($tokens->stream->pos(9)->to_string,
Nils Diewalda5565f62014-10-30 23:20:58 +0000141 '[(64-73)_9#64-73|corenlp/ne:I-LOC|i:hofbergli|s:Hofbergli]',
Nils Diewald98767bb2014-04-25 20:31:19 +0000142 'Correct NamedEntities annotation');
143
Nils Diewald98767bb2014-04-25 20:31:19 +0000144# New instantiation
Nils Diewald21a3e1a2014-04-28 18:48:16 +0000145ok($tokens = new_tokenizer->parse, 'Parse');
Nils Diewald98767bb2014-04-25 20:31:19 +0000146
147# Add CoreNLP/Morpho
148ok($tokens->add('CoreNLP', 'Morpho'), 'Add CoreNLP/Morpho');
149
150is($tokens->stream->pos(0)->to_string,
Nils Diewalda5565f62014-10-30 23:20:58 +0000151 '[(0-3)-:tokens$<i>18|_0#0-3|i:zum|s:Zum|corenlp/p:APPRART]',
Nils Diewald98767bb2014-04-25 20:31:19 +0000152 'Correct corenlp annotation');
153
154$i = 0;
155foreach (qw/APPRART ADJ ADJA NN VVFIN ART NN ART NN NE PTKVZ KOUS ART NN NN NN VVPP VAFIN/) {
156 like($tokens->stream->pos($i++)->to_string,
157 qr!\|corenlp/p:$_!,
Nils Diewald21a3e1a2014-04-28 18:48:16 +0000158 'Annotation (CoreNLP/p) is correct: '. $_);
Nils Diewald98767bb2014-04-25 20:31:19 +0000159};
160
161# Add CoreNLP/Sentences
162ok($tokens->add('CoreNLP', 'Sentences'), 'Add CoreNLP/Sentences');
163
164is($tokens->stream->pos(0)->to_string,
Nils Diewalda5565f62014-10-30 23:20:58 +0000165 '[(0-3)-:corenlp/sentences$<i>1|-:tokens$<i>18|_0#0-3|i:zum|s:Zum|corenlp/p:APPRART|<>:corenlp/s:s#0-129$<i>17]',
Nils Diewald98767bb2014-04-25 20:31:19 +0000166 'Correct corenlp annotation');
167
Nils Diewald98767bb2014-04-25 20:31:19 +0000168# New instantiation
Nils Diewald21a3e1a2014-04-28 18:48:16 +0000169ok($tokens = new_tokenizer->parse, 'New Tokenizer');
Nils Diewald98767bb2014-04-25 20:31:19 +0000170
171# Add CoreNLP/Sentences
172ok($tokens->add('Connexor', 'Sentences'), 'Add Connexor/Sentences');
173
174is($tokens->stream->pos(0)->to_string,
Nils Diewalda5565f62014-10-30 23:20:58 +0000175 '[(0-3)-:cnx/sentences$<i>1|-:tokens$<i>18|_0#0-3|i:zum|s:Zum|<>:cnx/s:s#0-129$<i>17<b>0]',
Nils Diewald98767bb2014-04-25 20:31:19 +0000176 'Correct cnx annotation');
177
Nils Diewald21a3e1a2014-04-28 18:48:16 +0000178# New instantiation
179ok($tokens = new_tokenizer->parse, 'New Tokenizer');
180
181# Add Connexor/Morpho
182ok($tokens->add('Connexor', 'Morpho'), 'Add Connexor/Morpho');
183
184$i = 0;
185foreach (qw/! A A N V DET N DET N N NUM CS DET N N N V V/) {
186 if ($_ eq '!') {
187 $i++;
188 next;
189 };
190 like($tokens->stream->pos($i++)->to_string,
191 qr!\|cnx/p:$_!,
192 'Annotation (Connexor/p) is correct: ' . $_);
193};
194
Nils Diewalda5565f62014-10-30 23:20:58 +0000195
Nils Diewald21a3e1a2014-04-28 18:48:16 +0000196$i = 0;
197foreach (qw/! ! ! ! IND:PRES ! ! ! ! Prop ! ! ! ! ! ! PCP:PERF IND:PRES/) {
198 if ($_ eq '!') {
199 $i++;
200 next;
201 };
202 foreach my $f (split(':', $_)) {
203 like($tokens->stream->pos($i)->to_string,
204 qr!\|cnx/m:$f!,
205 'Annotation (Connexor/m) is correct: '. $f);
206 };
207 $i++;
208};
209
210# New instantiation
211ok($tokens = new_tokenizer->parse, 'New Tokenizer');
212
213# Add Connexor/Phrase
214ok($tokens->add('Connexor', 'Phrase'), 'Add Connexor/Phrase');
215my $stream = $tokens->stream;
Nils Diewalda5565f62014-10-30 23:20:58 +0000216like($stream->pos(1)->to_string, qr!\|<>:cnx/c:np#4-30\$<i>4<b>0!, 'Annotation (Connexor/c) is correct');
217like($stream->pos(6)->to_string, qr!\|<>:cnx/c:np#40-47\$<i>7<b>0!, 'Annotation (Connexor/c) is correct');
218like($stream->pos(8)->to_string, qr!\|<>:cnx/c:np#52-73\$<i>10<b>0!, 'Annotation (Connexor/c) is correct');
219like($stream->pos(13)->to_string, qr!\|<>:cnx/c:np#89-111\$<i>16<b>0!, 'Annotation (Connexor/c) is correct');
Nils Diewald21a3e1a2014-04-28 18:48:16 +0000220
221# New instantiation
222ok($tokens = new_tokenizer->parse, 'New Tokenizer');
223
224# Add Connexor/Syntax
225ok($tokens->add('Connexor', 'Syntax'), 'Add Connexor/Syntax');
226$stream = $tokens->stream;
227
228$i = 0;
229foreach (qw/! @PREMOD @PREMOD @NH @MAIN @PREMOD @NH @PREMOD
230 @PREMOD @NH @NH @PREMARK @PREMOD @PREMOD @NH @NH @MAIN @AUX/) {
231 if ($_ eq '!') {
232 $i++;
233 next;
234 };
235 like($tokens->stream->pos($i++)->to_string,
236 qr!\|cnx/syn:$_!,
237 'Annotation (Connexor/syn) is correct: ' . $_);
238};
239
240# New instantiation
241ok($tokens = new_tokenizer->parse, 'New Tokenizer');
242
243# Add XIP/Sentences
244ok($tokens->add('XIP', 'Sentences'), 'Add XIP/Sentences');
245
Nils Diewalda5565f62014-10-30 23:20:58 +0000246is($tokens->stream->pos(0)->to_string, '[(0-3)-:tokens$<i>18|_0#0-3|i:zum|s:Zum|-:xip/sentences$<i>1|<>:xip/s:s#0-129$<i>17<b>0]', 'First sentence');
Nils Diewald21a3e1a2014-04-28 18:48:16 +0000247
248# Add XIP/Morpho
249ok($tokens->add('XIP', 'Morpho'), 'Add XIP/Morpho');
250$stream = $tokens->stream;
251
252$i = 0;
253foreach (qw/PREP ADJ ADJ NOUN VERB DET NOUN DET NOUN NOUN PTCL CONJ DET NOUN NOUN NOUN VERB VERB/) {
254 if ($_ eq '!') {
255 $i++;
256 next;
257 };
258 like($tokens->stream->pos($i++)->to_string,
259 qr!\|xip/p:$_!,
260 'Annotation (xip/p) is correct: ' . $_);
261};
262
263$i = 0;
264foreach ('zu', 'letzt', 'kulturell', 'Anlass', '=laden:laden', 'die', 'Leitung', 'der', '#schulen:#Heim:schulen#Heim', 'Hofbergli', 'ein', 'bevor', 'der', 'Betrieb', 'Ende', '#schulen:#Jahr:schulen#Jahr') {
265 if ($_ eq '!') {
266 $i++;
267 next;
268 };
269 foreach my $f (split(':', $_)) {
270 like($tokens->stream->pos($i)->to_string,
271 qr!\|xip/l:$f!,
272 'Annotation (xip/l) is correct: ' . $f);
273 };
274 $i++;
275};
276
277# New instantiation
278ok($tokens = new_tokenizer->parse, 'New Tokenizer');
279
280# Add XIP/Sentences
Nils Diewald47c3ef32014-04-30 19:13:17 +0000281ok($tokens->add('XIP', 'Dependency'), 'Add XIP/Dependency');
Nils Diewald21a3e1a2014-04-28 18:48:16 +0000282
283$stream = $tokens->stream;
284like($stream->pos(1)->to_string, qr!\|>:xip/d:NMOD\$<i>3!, 'Dependency fine');
285like($stream->pos(3)->to_string, qr!\|<:xip/d:NMOD\$<i>1!, 'Dependency fine');
286like($stream->pos(3)->to_string, qr!\|<:xip/d:NMOD\$<i>2!, 'Dependency fine');
287like($stream->pos(4)->to_string, qr!\|>xip/d:VMAIN\$<i>4!, 'Dependency fine');
288like($stream->pos(4)->to_string, qr!\|<:xip/d:SUBJ\$<i>6!, 'Dependency fine');
289like($stream->pos(4)->to_string, qr!\|<:xip/d:VPREF\$<i>10!, 'Dependency fine');
290like($stream->pos(5)->to_string, qr!\|>:xip/d:DETERM\$<i>6!, 'Dependency fine');
291like($stream->pos(6)->to_string, qr!\|<:xip/d:DETERM\$<i>5!, 'Dependency fine');
292like($stream->pos(6)->to_string, qr!\|>:xip/d:SUBJ\$<i>4!, 'Dependency fine');
293like($stream->pos(6)->to_string, qr!\|<:xip/d:NMOD\$<i>8!, 'Dependency fine');
294like($stream->pos(7)->to_string, qr!\|>:xip/d:DETERM\$<i>8!, 'Dependency fine');
295like($stream->pos(8)->to_string, qr!\|<:xip/d:DETERM\$<i>7!, 'Dependency fine');
296like($stream->pos(8)->to_string, qr!\|>:xip/d:NMOD\$<i>6!, 'Dependency fine');
297like($stream->pos(8)->to_string, qr!\|<:xip/d:NMOD\$<i>9!, 'Dependency fine');
298like($stream->pos(9)->to_string, qr!\|>:xip/d:NMOD\$<i>8!, 'Dependency fine');
299like($stream->pos(10)->to_string, qr!\|>:xip/d:VPREF\$<i>4!, 'Dependency fine');
300like($stream->pos(11)->to_string, qr!\|>:xip/d:CONNECT\$<i>16!, 'Dependency fine');
301like($stream->pos(12)->to_string, qr!\|>:xip/d:DETERM\$<i>13!, 'Dependency fine');
302like($stream->pos(13)->to_string, qr!\|<:xip/d:DETERM\$<i>12!, 'Dependency fine');
303like($stream->pos(13)->to_string, qr!\|>:xip/d:SUBJ\$<i>16!, 'Dependency fine');
304like($stream->pos(14)->to_string, qr!\|>:xip/d:OBJ\$<i>16!, 'Dependency fine');
305like($stream->pos(15)->to_string, qr!\|>:xip/d:OBJ\$<i>16!, 'Dependency fine');
306like($stream->pos(16)->to_string, qr!\|<:xip/d:CONNECT\$<i>11!, 'Dependency fine');
307like($stream->pos(16)->to_string, qr!\|<:xip/d:SUBJ\$<i>13!, 'Dependency fine');
308like($stream->pos(16)->to_string, qr!\|<:xip/d:OBJ\$<i>14!, 'Dependency fine');
309like($stream->pos(16)->to_string, qr!\|<:xip/d:OBJ\$<i>15!, 'Dependency fine');
310like($stream->pos(16)->to_string, qr!\|>:xip/d:AUXIL\$<i>17!, 'Dependency fine');
311like($stream->pos(16)->to_string, qr!\|>xip/d:VMAIN\$<i>16!, 'Dependency fine');
312like($stream->pos(16)->to_string, qr!\|<xip/d:VMAIN\$<i>16!, 'Dependency fine');
313like($stream->pos(17)->to_string, qr!\|<:xip/d:AUXIL\$<i>16!, 'Dependency fine');
314
Nils Diewald47c3ef32014-04-30 19:13:17 +0000315# New instantiation
316ok($tokens = new_tokenizer->parse, 'New Tokenizer');
317
318# Add XIP/Sentences
319ok($tokens->add('XIP', 'Constituency'), 'Add XIP/Constituency');
320
321$stream = $tokens->stream;
322like($stream->pos(0)->to_string, qr!\|<>:xip/c:TOP#0-129\$<i>17!, 'Constituency fine');
323like($stream->pos(0)->to_string, qr!\|<>:xip/c:MC#0-129\$<i>17<b>1!, 'Constituency fine');
324like($stream->pos(0)->to_string, qr!\|<>:xip/c:PP#0-30\$<i>4<b>2!, 'Constituency fine');
325like($stream->pos(0)->to_string, qr!\|<>:xip/c:PREP#0-3\$<i>1!, 'Constituency fine');
326
327like($stream->pos(1)->to_string, qr!\|<>:xip/c:NP#4-30\$<i>4<b>3!, 'Constituency fine');
328like($stream->pos(1)->to_string, qr!\|<>:xip/c:NPA#4-30\$<i>4<b>4!, 'Constituency fine');
329like($stream->pos(1)->to_string, qr!\|<>:xip/c:AP#4-11\$<i>2<b>5!, 'Constituency fine');
330like($stream->pos(1)->to_string, qr!\|<>:xip/c:ADJ#4-11\$<i>2<b>6!, 'Constituency fine');
331
332like($stream->pos(2)->to_string, qr!\|<>:xip/c:AP#12-23\$<i>3<b>5!, 'Constituency fine');
333like($stream->pos(2)->to_string, qr!\|<>:xip/c:ADJ#12-23\$<i>3<b>6!, 'Constituency fine');
334
335like($stream->pos(3)->to_string, qr!\|<>:xip/c:NOUN#24-30\$<i>4<b>5!, 'Constituency fine');
336
337like($stream->pos(4)->to_string, qr!\|<>:xip/c:VERB#31-35\$<i>5<b>2!, 'Constituency fine');
338
339like($stream->pos(5)->to_string, qr!\|<>:xip/c:NP#36-47\$<i>7<b>2!, 'Constituency fine');
340like($stream->pos(5)->to_string, qr!\|<>:xip/c:DET#36-39\$<i>6<b>3!, 'Constituency fine');
341
342like($stream->pos(6)->to_string, qr!\|<>:xip/c:NPA#40-47\$<i>7<b>3!, 'Constituency fine');
343like($stream->pos(6)->to_string, qr!\|<>:xip/c:NOUN#40-47\$<i>7<b>4!, 'Constituency fine');
344
345like($stream->pos(7)->to_string, qr!\|<>:xip/c:NP#48-63\$<i>9<b>2!, 'Constituency fine');
346like($stream->pos(7)->to_string, qr!\|<>:xip/c:DET#48-51\$<i>8<b>3!, 'Constituency fine');
347
348like($stream->pos(8)->to_string, qr!\|<>:xip/c:NPA#52-63\$<i>9<b>3!, 'Constituency fine');
349like($stream->pos(8)->to_string, qr!\|<>:xip/c:NOUN#52-63\$<i>9<b>4!, 'Constituency fine');
350
351like($stream->pos(9)->to_string, qr!\|<>:xip/c:NP#64-73\$<i>10<b>2!, 'Constituency fine');
352like($stream->pos(9)->to_string, qr!\|<>:xip/c:NPA#64-73\$<i>10<b>3!, 'Constituency fine');
353like($stream->pos(9)->to_string, qr!\|<>:xip/c:NOUN#64-73\$<i>10<b>4!, 'Constituency fine');
354
355like($stream->pos(10)->to_string, qr!\|<>:xip/c:PTCL#74-77\$<i>11<b>2!, 'Constituency fine');
356
357like($stream->pos(11)->to_string, qr!\|<>:xip/c:SC#79-128\$<i>18!, 'Constituency fine');
358like($stream->pos(11)->to_string, qr!\|<>:xip/c:CONJ#79-84\$<i>12<b>1!, 'Constituency fine');
359
360like($stream->pos(12)->to_string, qr!\|<>:xip/c:NP#85-96\$<i>14<b>1!, 'Constituency fine');
361like($stream->pos(12)->to_string, qr!\|<>:xip/c:DET#85-88\$<i>13<b>2!, 'Constituency fine');
362
363
364like($stream->pos(13)->to_string, qr!\|<>:xip/c:NPA#89-96\$<i>14<b>2!, 'Constituency fine');
365like($stream->pos(13)->to_string, qr!\|<>:xip/c:NOUN#89-96\$<i>14<b>3!, 'Constituency fine');
366
367like($stream->pos(14)->to_string, qr!\|<>:xip/c:NP#97-101\$<i>15<b>1!, 'Constituency fine');
368like($stream->pos(14)->to_string, qr!\|<>:xip/c:NPA#97-101\$<i>15<b>2!, 'Constituency fine');
369like($stream->pos(14)->to_string, qr!\|<>:xip/c:NOUN#97-101\$<i>15<b>3!, 'Constituency fine');
370
371like($stream->pos(15)->to_string, qr!\|<>:xip/c:NP#102-111\$<i>16<b>1!, 'Constituency fine');
372like($stream->pos(15)->to_string, qr!\|<>:xip/c:NPA#102-111\$<i>16<b>2!, 'Constituency fine');
373like($stream->pos(15)->to_string, qr!\|<>:xip/c:NOUN#102-111\$<i>16<b>3!, 'Constituency fine');
374
375like($stream->pos(16)->to_string, qr!\|<>:xip/c:VERB#112-123\$<i>17<b>1!, 'Constituency fine');
376
377like($stream->pos(17)->to_string, qr!\|<>:xip/c:VERB#124-128\$<i>18<b>1!, 'Constituency fine');
378
379# diag $stream->to_string;
380
Nils Diewald21a3e1a2014-04-28 18:48:16 +0000381
382# ADJA ADJA NN VVFIN ART NN ART NN NE PTKVZ KOUS ART NN NN NN VVPP VAFIN
383done_testing;
384__END__
Nils Diewald98767bb2014-04-25 20:31:19 +0000385
386
387# Todo: CoreNLP/Constituency!
Nils Diewald98767bb2014-04-25 20:31:19 +0000388
389
Nils Diewald98767bb2014-04-25 20:31:19 +0000390
391
392
393# Connexor
394push(@layers, ['Connexor', 'Morpho']);
395push(@layers, ['Connexor', 'Syntax']);
396push(@layers, ['Connexor', 'Phrase']);
397push(@layers, ['Connexor', 'Sentences']);
398
399# TreeTagger
400push(@layers, ['TreeTagger', 'Morpho']);
401push(@layers, ['TreeTagger', 'Sentences']);
402
403# Mate
404# push(@layers, ['Mate', 'Morpho']);
405push(@layers, ['Mate', 'Dependency']);
406
407# XIP
408push(@layers, ['XIP', 'Morpho']);
409push(@layers, ['XIP', 'Constituency']);
410push(@layers, ['XIP', 'Dependency']);
411push(@layers, ['XIP', 'Sentences']);
412
413
Nils Diewald98767bb2014-04-25 20:31:19 +0000414__END__