original_docstring: 
      Translates each line from source_data, calling output handler for each result.
  
      :param output_handler: A handler that will be called once with the output of each translation.
      :param source_data: A enumerable list of source sentences that will be translated.
      :param translator: The translator that will be used for each line of input.
      :return: The number of lines translated, and the total time taken.
      
docstring: Translates each line from source_data, calling output handler for each result.
docstring_tokens: Translates each line from source_data calling output handler for each result .
code: def translate_lines(output_handler: sockeye.output_handler.OutputHandler, source_data: Iterable[str],
                      translator: sockeye.inference.Translator) -> Tuple[int, float]:
      """
      Translates each line from source_data, calling output handler for each result.
  
      :param output_handler: A handler that will be called once with the output of each translation.
      :param source_data: A enumerable list of source sentences that will be translated.
      :param translator: The translator that will be used for each line of input.
      :return: The number of lines translated, and the total time taken.
      """
  
      i = 0
      total_time = 0.0
      for i, line in enumerate(source_data, 1):
          tic = time.time()
          trans_input = translator.make_input(i, line)
          logger.debug(" IN: %s", trans_input)
          trans_output = translator.translate(trans_input)
          trans_wall_time = time.time() - tic
          total_time += trans_wall_time
          logger.debug("OUT: %s", trans_output)
          logger.debug("OUT: time=%.2f", trans_wall_time)
          output_handler.handle(trans_input, trans_output, trans_wall_time)
      return i, total_time
code_tokens: def translate_lines ( output_handler : sockeye . output_handler . OutputHandler , source_data : Iterable [ str ] , translator : sockeye . inference . Translator ) -> Tuple [ int , float ] : i = 0 total_time = 0.0 for i , line in enumerate ( source_data , 1 ) : tic = time . time ( ) trans_input = translator . make_input ( i , line ) logger . debug ( " IN: %s" , trans_input ) trans_output = translator . translate ( trans_input ) trans_wall_time = time . time ( ) - tic total_time += trans_wall_time logger . debug ( "OUT: %s" , trans_output ) logger . debug ( "OUT: time=%.2f" , trans_wall_time ) output_handler . handle ( trans_input , trans_output , trans_wall_time ) return i , total_time
short_docstring: Translates each line from source_data, calling output handler for each result.
short_docstring_tokens: Translates each line from source_data calling output handler for each result .
comment: """
      Translates each line from source_data, calling output handler for each result.
  
      :param output_handler: A handler that will be called once with the output of each translation.
      :param source_data: A enumerable list of source sentences that will be translated.
      :param translator: The translator that will be used for each line of input.
      :return: The number of lines translated, and the total time taken.
      """