@Test public void testScanning() { EndOfSentenceScanner scanner = new DefaultEndOfSentenceScanner( new char[]{'.', '!', '?'}); List<Integer> eosPositions = scanner.getPositions("... um die Wertmarken zu auswählen !?"); Assert.assertEquals(0, eosPositions.get(0).intValue()); Assert.assertEquals(1, eosPositions.get(1).intValue()); Assert.assertEquals(2, eosPositions.get(2).intValue()); Assert.assertEquals(35, eosPositions.get(3).intValue()); Assert.assertEquals(36, eosPositions.get(4).intValue()); }
public List<Integer> getPositions(String s) { return getPositions(s.toCharArray()); }
DefaultEndOfSentenceScanner implements EndOfSentenceScanner { public List<Integer> getPositions(String s) { return getPositions(s.toCharArray()); } }
DefaultEndOfSentenceScanner implements EndOfSentenceScanner { public List<Integer> getPositions(String s) { return getPositions(s.toCharArray()); } DefaultEndOfSentenceScanner(char[] eosCharacters); }
DefaultEndOfSentenceScanner implements EndOfSentenceScanner { public List<Integer> getPositions(String s) { return getPositions(s.toCharArray()); } DefaultEndOfSentenceScanner(char[] eosCharacters); List<Integer> getPositions(String s); List<Integer> getPositions(StringBuffer buf); List<Integer> getPositions(char[] cbuf); @Deprecated char[] getEndOfSentenceCharacters(); @Override Set<Character> getEOSCharacters(); }
DefaultEndOfSentenceScanner implements EndOfSentenceScanner { public List<Integer> getPositions(String s) { return getPositions(s.toCharArray()); } DefaultEndOfSentenceScanner(char[] eosCharacters); List<Integer> getPositions(String s); List<Integer> getPositions(StringBuffer buf); List<Integer> getPositions(char[] cbuf); @Deprecated char[] getEndOfSentenceCharacters(); @Override Set<Character> getEOSCharacters();  }