@Deprecated public class LegacyGlove extends WordVectorsImpl<VocabWord>
Modifier and Type | Class and Description |
---|---|
static class |
LegacyGlove.Builder<T>
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
protected Queue<Pair<Integer,List<Pair<VocabWord,VocabWord>>>> |
jobQueue
Deprecated.
|
static String |
UNK
Deprecated.
|
layerSize, learningRateDecayWords, lookupTable, minLearningRate, negative, numEpochs, numIterations, resetModel, sampling, stopWords, trainElementsVectors, trainSequenceVectors, useAdeGrad, vocab, vpTree, window, workers
Constructor and Description |
---|
LegacyGlove(VocabCache cache,
SentenceIterator sentenceIterator,
TextVectorizer textVectorizer,
TokenizerFactory tokenizerFactory,
GloveWeightLookupTable lookupTable,
int layerSize,
double learningRate,
double xMax,
int windowSize,
CoOccurrences coOccurrences,
List<String> stopWords,
boolean stem,
int batchSize,
int minWordFrequency,
double maxCount,
int iterations,
boolean symmetric,
org.nd4j.linalg.api.rng.Random gen,
boolean shuffle,
long seed,
int numWorkers)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
doIteration(int i,
List<Pair<String,String>> pairList,
Counter<Integer> errorPerIteration,
AtomicInteger processed,
AtomicInteger countUp)
Deprecated.
|
void |
fit()
Deprecated.
|
CoOccurrences |
getCoOccurrences()
Deprecated.
|
double |
getCount(String w1,
String w2)
Deprecated.
|
static LegacyGlove |
load(InputStream is,
InputStream biases)
Deprecated.
Load a glove model from an input stream.
|
GloveWeightLookupTable |
lookupTable()
Deprecated.
Lookup table for the vectors
|
void |
setCoOccurrences(CoOccurrences coOccurrences)
Deprecated.
|
void |
setLookupTable(GloveWeightLookupTable lookupTable)
Deprecated.
|
accuracy, getWordVector, getWordVectorMatrix, getWordVectorMatrixNormalized, hasWord, indexOf, setLookupTable, setVocab, similarity, similarWordsInVocabTo, vocab, wordsNearest, wordsNearest, wordsNearest, wordsNearest, wordsNearestSum, wordsNearestSum, wordsNearestSum
public static final String UNK
public LegacyGlove(VocabCache cache, SentenceIterator sentenceIterator, TextVectorizer textVectorizer, TokenizerFactory tokenizerFactory, GloveWeightLookupTable lookupTable, int layerSize, double learningRate, double xMax, int windowSize, CoOccurrences coOccurrences, List<String> stopWords, boolean stem, int batchSize, int minWordFrequency, double maxCount, int iterations, boolean symmetric, org.nd4j.linalg.api.rng.Random gen, boolean shuffle, long seed, int numWorkers)
public void fit()
public void doIteration(int i, List<Pair<String,String>> pairList, Counter<Integer> errorPerIteration, AtomicInteger processed, AtomicInteger countUp)
public static LegacyGlove load(InputStream is, InputStream biases) throws IOException
is
- the input stream to read from for the weightsbiases
- the bias input streamIOException
- if one occurspublic CoOccurrences getCoOccurrences()
public void setCoOccurrences(CoOccurrences coOccurrences)
public GloveWeightLookupTable lookupTable()
WordVectors
lookupTable
in interface WordVectors
lookupTable
in class WordVectorsImpl<VocabWord>
public void setLookupTable(GloveWeightLookupTable lookupTable)
Copyright © 2016. All Rights Reserved.