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 SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
DocumentSampleInitializes ainstance.- Parameters:
- category- The category to be used. Must not be- null.
- text- The plain text in a tokenized form. Must not be- null.
 
- 
DocumentSampleInitializes ainstance.- Parameters:
- category- The category to be used.Must not be- null.
- text- The plain text in a tokenized form. Must not be- null.
- 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
- 
hashCodepublic int hashCode()
- 
equals
 
-