@Deprecated public class Word2VecPerformer extends java.lang.Object implements org.apache.spark.api.java.function.VoidFunction<Pair<java.util.List<VocabWord>,java.util.concurrent.atomic.AtomicLong>>
Constructor and Description |
---|
Word2VecPerformer(org.apache.spark.SparkConf sc,
org.apache.spark.broadcast.Broadcast<java.util.concurrent.atomic.AtomicLong> wordCount,
InMemoryLookupTable weights)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
call(Pair<java.util.List<VocabWord>,java.util.concurrent.atomic.AtomicLong> pair)
Deprecated.
|
void |
iterateSample(VocabWord w1,
VocabWord w2,
double alpha)
Deprecated.
Iterate on the given 2 vocab words
|
void |
setup(org.apache.spark.SparkConf conf)
Deprecated.
|
void |
skipGram(int i,
java.util.List<VocabWord> sentence,
int b,
double alpha)
Deprecated.
Train via skip gram
|
void |
trainSentence(java.util.List<VocabWord> sentence,
double alpha)
Deprecated.
Train on a list of vocab words
|
public Word2VecPerformer(org.apache.spark.SparkConf sc, org.apache.spark.broadcast.Broadcast<java.util.concurrent.atomic.AtomicLong> wordCount, InMemoryLookupTable weights)
public void setup(org.apache.spark.SparkConf conf)
public void trainSentence(java.util.List<VocabWord> sentence, double alpha)
sentence
- the list of vocab words to train onpublic void skipGram(int i, java.util.List<VocabWord> sentence, int b, double alpha)
i
- sentence
- public void iterateSample(VocabWord w1, VocabWord w2, double alpha)
w1
- the first word to iterate onw2
- the second word to iterate on