Package opennlp.tools.doccat
Class DocumentSample
java.lang.Object
opennlp.tools.doccat.DocumentSample
- All Implemented Interfaces:
Serializable
,Sample
Class which holds a classified document and its category.
- See Also:
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
DocumentSample
Initializes ainstance
.- Parameters:
category
- The category to be used. Must not benull
.text
- The plain text in a tokenized form. Must not benull
.
-
DocumentSample
Initializes ainstance
.- Parameters:
category
- The category to be used.Must not benull
.text
- The plain text in a tokenized form. Must not benull
.extraInformation
- Additional information for context.
-
-
Method Details
-
getCategory
- Returns:
- Retrieves the category.
-
getText
- Returns:
- Retrieves the text in a tokenized form.
-
getExtraInformation
- Returns:
- Retrieves contextual extra information.
-
toString
-
hashCode
public int hashCode() -
equals
-