(answers)
return new_answers
Add normalized alternative labels.

    :param answers: list of lists of string answers
    :return: list of lists of string answers
    >>> normalize_answer_strings([['twilight saga: breaking dawn - part 2'], ['the twilight saga: new moon', 'twilight saga: new moon']])
    [['twilight saga: breaking dawn - part 2', 'twilight saga', 'breaking dawn - part 2', 'twilight saga: breaking dawn', 'part 2', 'breaking dawn'], ['the twilight saga: new moon', 'twilight saga: new moon', 'twilight saga', 'the twilight saga', 'new moon']]
    >>> normalize_answer_strings([['2010 world series', 'world series 2010'], ['2012 world series', 'world series 2012'], ['world series 2014', '2014 world series']])
    [{'2010 world series', 'world series 2010'}, {'2012 world series', 'world series 2012'}]
    >>> normalize_answer_strings([['liste gegenwärtig amtierender staatsoberhäupter nach amtszeiten', 'list of heads of state by diplomatic precedence']])
    []
    >>> normalize_answer_strings([["eberhard-karls-gymnasium"]])
    [{'eberhard-karls-gymnasium', 'eberhard karls gymnasium'}]
    >>> normalize_answer_strings([["brown hair"]])
    [{'brown hair', 'brown'}]
    >>> normalize_answer_strings([["ngurah rai airport"]])
    [{'ngurah rai airport', 'ngurah rai international airport'}]
Add normalized alternative labels.
Add normalized alternative labels .
def normalize_answer_strings(answers):
    """
    Add normalized alternative labels.

    :param answers: list of lists of string answers
    :return: list of lists of string answers
    >>> normalize_answer_strings([['twilight saga: breaking dawn - part 2'], ['the twilight saga: new moon', 'twilight saga: new moon']])
    [['twilight saga: breaking dawn - part 2', 'twilight saga', 'breaking dawn - part 2', 'twilight saga: breaking dawn', 'part 2', 'breaking dawn'], ['the twilight saga: new moon', 'twilight saga: new moon', 'twilight saga', 'the twilight saga', 'new moon']]
    >>> normalize_answer_strings([['2010 world series', 'world series 2010'], ['2012 world series', 'world series 2012'], ['world series 2014', '2014 world series']])
    [{'2010 world series', 'world series 2010'}, {'2012 world series', 'world series 2012'}]
    >>> normalize_answer_strings([['liste gegenwärtig amtierender staatsoberhäupter nach amtszeiten', 'list of heads of state by diplomatic precedence']])
    []
    >>> normalize_answer_strings([["eberhard-karls-gymnasium"]])
    [{'eberhard-karls-gymnasium', 'eberhard karls gymnasium'}]
    >>> normalize_answer_strings([["brown hair"]])
    [{'brown hair', 'brown'}]
    >>> normalize_answer_strings([["ngurah rai airport"]])
    [{'ngurah rai airport', 'ngurah rai international airport'}]
    """
    answers = [{a.replace("–", "-").lower() for a in answer_set} for answer_set in answers]
    new_answers = []
    for answer_set in answers:
        new_answer_list = set(answer_set)
        for a in answer_set:
            if ":" in a:
                new_answer_list |= {w.strip() for w in a.split(":")}
            if "," in a:
                new_answer_list |= {w.strip() for w in a.split(",")}
            if " - " in a:
                new_answer_list |= {w.strip() for w in a.split(" - ")}
            elif "-" in a:
                new_answer_list.add(a.replace("-", " "))
            if "standard time" in a:
                new_answer_list.add(a.replace("standard time", "time zone"))
            if "airport" in a:
                new_answer_list.add(a.replace("airport", "international airport"))
            if any(re.findall("\\b{}\\b".format(t), a) for t in {'hair', 'color'}):
                new_answer_list.add(" ".join([t for t in a.split() if t not in {'hair', 'color'}]))
        if not any(re.search("\\b(2014|2015|2016|2017|list of)\\b", a) for a in answer_set):
            new_answers.append(new_answer_list)
    return new_answers
def normalize_answer_strings ( answers ) : answers = [ { a . replace ( "–",  " "). l o wer() f r a i  a swer_set}  f r a swer_set i  a swers] new_answers = [ ] for answer_set in answers : new_answer_list = set ( answer_set ) for a in answer_set : if ":" in a : new_answer_list |= { w . strip ( ) for w in a . split ( ":" ) } if "," in a : new_answer_list |= { w . strip ( ) for w in a . split ( "," ) } if " - " in a : new_answer_list |= { w . strip ( ) for w in a . split ( " - " ) } elif "-" in a : new_answer_list . add ( a . replace ( "-" , " " ) ) if "standard time" in a : new_answer_list . add ( a . replace ( "standard time" , "time zone" ) ) if "airport" in a : new_answer_list . add ( a . replace ( "airport" , "international airport" ) ) if any ( re . findall ( "\\b{}\\b" . format ( t ) , a ) for t in { 'hair' , 'color' } ) : new_answer_list . add ( " " . join ( [ t for t in a . split ( ) if t not in { 'hair' , 'color' } ] ) ) if not any ( re . search ( "\\b(2014|2015|2016|2017|list of)\\b" , a ) for a in answer_set ) : new_answers . append ( new_answer_list ) return new_answers