private static boolean isSentenceEnd(String text, final int i) {
    return SENTENCE_END.contains(text.charAt(i)) && (i + 1 == text.length() || Character.isWhitespace(text.charAt(i + 1)));
  }
private static boolean isSentenceEnd(String text, final int i)