updated freqs_to_dBpack docstring

This commit is contained in:
Joshua Chin 2015-06-18 10:32:53 -04:00
parent 3596434f7f
commit 1385b735cf

View File

@ -52,8 +52,11 @@ def read_freqs(filename, cutoff=0):
def freqs_to_dBpack(in_filename, out_filename, cutoff=-60):
"""
Convert a dictionary of word frequencies to a file in the idiosyncratic
'dBpack' format.
Convert a csv file of words and their frequencies to a file in the
idiosyncratic 'dBpack' format.
Only words with a frequency greater than `cutoff` dB will be written to
the new file.
"""
freq_cutoff = 10 ** (cutoff / 10.)
freqs = read_freqs(in_filename, freq_cutoff)