opennlp.tools.sentdetect
Class SentenceSample

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

public class SentenceSample
extends java.lang.Object

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


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

Constructor Detail

SentenceSample

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

Parameters:
sentences -
sentenceSpans -

SentenceSample

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

getDocument

public java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.