def _improve_answer_span(doc_tokens, input_start, input_end, tokenizer,<EOL>orig_answer_text):
<EOL>tok_answer_text = '<STR_LIT:U+0020>'.join(tokenizer(orig_answer_text))<EOL>for new_start in range(input_start, input_end + <NUM_LIT:1>):<EOL><INDENT>for new_end in range(input_end, new_start - <NUM_LIT:1>, -<NUM_LIT:1>):<EOL><INDENT>text_span = '<STR_LIT:U+0020>'.join(doc_tokens[new_start:(new_end + <NUM_LIT:1>)])<EOL>if text_span == tok_answer_text:<EOL><INDENT>return (new_start, new_end)<EOL><DEDENT><DEDENT><DEDENT>return (input_start, input_end)<EOL>
Returns tokenized answer spans that better match the annotated answer.