#NEWLINE# def word_count_map( data ) : #NEWLINE# #INDENT# 'Word count map function.' #NEWLINE# ( entry , text_fn ) = data #NEWLINE# text = text_fn ( ) #NEWLINE# logging . debug ( 'Got %s' , data . filename ) #NEWLINE# for s in split_into_sentences ( text ) : #NEWLINE# #INDENT# for w in split_into_words ( s . lower ( ) ) : #NEWLINE# #INDENT# ( yield ( w , '' ) )