opennlp.tools.sentdetect
Class SentenceSample

java.lang.Object
  extended by opennlp.tools.sentdetect.SentenceSample

public class SentenceSample
extends Object

A SentenceSample contains a document with begin indexes of the individual sentences.


Constructor Summary
SentenceSample(Detokenizer detokenizer, String[][] sentences)
           
SentenceSample(String document, Span... sentences)
          Initializes the current instance.
 
Method Summary
 String getDocument()
          Retrieves the document.
 Span[] getSentences()
          Retrieves the sentences.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SentenceSample

public SentenceSample(String document,
                      Span... sentences)
Initializes the current instance.

Parameters:
sentences -
sentenceSpans -

SentenceSample

public SentenceSample(Detokenizer detokenizer,
                      String[][] sentences)
Method Detail

getDocument

public String getDocument()
Retrieves the document.

Returns:

getSentences

public Span[] getSentences()
Retrieves the sentences.

Returns:
the begin indexes of the sentences in the document.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010. All Rights Reserved.