Class DocumentSample
java.lang.Object
opennlp.tools.doccat.DocumentSample
- All Implemented Interfaces:
Serializable, Sample
-
Constructor Summary
Constructors -
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.- Throws:
IllegalArgumentException- Thrown ifcategoryortextisnull.
-
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.- Throws:
IllegalArgumentException- Thrown ifcategoryortextisnull.
-
-
Method Details
-
getCategory
- Returns:
- Retrieves the category.
-
getText
- Returns:
- Retrieves the text in a tokenized form.
-
getExtraInformation
-
toString
-
hashCode
-
equals
-