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, vocabLimit
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 |
---|---|
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, trainSequence
accuracy, 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, wordsNearestSum
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accuracy, getWordVector, getWordVectorMatrixNormalized, getWordVectors, getWordVectorsMean, hasWord, indexOf, lookupTable, outOfVocabularySupported, setModelUtils, similarity, similarWordsInVocabTo, vocab, wordsNearest, wordsNearest, wordsNearest, wordsNearestSum, wordsNearestSum, wordsNearestSum
jsonSerializable, loadWeightsInto, vectorSize, vocabSize
protected 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.JsonProcessingException
public static Word2Vec fromJson(String jsonString) throws IOException
IOException
Copyright © 2022. All rights reserved.