textstat/resources/TextStat.py
def tfidfProfile(docfprof, numdocs, termsindocprofile):
   """Returns a document profile after applying tf-idf reranking to it.
   
   Parameters:
   
   docfprof: document frequency profile with absolute frequencies
   
   termsindocprofile: a dictionary data structure with term and count of
   documents it occurs in pairs.
   """
   total = sum(docfprof.values())
   if total > 0:
      return dict((tuple(i, tfidfScore(docfprof[i]/total, numdocs, termsindocprofile[i])) for i in docfprof))
   return None
Returns a document profile after applying tf-idf reranking to it.
   
   Parameters:
   
   docfprof: document frequency profile with absolute frequencies
   
   termsindocprofile: a dictionary data structure with term and count of
   documents it occurs in pairs.
   
Returns a document profile after applying tf-idf reranking to it.
Parameters.

document frequency profile with absolute frequencies

a dictionary data structure with term and count of
documents it occurs in pairs.
Returns a document profile after applying tf - idf reranking to it . Parameters . document frequency profile with absolute frequencies a dictionary data structure with term and count of documents it occurs in pairs .
def tfidfProfile(docfprof, numdocs, termsindocprofile):
   total = sum(docfprof.values())
   if total > 0:
      return dict((tuple(i, tfidfScore(docfprof[i]/total, numdocs, termsindocprofile[i])) for i in docfprof))
   return None
def tfidfProfile ( docfprof , numdocs , termsindocprofile ) : total = sum ( docfprof . values ( ) ) if total > 0 : return dict ( ( tuple ( i , tfidfScore ( docfprof [ i ] / total , numdocs , termsindocprofile [ i ] ) ) for i in docfprof ) ) return None
Returns a document profile after applying tf-idf reranking to it.
Returns a document profile after applying tf - idf reranking to it .
"""Returns a document profile after applying tf-idf reranking to it.
   
   Parameters:
   
   docfprof: document frequency profile with absolute frequencies
   
   termsindocprofile: a dictionary data structure with term and count of
   documents it occurs in pairs.
   """
docfprof
numdocs
termsindocprofile