<s> """<STR_LIT>""" <EOL> from pycascading . helpers import * <EOL> def word_count_callback ( value ) : <EOL> return len ( value . split ( ) ) <EOL> @ udf_map <EOL> def word_count ( tuple , inc , second_inc , callback = None ) : <EOL> return [ inc + second_inc + callback ( tuple . get ( <NUM_LIT:1> ) ) , tuple . get ( <NUM_LIT:1> ) ] <EOL> def main ( ) : <EOL> flow = Flow ( ) <EOL> input = flow . source ( Hfs ( TextLine ( ) , '<STR_LIT>' ) ) <EOL> output = flow . tsv_sink ( '<STR_LIT>' ) <EOL> p = input | map_replace ( <EOL> word_count ( <NUM_LIT:100> , second_inc = <NUM_LIT:200> , callback = word_count_callback ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) | output <EOL> flow . run ( num_reducers = <NUM_LIT:1> ) </s>
