public class Glove
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Glove(boolean symmetric,
int windowSize,
int iterations) |
Glove(java.lang.String tokenizerFactoryClazz,
boolean symmetric,
int windowSize,
int iterations) |
Modifier and Type | Method and Description |
---|---|
Pair<VocabCache<VocabWord>,GloveWeightLookupTable> |
train(org.apache.spark.api.java.JavaRDD<java.lang.String> rdd)
Train on the corpus
|
public Glove(java.lang.String tokenizerFactoryClazz, boolean symmetric, int windowSize, int iterations)
tokenizerFactoryClazz
- the fully qualified class name of the tokenizersymmetric
- whether the co occurrence counts should be symmetricwindowSize
- the window size for co occurrenceiterations
- the number of iterationspublic Glove(boolean symmetric, int windowSize, int iterations)
symmetric
- whether the co occurrence counts should be symmetricwindowSize
- the window size for co occurrenceiterations
- the number of iterationspublic Pair<VocabCache<VocabWord>,GloveWeightLookupTable> train(org.apache.spark.api.java.JavaRDD<java.lang.String> rdd) throws java.lang.Exception
rdd
- the rdd to trainjava.lang.Exception