@Deprecated public class SentenceBatch extends java.lang.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,
java.util.List<Triple<java.lang.Integer,java.lang.Integer,java.lang.Integer>> changed)
Deprecated.
Iterate on the given 2 vocab words
|
void |
skipGram(Word2VecParam param,
int i,
java.util.List<VocabWord> sentence,
int b,
double alpha,
java.util.List<Triple<java.lang.Integer,java.lang.Integer,java.lang.Integer>> changed)
Deprecated.
Train via skip gram
|
void |
trainSentence(Word2VecParam param,
java.util.List<VocabWord> sentence,
double alpha,
java.util.List<Triple<java.lang.Integer,java.lang.Integer,java.lang.Integer>> changed)
Deprecated.
Train on a list of vocab words
|
public Word2VecChange call(Word2VecFuncCall sentence) throws java.lang.Exception
call in interface org.apache.spark.api.java.function.Function<Word2VecFuncCall,Word2VecChange>java.lang.Exceptionpublic void trainSentence(Word2VecParam param, java.util.List<VocabWord> sentence, double alpha, java.util.List<Triple<java.lang.Integer,java.lang.Integer,java.lang.Integer>> changed)
sentence - the list of vocab words to train onpublic void skipGram(Word2VecParam param, int i, java.util.List<VocabWord> sentence, int b, double alpha, java.util.List<Triple<java.lang.Integer,java.lang.Integer,java.lang.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, java.util.List<Triple<java.lang.Integer,java.lang.Integer,java.lang.Integer>> changed)
w1 - the first word to iterate onw2 - the second word to iterate on