public class Word2Vec extends SequenceVectors<VocabWord>
Modifier and Type | Class and Description |
---|---|
static class |
Word2Vec.Builder |
SequenceVectors.AsyncSequencer
Modifier and Type | Field and Description |
---|---|
protected SentenceIterator |
sentenceIter |
protected TokenizerFactory |
tokenizerFactory |
configuration, configured, elementsLearningAlgorithm, enableScavenger, eventListeners, existingModel, iterator, log, scoreElements, scoreSequences, sequenceLearningAlgorithm, unknownElement
batchSize, DEFAULT_UNK, layerSize, learningRate, learningRateDecayWords, lookupTable, minLearningRate, minWordFrequency, modelUtils, negative, numEpochs, numIterations, resetModel, sampling, seed, stopWords, trainElementsVectors, trainSequenceVectors, useAdeGrad, useUnknown, variableWindows, vocab, window, workers
Constructor and Description |
---|
Word2Vec() |
Modifier and Type | Method and Description |
---|---|
void |
setSentenceIterator(SentenceIterator iterator)
This method defines SentenceIterator instance, that will be used as training corpus source
|
void |
setSequenceIterator(SequenceIterator<VocabWord> iterator)
This method defines SequenceIterator instance, that will be used as training corpus source.
|
void |
setTokenizerFactory(TokenizerFactory tokenizerFactory)
This method defines TokenizerFactory instance to be using during model building
|
buildVocab, fit, getElementsScore, getSequencesScore, getUNK, getWordVectorMatrix, initLearners, trainSequence
accuracy, getLayerSize, getWordVector, getWordVectorMatrixNormalized, getWordVectors, getWordVectorsMean, hasWord, indexOf, lookupTable, setLookupTable, setModelUtils, setVocab, similarity, similarWordsInVocabTo, update, update, vocab, wordsNearest, wordsNearest, wordsNearest, wordsNearestSum, wordsNearestSum, wordsNearestSum
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accuracy, getWordVector, getWordVectorMatrixNormalized, getWordVectors, getWordVectorsMean, hasWord, indexOf, lookupTable, setModelUtils, setUNK, similarity, similarWordsInVocabTo, vocab, wordsNearest, wordsNearest, wordsNearest, wordsNearestSum, wordsNearestSum, wordsNearestSum
protected transient SentenceIterator sentenceIter
protected transient TokenizerFactory tokenizerFactory
public void setTokenizerFactory(@NonNull TokenizerFactory tokenizerFactory)
tokenizerFactory
- TokenizerFactory instancepublic void setSentenceIterator(@NonNull SentenceIterator iterator)
iterator
- SentenceIterator instancepublic void setSequenceIterator(@NonNull SequenceIterator<VocabWord> iterator)
iterator
-