def _read_emoji_data(lines):
    """Parse lines of emoji data and return a map from sequence to tuples of
    name, age, type."""
    line_re = re.compile(
        r"(?:([0-9A-F ]+)|([0-9A-F]+\.\.[0-9A-F]+)\s*);\s*(%s)\s*;\s*([^#]*)\s*#\s*E?(\d+\.\d+).*"
        % "|".join(EMOJI_SEQUENCE_TYPES)
    )
    result = {}
    for line in lines:
        line = line.strip()
        if not line or line[0] == "#":
            continue
        m = line_re.match(line)
        if not m:
            raise ValueError('"%s" Did not match "%s"' % (line_re.pattern, line))

        # group 1 is a sequence, group 2 is a range of single character sequences.
        # we can't process the range because we don't have a name for each character
        # in the range, so skip it and get these emoji and their names from
        # UnicodeData
        if m.group(2):
            continue

        seq_type = m.group(3).strip().encode("ascii")
        seq = tuple(int(s, 16) for s in m.group(1).split())
        name = m.group(4).strip()
        age = float(m.group(5))
        result[seq] = (name, age, seq_type)
    return result