Skip to content

Commit 8f120b9

Browse files
committed
Add a check for the sentIndex on the IndexedWords
1 parent 8ded013 commit 8f120b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

itest/src/edu/stanford/nlp/pipeline/CoNLLUReaderITest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ public void testReadingInEmpties() throws ClassNotFoundException, IOException {
422422
for (int i = 0; i < tokens.size(); ++i) {
423423
assertEquals(i+1, tokens.get(i).index());
424424
assertEquals(EXPECTED_ENGLISH_WORDS[i], tokens.get(i).value());
425+
assertEquals(0, tokens.get(i).sentIndex());
425426
}
426427

427428
List<CoreLabel> emptyTokens = sentence.get(CoreAnnotations.EmptyTokensAnnotation.class);
@@ -434,6 +435,9 @@ public void testReadingInEmpties() throws ClassNotFoundException, IOException {
434435

435436
SemanticGraph enhanced = sentence.get(SemanticGraphCoreAnnotations.EnhancedDependenciesAnnotation.class);
436437
assertEquals(EXPECTED_ENHANCED, enhanced);
438+
for (IndexedWord node : enhanced.vertexSet()) {
439+
assertEquals(0, node.sentIndex());
440+
}
437441

438442
assertEquals(" ", tokens.get(0).before());
439443
}

0 commit comments

Comments
 (0)