;; Create a word frequency map out of a large string s. ;; `s` is a long string containing a lot of words :) (reduce #(assoc %1 %2 (inc (%1 %2 0))) {} (re-seq #"\w+" s)) ; (This could be used as the `frequencies` function.) (println (reduce #(assoc %1 %2 (inc (%1 %2 0))) {} (cartesian-pairs my-coll) ) )Where (cartesian-pairs my-coll) already defined in prev. blog.

This blog about how to analyse data and prepare it for visualization. Will be used Clojure, C2: Clojure(Script) for data visualization. How to use Variance charts. About using Clojure where Java and JScript are stuck and sucks. GitHub: csv-statistic
Saturday, April 30, 2016
Create a word frequency map out of a large string s
This most used operation which required for frequency map creation in data analysis
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment