@Deprecated public class SentenceBatch extends Object implements org.apache.spark.api.java.function.Function<Word2VecFuncCall,Word2VecChange>
| Constructor and Description |
|---|
SentenceBatch()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Word2VecChange |
call(Word2VecFuncCall sentence)
Deprecated.
|
void |
iterateSample(Word2VecParam param,
VocabWord w1,
VocabWord w2,
double alpha,
List<org.nd4j.common.primitives.Triple<Integer,Integer,Integer>> changed)
Deprecated.
Iterate on the given 2 vocab words
|
void |
skipGram(Word2VecParam param,
int i,
List<VocabWord> sentence,
int b,
double alpha,
List<org.nd4j.common.primitives.Triple<Integer,Integer,Integer>> changed)
Deprecated.
Train via skip gram
|
void |
trainSentence(Word2VecParam param,
List<VocabWord> sentence,
double alpha,
List<org.nd4j.common.primitives.Triple<Integer,Integer,Integer>> changed)
Deprecated.
Train on a list of vocab words
|
public Word2VecChange call(Word2VecFuncCall sentence) throws Exception
call in interface org.apache.spark.api.java.function.Function<Word2VecFuncCall,Word2VecChange>Exceptionpublic void trainSentence(Word2VecParam param, List<VocabWord> sentence, double alpha, List<org.nd4j.common.primitives.Triple<Integer,Integer,Integer>> changed)
sentence - the list of vocab words to train onpublic void skipGram(Word2VecParam param, int i, List<VocabWord> sentence, int b, double alpha, List<org.nd4j.common.primitives.Triple<Integer,Integer,Integer>> changed)
i - the current wordsentence - the sentence to train onb - alpha - the learning ratepublic void iterateSample(Word2VecParam param, VocabWord w1, VocabWord w2, double alpha, List<org.nd4j.common.primitives.Triple<Integer,Integer,Integer>> changed)
w1 - the first word to iterate onw2 - the second word to iterate onCopyright © 2020. All rights reserved.