                         f/group-by-key
                         (f/flat-map term-freq-per-doc)
                         f/cache)
+
+          ;; total number of documents in corpus
+          num-docs (f/count doc-data)
 
           ;; idf of terms, that is, idf(term)
           idf-by-term (-> doc-term-seq

(ns flambo.example.tfidf
  (:require [flambo.api :as f]
            [flambo.conf :as conf]
            [flambo.utils :as u]
            [clojure.string :as s])
  (:gen-class))

(def master "local")

          ]
      (-> tfidf-by-term
          f/collect
          clojure.pprint/pprint))
    (catch Exception e
      (println (.printStackTrace e)))))
