Full code review

What is f ? Please write map/reduce/filter functions like here:
https://gist.github.com/waleking/5477002#file-sparkgibbslda-scala-L162

Also, use meaningful names, even if they are longer.