ChunkSample { public Span[] getPhrasesAsSpanList() { return phrasesAsSpanList(getSentence(), getTags(), getPreds()); } ChunkSample(String[] sentence, String[] tags, String[] preds);  ChunkSample(List<String> sentence, List<String> tags, List<String> preds); String[] getSentence(); String[] getTags(); String[] getPreds(); Span[] getPhrasesAsSpanList(); static Span[] phrasesAsSpanList(String[] aSentence, String[] aTags,
      String[] aPreds); String nicePrint(); @Override String toString(); @Override boolean equals(Object obj);  }
@Test public void testAsSpan() { ChunkSample sample = new ChunkSample(createSentence(), createTags(), createChunks()); Span[] spans = sample.getPhrasesAsSpanList(); assertEquals(10, spans.length); assertEquals(new Span(0, 1, "NP"), spans[0]); assertEquals(new Span(1, 2, "PP"), spans[1]); assertEquals(new Span(2, 5, "NP"), spans[2]); assertEquals(new Span(5, 6, "VP"), spans[3]); assertEquals(new Span(6, 7, "ADVP"), spans[4]); assertEquals(new Span(8, 9, "NP"), spans[5]); assertEquals(new Span(9, 10, "PP"), spans[6]); assertEquals(new Span(10, 13, "NP"), spans[7]); assertEquals(new Span(13, 14, "VP"), spans[8]); assertEquals(new Span(14, 15, "ADVP"), spans[9]); }