<s> """<STR_LIT>""" <EOL> from mrjob . job import MRJob <EOL> class MREntityTypeCounter ( MRJob ) : <EOL> """<STR_LIT>""" <EOL> def get_etypes ( self , key , line ) : <EOL> for word in line . split ( ) : <EOL> yield word , <NUM_LIT:1> <EOL> def sum_etypes ( self , word , occurrences ) : <EOL> yield word , sum ( occurrences ) <EOL> def steps ( self ) : <EOL> return [ self . mr ( self . get_etypes , self . sum_etypes ) , ] <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> MREntityTypeCounter . run ( ) </s>
