def extract_type(tag: str, sep: str = "-") -> str:
    """Extract the span type from a tag.

    Tags are made of two parts. The second part is the type of the span which
    is specific to the downstream task. This function extracts that value from
    the tag.

    Args:
        tag: The tag to extract the type from.
        sep: The character (or string of characters) that separate the token
            function from the span type.

    Returns:
        The span type.
    """
    if sep not in tag:
        return tag
    return tag.split(sep, maxsplit=1)[1]