Package opennlp.tools.sentdetect
Class SentenceSample
- java.lang.Object
-
- opennlp.tools.sentdetect.SentenceSample
-
- All Implemented Interfaces:
Serializable
,Sample
public class SentenceSample extends Object implements Sample
ASentenceSample
contains a document with begin indexes of the individual sentences.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SentenceSample(CharSequence document, Span... sentences)
Initializes the current instance.SentenceSample(Detokenizer detokenizer, String[][] sentences)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getDocument()
Span[]
getSentences()
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
SentenceSample
public SentenceSample(CharSequence document, Span... sentences)
Initializes the current instance.- Parameters:
document
- The document represented as plainCharSequence
.sentences
- One or morespans
that represent a sentence each.
-
SentenceSample
public SentenceSample(Detokenizer detokenizer, String[][] sentences)
-
-
Method Detail
-
getDocument
public String getDocument()
- Returns:
- the document as a plain string.
-
-