scripts/adapet/ADAPET/src/data/CBReader.py [60:88]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        :param is_eval:
        '''

        file = self._get_file(split)
        data = []

        with open(file, 'r') as f_in:
            for line in f_in.readlines():
                json_string = json.loads(line)

                dict_input = {}
                dict_input["premise"] = json_string["premise"]
                dict_input["hypothesis"] = json_string["hypothesis"]
                dict_input["idx"] = str(json_string["idx"])

                dict_output = {}
                if "label" in json_string:
                    dict_output["lbl"] = self.dict_lbl_2_idx[json_string["label"]]
                else:
                    dict_output["lbl"] = -1

                dict_input_output = {"input": dict_input, "output": dict_output}
                data.append(dict_input_output)

        return data

    @property
    def pets(self):
        return self._pet_names
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



scripts/adapet/ADAPET/src/data/RTEReader.py [61:88]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        :param is_eval:
        '''

        file = self._get_file(split)
        data = []

        with open(file, 'r') as f_in:
            for line in f_in.readlines():
                json_string = json.loads(line)

                dict_input = {}
                dict_input["premise"] = json_string["premise"]
                dict_input["hypothesis"] = json_string["hypothesis"]
                dict_input["idx"] = str(json_string["idx"])

                dict_output = {}
                if "label" in json_string:
                    dict_output["lbl"] = self.dict_lbl_2_idx[json_string["label"]]
                else:
                    dict_output["lbl"] = -1

                dict_input_output = {"input": dict_input, "output": dict_output}
                data.append(dict_input_output)

        return data
    @property
    def pets(self):
        return self._pet_names
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



