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
ASentenceSamplecontains 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 booleanequals(Object obj)StringgetDocument()Span[]getSentences()inthashCode()StringtoString()
-
-
-
Constructor Detail
-
SentenceSample
public SentenceSample(CharSequence document, Span... sentences)
Initializes the current instance.- Parameters:
document- The document represented as plainCharSequence.sentences- One or morespansthat represent a sentence each.
-
SentenceSample
public SentenceSample(Detokenizer detokenizer, String[][] sentences)
-
-
Method Detail
-
getDocument
public String getDocument()
- Returns:
- the document as a plain string.
-
-