def _parse_vw_output(text):
 data = {}
 for line in text.splitlines():
  if line.startswith(u'average loss'):
   data[u'average_loss'] = float(line.split(u'=')[1])
   break
 return data

def _parse_vw_output ( text ) : data = { } for line in text . splitlines ( ) : if line . startswith ( u'average loss' ) : data [ u'average_loss' ] = float ( line . split ( u'=' ) [ 1 ] ) break return data
get dict of useful fields from vowpal wabbits output .