def segment_len(tokens):
    """Get length of the segment

    Arguments:
        segment (list) : a list of tokens
    Returns:
        int : the length of the segment
    """
    return sum(map(len, tokens))