### Question:
TurkishSentenceExtractor extends PerceptronSegmenter { public List<String> fromParagraph(String paragraph) { List<Span> spans = extractToSpans(paragraph); List<String> sentences = new ArrayList<>(spans.size()); for (Span span : spans) { String sentence = span.getSubstring(paragraph).trim(); if (sentence.length() > 0) { sentences.add(sentence); } } return sentences; } private  TurkishSentenceExtractor(FloatValueMap<String> weights); private  TurkishSentenceExtractor(FloatValueMap<String> weights,
      boolean doNotSplitInDoubleQuotes); static Builder builder(); List<String> fromParagraphs(Collection<String> paragraphs); List<String> fromParagraph(String paragraph); List<String> fromDocument(String document); char[] getBoundaryCharacters(); static final TurkishSentenceExtractor DEFAULT; }### Answer:
@Test public void singletonAccessShouldNotThrowException() throws IOException { TurkishSentenceExtractor.DEFAULT.fromParagraph("hello"); }
@Test public void shouldExtractSentences1() throws IOException { String test = "Merhaba Dünya.| Nasılsın?"; List<String> expected = getSentences(test); Assert.assertEquals(expected, TurkishSentenceExtractor.DEFAULT.fromParagraph(test.replace("|", ""))); }
@Test public void shouldExtractSingleSentences() throws IOException { String test = "Merhaba Dünya."; List<String> expected = getSentences(test); Assert.assertEquals(expected, TurkishSentenceExtractor.DEFAULT.fromParagraph(test.replace("|", ""))); }
@Test public void shouldExtractSentencesSecondDoesNotEndWithDot() throws IOException { String test = "Merhaba Dünya.| Nasılsın"; List<String> expected = getSentences(test); Assert.assertEquals(expected, TurkishSentenceExtractor.DEFAULT.fromParagraph(test.replace("|", ""))); }
@Test public void shouldReturnDotForDot() throws IOException { List<String> expected = getSentences("."); Assert.assertEquals(expected, TurkishSentenceExtractor.DEFAULT.fromParagraph(".")); }
@Test public void shouldReturn0ForEmpty() throws IOException { Assert.assertEquals(0, TurkishSentenceExtractor.DEFAULT.fromParagraph("").size()); }
@Test public void shouldReturn0ForEmptyff() { List<String> sentences = TurkishSentenceExtractor.DEFAULT.fromParagraph(""); Assert.assertEquals(0, sentences.size()); }