textstat/resources/TextStat.py
def relFreqProfile(freqprof):
   """Generates a relative frequency profile from an absolute frequency
      profile."""
   tokenCount = sum(freqprof.values())
   if tokenCount > 0:
      return dict(((i[0], i[1]/tokenCount) for i in freqprof.items()))
Generates a relative frequency profile from an absolute frequency
      profile.
Generates a relative frequency profile from an absolute frequency
profile.
Generates a relative frequency profile from an absolute frequency profile .
def relFreqProfile(freqprof):
   tokenCount = sum(freqprof.values())
   if tokenCount > 0:
      return dict(((i[0], i[1]/tokenCount) for i in freqprof.items()))
def relFreqProfile ( freqprof ) : tokenCount = sum ( freqprof . values ( ) ) if tokenCount > 0 : return dict ( ( ( i [ 0 ] , i [ 1 ] / tokenCount ) for i in freqprof . items ( ) ) )
Generates a relative frequency profile from an absolute frequency
profile.
Generates a relative frequency profile from an absolute frequency profile .
"""Generates a relative frequency profile from an absolute frequency
      profile."""
freqprof