Class BagOfWordsVectorizer.Builder
- java.lang.Object
-
- org.deeplearning4j.bagofwords.vectorizer.BagOfWordsVectorizer.Builder
-
- Enclosing class:
- BagOfWordsVectorizer
public static class BagOfWordsVectorizer.Builder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
isParallel
protected LabelAwareIterator
iterator
protected LabelsSource
labelsSource
protected int
minWordFrequency
protected Collection<String>
stopWords
protected TokenizerFactory
tokenizerFactory
protected VocabCache<VocabWord>
vocabCache
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BagOfWordsVectorizer.Builder
allowParallelTokenization(boolean reallyAllow)
BagOfWordsVectorizer
build()
BagOfWordsVectorizer.Builder
labelsSource(@NonNull LabelsSource source)
BagOfWordsVectorizer.Builder
setIterator(@NonNull DocumentIterator iterator)
BagOfWordsVectorizer.Builder
setIterator(@NonNull LabelAwareIterator iterator)
BagOfWordsVectorizer.Builder
setIterator(@NonNull SentenceIterator iterator)
BagOfWordsVectorizer.Builder
setMinWordFrequency(int minWordFrequency)
BagOfWordsVectorizer.Builder
setStopWords(Collection<String> stopWords)
BagOfWordsVectorizer.Builder
setTokenizerFactory(@NonNull TokenizerFactory tokenizerFactory)
BagOfWordsVectorizer.Builder
setVocab(@NonNull VocabCache<VocabWord> vocab)
-
-
-
Field Detail
-
tokenizerFactory
protected TokenizerFactory tokenizerFactory
-
iterator
protected LabelAwareIterator iterator
-
minWordFrequency
protected int minWordFrequency
-
vocabCache
protected VocabCache<VocabWord> vocabCache
-
labelsSource
protected LabelsSource labelsSource
-
stopWords
protected Collection<String> stopWords
-
isParallel
protected boolean isParallel
-
-
Method Detail
-
allowParallelTokenization
public BagOfWordsVectorizer.Builder allowParallelTokenization(boolean reallyAllow)
-
setTokenizerFactory
public BagOfWordsVectorizer.Builder setTokenizerFactory(@NonNull @NonNull TokenizerFactory tokenizerFactory)
-
setIterator
public BagOfWordsVectorizer.Builder setIterator(@NonNull @NonNull LabelAwareIterator iterator)
-
setIterator
public BagOfWordsVectorizer.Builder setIterator(@NonNull @NonNull DocumentIterator iterator)
-
setIterator
public BagOfWordsVectorizer.Builder setIterator(@NonNull @NonNull SentenceIterator iterator)
-
setVocab
public BagOfWordsVectorizer.Builder setVocab(@NonNull @NonNull VocabCache<VocabWord> vocab)
-
setMinWordFrequency
public BagOfWordsVectorizer.Builder setMinWordFrequency(int minWordFrequency)
-
setStopWords
public BagOfWordsVectorizer.Builder setStopWords(Collection<String> stopWords)
-
labelsSource
public BagOfWordsVectorizer.Builder labelsSource(@NonNull @NonNull LabelsSource source)
-
build
public BagOfWordsVectorizer build()
-
-