public class NGramTokenizerFactoryImpl
extends java.lang.Object
implements org.deeplearning4j.text.tokenization.tokenizerfactory.TokenizerFactory, java.io.Serializable, weka.core.OptionHandler
Constructor and Description |
---|
NGramTokenizerFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
org.deeplearning4j.text.tokenization.tokenizer.Tokenizer |
create(java.io.InputStream toTokenize) |
org.deeplearning4j.text.tokenization.tokenizer.Tokenizer |
create(java.lang.String toTokenize) |
java.lang.String |
getDelimiters() |
int |
getNMax() |
int |
getNMin() |
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier.
|
org.deeplearning4j.text.tokenization.tokenizer.TokenPreProcess |
getTokenPreProcessor() |
java.lang.String |
globalInfo()
Returns a string describing this object.
|
java.util.Enumeration<weka.core.Option> |
listOptions()
Returns an enumeration describing the available options.
|
void |
setDelimiters(java.lang.String delimiters) |
void |
setNMax(int nMax) |
void |
setNMin(int nMin) |
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setTokenPreProcessor(org.deeplearning4j.text.tokenization.tokenizer.TokenPreProcess preProcessor) |
public org.deeplearning4j.text.tokenization.tokenizer.Tokenizer create(java.lang.String toTokenize)
create
in interface org.deeplearning4j.text.tokenization.tokenizerfactory.TokenizerFactory
public org.deeplearning4j.text.tokenization.tokenizer.Tokenizer create(java.io.InputStream toTokenize)
create
in interface org.deeplearning4j.text.tokenization.tokenizerfactory.TokenizerFactory
public org.deeplearning4j.text.tokenization.tokenizer.TokenPreProcess getTokenPreProcessor()
getTokenPreProcessor
in interface org.deeplearning4j.text.tokenization.tokenizerfactory.TokenizerFactory
public void setTokenPreProcessor(org.deeplearning4j.text.tokenization.tokenizer.TokenPreProcess preProcessor)
setTokenPreProcessor
in interface org.deeplearning4j.text.tokenization.tokenizerfactory.TokenizerFactory
public java.lang.String globalInfo()
public java.util.Enumeration<weka.core.Option> listOptions()
listOptions
in interface weka.core.OptionHandler
public java.lang.String[] getOptions()
getOptions
in interface weka.core.OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
setOptions
in interface weka.core.OptionHandler
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supported@OptionMetadata(displayName="NMax", description="NGram max size.", commandLineParamName="NMax", commandLineParamSynopsis="-NMax <int>", displayOrder=0) public int getNMax()
public void setNMax(int nMax)
@OptionMetadata(displayName="NMin", description="NGram min size.", commandLineParamName="NMin", commandLineParamSynopsis="-NMin <int>", displayOrder=1) public int getNMin()
public void setNMin(int nMin)
@OptionMetadata(displayName="delimiters", description="Set of delimiter characters to use in tokenizing (\\r, \\n and \\t can be used for carriage-return, line-feed and tab).", commandLineParamName="delimiters", commandLineParamSynopsis="-delimiters <int>", displayOrder=2) public java.lang.String getDelimiters()
public void setDelimiters(java.lang.String delimiters)