public class Word2Vec extends WordVectorsImpl<VocabWord> implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Word2Vec.Builder |
| Modifier and Type | Field and Description |
|---|---|
protected VectorsConfiguration |
configuration |
batchSize, DEFAULT_UNK, layerSize, learningRate, learningRateDecayWords, lookupTable, minLearningRate, minWordFrequency, modelUtils, negative, numEpochs, numIterations, resetModel, sampling, stopWords, trainElementsVectors, trainSequenceVectors, useAdeGrad, variableWindows, vocab, window, workers| Modifier | Constructor and Description |
|---|---|
protected |
Word2Vec() |
protected |
Word2Vec(org.nd4j.linalg.api.ndarray.INDArray trainedSyn1) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
getTokenizerVarMap() |
Map<String,Object> |
getWord2vecVarMap() |
protected double[] |
initExpTable() |
void |
train(org.apache.spark.api.java.JavaRDD<String> corpusRDD)
Training word2vec model on a given text corpus
|
accuracy, getLayerSize, getLookupTable, getMinWordFrequency, getModelUtils, getStopWords, getUNK, getVocab, getWindow, getWordVector, getWordVectorMatrix, getWordVectorMatrixNormalized, getWordVectors, getWordVectorsMean, hasWord, indexOf, jsonSerializable, loadWeightsInto, lookupTable, outOfVocabularySupported, setLookupTable, setModelUtils, setUNK, setVocab, similarity, similarWordsInVocabTo, update, update, vectorSize, vocab, vocabSize, wordsNearest, wordsNearest, wordsNearest, wordsNearestSum, wordsNearestSum, wordsNearestSumprotected VectorsConfiguration configuration
protected Word2Vec(org.nd4j.linalg.api.ndarray.INDArray trainedSyn1)
protected Word2Vec()
Copyright © 2020. All rights reserved.