 
 
 (defn select-rep-comments
+  "Selects representative comments based on beats-best-by-test? and passes-by-test?. Always ensures
+  there is at least one representative comment for a given cluster. Takes the results of conv-repness
+  and returns a map of group cluster ids to representative comments and stats."
   [{:keys [ids stats] :as repness-stats}]
   ; Reduce statistics into a results hash mapping group ids to rep comments
   (->>

         (apply concat))))


(defn- count-votes [votes & [vote]]
  (let [filt-fn (if vote #(= vote %) identity)]
    (count (filter filt-fn votes))))


  ; This can cause PermGen space crashes.
  (defn- initial-comment-stats
    "Vote count stats for a given vote column. This vote column should represent the votes for a specific
    comment and group. Comparisons _between_ groups happen later. See `(doc conv-repness)` for key details."
    [vote-col]
    (initial-comment-stats-graphimpl {:votes vote-col})))


(defn- add-comparitive-stats
  "Builds on results of initial-comment-stats by doing comparisons _between_ groups. Args are
  in group stats (as returned by initial-comment-stats), and list of stats for rest of groups.
  See `(doc conv-repness)` for key details."
  [in-stats rest-stats]
  (assoc in-stats
    :ra (/ (:pa in-stats)
           (/ (+ 1 (pc/sum :na rest-stats))
