#NEWLINE# def _compute_tf( self , sentences ) : #NEWLINE# #INDENT# '\n        Computes the normalized term frequency as explained in http://www.tfidf.com/\n        ' #NEWLINE# content_words = self . _get_all_content_words_in_doc ( sentences ) #NEWLINE# content_words_count = len ( content_words ) #NEWLINE# content_words_freq = self . _compute_word_freq ( content_words ) #NEWLINE# content_word_tf = dict ( ( ( k , ( self / content_words_count ) ) for ( k , v ) in content_words_freq . items ( ) ) ) #NEWLINE# return content_word_tf