### Question:
LingPipeSentenceDetector implements SentenceDetector { @Override public Iterator<Token> iterateTokens(final String text) { Validate.notNull(text, "text must not be null"); Chunking chunking = sentenceChunker.chunk(text); final Iterator<Chunk> chunkIterator = chunking.chunkSet().iterator(); return new AbstractIterator<Token>() { @Override protected Token getNext() throws Finished { if (chunkIterator.hasNext()){ Chunk chunk = chunkIterator.next(); int start = chunk.start(); int end = chunk.end(); String value = text.substring(start, end); return new ImmutableToken(start, value); } throw FINISHED; } }; } LingPipeSentenceDetector(); @Override Iterator<Token> iterateTokens(final String text);  }### Answer:
@Test public void testLingPipeSentenceChunker() throws Exception { SentenceDetector sentenceDetector = new LingPipeSentenceDetector(); Iterator<Token> sentences = sentenceDetector.iterateTokens(TEXT); assertEquals(0, sentences.next().getStartPosition()); assertEquals(51, sentences.next().getStartPosition()); assertEquals(139, sentences.next().getStartPosition()); assertEquals(206, sentences.next().getStartPosition()); assertEquals(329, sentences.next().getStartPosition()); assertEquals(379, sentences.next().getStartPosition()); assertEquals(595, sentences.next().getStartPosition()); assertEquals(680, sentences.next().getStartPosition()); assertEquals(818, sentences.next().getStartPosition()); assertEquals(894, sentences.next().getStartPosition()); }