public void fitMultipleFiles ( JavaPairRDD < String , String > documentsRdd ) { /* All we want here, is to transform JavaPairRDD into JavaRDD<Sequence<VocabWord>> */ validateConfiguration ( ) ; broadcastEnvironment ( new JavaSparkContext ( documentsRdd . context ( ) ) ) ; JavaRDD < Sequence < VocabWord > > sequenceRdd = documentsRdd . map ( new KeySequenceConvertFunction ( configurationBroadcast ) ) ; super . fitSequences ( sequenceRdd ) ; }
This method builds ParagraphVectors model expecting JavaPairRDD with key as label and value as document - in - a - string .