#NEWLINE# def _calculate_word_prob_link( link ) : #NEWLINE# #INDENT# corpus = _convert_to_text ( link ) #NEWLINE# counts = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# corpus_tokens = corpus . split ( ) #NEWLINE# for token in corpus_tokens : #NEWLINE# #INDENT# if counts . has_key ( token ) : #NEWLINE# #INDENT# counts [ token ] += 1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# counts [ token ] = 1 #NEWLINE# #UNINDENT# #UNINDENT# return counts