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, intersectModel, iterator, lockFactor, log, scoreElements, scoreSequences, sequenceLearningAlgorithm, unknownElement, vocabLimitbatchSize, 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 |
|---|---|
static Word2Vec |
fromJson(String jsonString) |
void |
setSentenceIterator(@NonNull SentenceIterator iterator)
This method defines SentenceIterator instance, that will be used as training corpus source
|
void |
setSequenceIterator(@NonNull SequenceIterator<VocabWord> iterator)
This method defines SequenceIterator instance, that will be used as training corpus source.
|
void |
setTokenizerFactory(@NonNull TokenizerFactory tokenizerFactory)
This method defines TokenizerFactory instance to be using during model building
|
String |
toJson() |
buildVocab, fit, getElementsScore, getSequencesScore, getUNK, getWordVectorMatrix, initLearners, setUNK, trainSequenceaccuracy, getLayerSize, getWordVector, getWordVectorMatrixNormalized, getWordVectors, getWordVectorsMean, hasWord, indexOf, jsonSerializable, loadWeightsInto, lookupTable, outOfVocabularySupported, setLookupTable, setModelUtils, setVocab, similarity, similarWordsInVocabTo, update, update, vectorSize, vocab, vocabSize, wordsNearest, wordsNearest, wordsNearest, wordsNearestSum, wordsNearestSum, wordsNearestSumclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaccuracy, getWordVector, getWordVectorMatrixNormalized, getWordVectors, getWordVectorsMean, hasWord, indexOf, lookupTable, outOfVocabularySupported, setModelUtils, similarity, similarWordsInVocabTo, vocab, wordsNearest, wordsNearest, wordsNearest, wordsNearestSum, wordsNearestSum, wordsNearestSumjsonSerializable, loadWeightsInto, vectorSize, vocabSizeprotected transient SentenceIterator sentenceIter
protected transient TokenizerFactory tokenizerFactory
public void setTokenizerFactory(@NonNull
@NonNull TokenizerFactory tokenizerFactory)
tokenizerFactory - TokenizerFactory instancepublic void setSentenceIterator(@NonNull
@NonNull SentenceIterator iterator)
iterator - SentenceIterator instancepublic void setSequenceIterator(@NonNull
@NonNull SequenceIterator<VocabWord> iterator)
iterator - public String toJson() throws org.nd4j.shade.jackson.core.JsonProcessingException
org.nd4j.shade.jackson.core.JsonProcessingExceptionpublic static Word2Vec fromJson(String jsonString) throws IOException
IOExceptionCopyright © 2021. All rights reserved.