public class RnnTextFilesEmbeddingInstanceIterator extends RnnTextEmbeddingInstanceIterator
Assumes the instance object has the following two attributes:
wordVectors
Constructor and Description |
---|
RnnTextFilesEmbeddingInstanceIterator() |
Modifier and Type | Method and Description |
---|---|
org.nd4j.linalg.dataset.api.iterator.DataSetIterator |
getDataSetIterator(weka.core.Instances data,
int seed,
int batchSize)
Returns the actual iterator.
|
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier.
|
org.deeplearning4j.iterator.LabeledSentenceProvider |
getSentenceProvider(weka.core.Instances data)
Create a sentence provider from the given data.
|
java.io.File |
getTextsLocation() |
java.lang.String |
globalInfo() |
java.util.Enumeration<weka.core.Option> |
listOptions()
Returns an enumeration describing the available options.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setTextsLocation(java.io.File textsLocation) |
void |
validate(weka.core.Instances data)
Validates the input dataset
|
initialize
getStopwords, getTokenizerFactory, getTokenPreProcess, getTruncateLength, getWordVectorLocation, getWordVectors, initWordVectors, setStopwords, setTokenizerFactory, setTokenPreProcess, setTruncateLength, setWordVectorLocation, setWordVectors
getDataSetIterator, getTrainBatchSize, setTrainBatchSize
public RnnTextFilesEmbeddingInstanceIterator()
public org.nd4j.linalg.dataset.api.iterator.DataSetIterator getDataSetIterator(weka.core.Instances data, int seed, int batchSize) throws InvalidInputDataException, java.io.IOException
RnnTextEmbeddingInstanceIterator
getDataSetIterator
in class RnnTextEmbeddingInstanceIterator
data
- the dataset to useseed
- the seed for the random number generatorbatchSize
- the batch size to useInvalidInputDataException
java.io.IOException
public org.deeplearning4j.iterator.LabeledSentenceProvider getSentenceProvider(weka.core.Instances data)
AbstractTextEmbeddingIterator
getSentenceProvider
in class AbstractTextEmbeddingIterator
data
- Datapublic void validate(weka.core.Instances data) throws InvalidInputDataException
validate
in class RnnTextEmbeddingInstanceIterator
data
- the input datasetInvalidInputDataException
- if validation is unsuccessful@OptionMetadata(displayName="directory of text files", description="The directory containing the text files (default = user home).", commandLineParamName="textsLocation", commandLineParamSynopsis="-textsLocation <string>", displayOrder=3) public java.io.File getTextsLocation()
public void setTextsLocation(java.io.File textsLocation)
public java.util.Enumeration<weka.core.Option> listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class RnnTextEmbeddingInstanceIterator
public java.lang.String[] getOptions()
getOptions
in interface weka.core.OptionHandler
getOptions
in class RnnTextEmbeddingInstanceIterator
public void setOptions(java.lang.String[] options) throws java.lang.Exception
setOptions
in interface weka.core.OptionHandler
setOptions
in class RnnTextEmbeddingInstanceIterator
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String globalInfo()
globalInfo
in class RnnTextEmbeddingInstanceIterator