def convert_to_jiant_ep_format(input_path: str):
    """
        Converts the TREC-10 Question Classification file into samples for the Question Type Probing task in Jiant format
        :return: A list of samples in jiant edge probing format.
    """

    DOC_ID = "trec-qt"
    samples = []
    sample_id = 0

    with open(input_path, encoding="latin-1") as input_file:
        info = {"doc_id": DOC_ID, "q_id": str(sample_id)}
        sample_id += 1
        lines = input_file.readlines()
        for line in lines:
            line = line[:-1] # remove the last question mark
            line_split = line.split(" ")	# split each word in the line
            
            label = line_split[0]	# get label
            text = line_split[1:-1]	# get text content
            
			# create an entry and add to sample list
            entry = {"info": info,
                     "text": " ".join(text),
                     "targets": [{"span1": [0, len(text)], "label": label}]}

            samples.append(entry)
    
    return samples