import re


def name_parser(wiki_text: str) -> dict:
    """
    This function will try to be a catch all for the text we expect in a name cell.

    Hopefully it doesn't change any time soon...
    :param wiki_text: str, the text in the name cell
    :return: dict, with key names, greek, latin, alt, alt_greek, alt_latin
    """
    # init
    text, _, alt = wiki_text.lower().rstrip().partition('formally')
    pattern = r'([^\(\)\,]+)\(?([^\(\)\,]+)?,?([^\(\)\,]+)?\)?'
    fields = ['name', 'greek', 'latin']
    alt_fields = ['alt_name', 'alt_greek', 'alt_latin']

    # parse cell structure
    matches = [item.strip()+"." for item in re.findall(pattern, text)[0] if item != '']
    alt_matches = [item.strip()+"." for item in re.findall(pattern, alt)[0] if item != ''] if alt else []

    # add to dictionary
    d1, d2 = dict(zip(fields, matches)), dict(zip(alt_fields, alt_matches))

    return {**d1, **d2}