Liking cljdoc? Tell your friends :D

hxgm30.language.util


frequencies->percent-rangesclj

(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.
sourceraw docstring

frequency->percent-rangeclj

(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.
sourceraw docstring

percent->clj

(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.
sourceraw docstring

percent->freqclj

(percent->freq percent)
source

percent-multiplierclj

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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close