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
 boolean equals(Object obj)
           
 String getDocument()
          Retrieves the document.
 Span[] getSentences()
          Retrieves the sentences.
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SentenceSample

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

Parameters:
document -
sentences -

SentenceSample

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

getDocument

public String getDocument()
Retrieves the document.

Returns:
the document

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

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


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