opennlp.tools.sentdetect
Interface EndOfSentenceScanner

All Known Implementing Classes:
AbstractEndOfSentenceScanner, EndOfSentenceScanner, EndOfSentenceScanner

public interface EndOfSentenceScanner

Scans Strings, StringBuffers, and char[] arrays for the offsets of sentence ending characters.

Implementations of this interface can use regular expressions, hand-coded DFAs, and other scanning techniques to locate end of sentence offsets.

Created: Sat Oct 27 11:42:07 2001

Version:
$Id: EndOfSentenceScanner.java,v 1.2 2006/01/16 17:51:49 tsmorton Exp $
Author:
Eric D. Friedman

Method Summary
 char[] getEndOfSentenceCharacters()
          Returns an array of character which can indicate the end of a sentence.
 java.util.List getPositions(char[] cbuf)
          The receiver scans `cbuf' for sentence ending characters and returns their offsets.
 java.util.List getPositions(java.lang.String s)
          The receiver scans `s' for sentence ending characters and returns their offsets.
 java.util.List getPositions(java.lang.StringBuffer buf)
          The receiver scans `buf' for sentence ending characters and returns their offsets.
 

Method Detail

getEndOfSentenceCharacters

char[] getEndOfSentenceCharacters()
Returns an array of character which can indicate the end of a sentence.

Returns:
an array of character which can indicate the end of a sentence.

getPositions

java.util.List getPositions(java.lang.String s)
The receiver scans `s' for sentence ending characters and returns their offsets.

Parameters:
s - a String value
Returns:
a List of Integer objects.

getPositions

java.util.List getPositions(java.lang.StringBuffer buf)
The receiver scans `buf' for sentence ending characters and returns their offsets.

Parameters:
buf - a StringBuffer value
Returns:
a List of Integer objects.

getPositions

java.util.List getPositions(char[] cbuf)
The receiver scans `cbuf' for sentence ending characters and returns their offsets.

Parameters:
cbuf - a char[] value
Returns:
a List of Integer objects.


Copyright 2008 Jason Baldridge, Gann Bierner, and Thomas Morton. All Rights Reserved.