Open main menu

CDOT Wiki β

Changes

The Real A Team

233 bytes added, 11:35, 5 April 2016
Full Program
val text2 = sc.textFile("text2.txt")
 
...
 
val t1WordCount = text1.flatMap(line => line.split(" ")).map(word => (word, 1)).reduceByKey((a, b) => a + b)
val t1SentenceCount = text1.flatMap(line => line.split("")).filter(character => character = ".").count()
 
...