Search in sources :

Example 1 with WordFreqAccumulator

use of org.deeplearning4j.spark.text.accumulators.WordFreqAccumulator in project deeplearning4j by deeplearning4j.

the class TextPipeline method setup.

private void setup() {
    // Set up accumulators and broadcast stopwords
    this.sc = new JavaSparkContext(corpusRDD.context());
    this.wordFreqAcc = sc.accumulator(new Counter<String>(), new WordFreqAccumulator());
    this.stopWordBroadCast = sc.broadcast(stopWords);
}
Also used : Counter(org.deeplearning4j.berkeley.Counter) WordFreqAccumulator(org.deeplearning4j.spark.text.accumulators.WordFreqAccumulator) JavaSparkContext(org.apache.spark.api.java.JavaSparkContext)

Aggregations

JavaSparkContext (org.apache.spark.api.java.JavaSparkContext)1 Counter (org.deeplearning4j.berkeley.Counter)1 WordFreqAccumulator (org.deeplearning4j.spark.text.accumulators.WordFreqAccumulator)1