(frequencies->percent-ranges freqs)
Create a lookup of key/value pairs where the key is the range of percentages where a syllable count occurs, and the value is the syllable count.
Create a lookup of key/value pairs where the key is the range of percentages where a syllable count occurs, and the value is the syllable count.
(frequency->percent-range total acc [k v])
A reducer that, given a frequency and an accumulator, returns an updated accumulator with the given frequency converted to a percent range (appended to the accumulator). The first argument is expectred to be provided as a partial.
A reducer that, given a frequency and an accumulator, returns an updated accumulator with the given frequency converted to a percent range (appended to the accumulator). The first argument is expectred to be provided as a partial.
(percent-> percent percent-ranges)
Given a percent (as a float between 0.0 and 1.0) and a lookup table of percent ranges, find the range in which the given percent falls, and return the associated value.
Given a percent (as a float between 0.0 and 1.0) and a lookup table of percent ranges, find the range in which the given percent falls, and return the associated value.
Note that the multiplier here is selected such that enough significant digits are used to avoid rounding errors when converting back to percent.
Note that the multiplier here is selected such that enough significant digits are used to avoid rounding errors when converting back to percent.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close