def text_to_dict(file_path):
    """
    Read in a text file as a dictionary where keys are text and values are indices (line numbers).
    Used to read the act set and slot set.
    
    # Arguments:
        
        - ** file_path **: The path to the act set or slot set file
        
    ** return **: string-index dictionary
    """


    result_set = {}
    with open(file_path, 'r') as f:
        index = 0
        for line in f.readlines():
            result_set[line.strip('\n').strip('\r')] = index
            index += 1

    return result_set