jsat.text
Class ClassificationTextDataLoader
- java.lang.Object
-
- jsat.text.TextDataLoader
-
- jsat.text.ClassificationTextDataLoader
-
- All Implemented Interfaces:
- java.io.Serializable, TextVectorCreator
public abstract class ClassificationTextDataLoader extends TextDataLoader
This class provides a framework for loading classification datasets made of text documents as vectors. This extension usesaddOriginalDocument(java.lang.String, int)instead so that the original documents have a class label associated with them.getDataSet()then returns a classification data set, where the class label for each data point is the label provided when addOriginalDocument was called.
New vectors created withTextDataLoader.newText(java.lang.String)are inherently not part of the original data set, so do not need or receive a class label.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ClassificationTextDataLoader(Tokenizer tokenizer, WordWeighting weighting)Creates a new text data loader
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ClassificationDataSetgetDataSet()Returns a new data set containing the original data points that were loaded with this loader.-
Methods inherited from class jsat.text.TextDataLoader
getMinimumOccurrenceDTF, getTermFrequency, getTextVectorCreator, getWordForIndex, initialLoad, newText, newText
-
-
-
-
Constructor Detail
-
ClassificationTextDataLoader
public ClassificationTextDataLoader(Tokenizer tokenizer, WordWeighting weighting)
Creates a new text data loader- Parameters:
tokenizer- the string tokenizer to use on each inputweighting- the weighting scheme to apply to each vector in the collection
-
-
Method Detail
-
getDataSet
public ClassificationDataSet getDataSet()
Description copied from class:TextDataLoaderReturns a new data set containing the original data points that were loaded with this loader.- Overrides:
getDataSetin classTextDataLoader- Returns:
- an appropriate data set for this loader
-
-
DataMelt 3.0 © DataMelt by jWork.ORG