def normalize_answer(s):
def remove_articles(text):<EOL><INDENT>return re.sub(r'<STR_LIT>', '<STR_LIT:U+0020>', text)<EOL><DEDENT>def white_space_fix(text):<EOL><INDENT>return '<STR_LIT:U+0020>'.join(text.split())<EOL><DEDENT>def remove_punc(text):<EOL><INDENT>exclude = set(string.punctuation)<EOL>return '<STR_LIT>'.join(ch for ch in text if ch not in exclude)<EOL><DEDENT>def lower(text):<EOL><INDENT>return text.lower()<EOL><DEDENT>return white_space_fix(remove_articles(remove_punc(lower(s))))<EOL>
Lower text and remove punctuation, articles and extra whitespace.