from typing import List


def get_components(str_lis: List[str]) -> List[int]:
    """
    str_lis: List corresponding to a paritcular paragraph/essay in the CoNLL format data

    Returns: A list containing component number of each element in str_lis.
    """
    components = list()
    cur_type = None
    component_no = -1

    for elem in str_lis:
        elem = elem.strip()
        pos, token, rel_entry = elem.split()
        first_extra_col = rel_entry.split(':')[0]
        
        try:
            component_type = first_extra_col.split('-')[1]
        except:
            component_type = 'O'
        
        if cur_type!=component_type:
            component_no+=1
            cur_type=component_type        
        
        components.append(component_no)
    
    return components